$f(t) = at+b$ for $t\in[0,1)$
then the Fourier transform on that interval is:
$\hat{f}(\nu) = \int_0^1f(t)e^{-2\pi\nu ti}dt=$
$$\int_0^1 (at+b)\exp(-i(2\pi vt))\,\mathrm dt=\frac {e^{-2i\pi v}\left(-e^{2i\pi v}(a+2i\pi bv)+2i\pi av+a+2i\pi bv\right)} {4\pi^2v^2}$$
(calculated using WolframAlpha)
The following R script uses the Fourier transormation $\hat{f}$ = F to compose $f$ (supposed to be equal to f2) from a set of frequencies:
# .01 RPM to 20 RPM in .01 intervals
freq <- 1:2000/100
# plot region
x <- -100:200/100
f <- function(t,a,b) a*t + b #here a=1, b=1
I <- complex(imaginary = 1)
F <- function(v,a,b) exp(-2*I*pi*v) * (
-exp(2*I*pi*v) *
(a + 2*I*pi*b*v) + 2*I*pi*a*v + 2*I*pi*b*v + a
) / (4*pi^2*v^2)
f2 <- function(t) sum(Mod(F(freq,1,1)) * cos(t*freq*2*pi + Arg(F(freq,1,1))))
plot(x,sapply(x,f2), pch=19, col=rgb(1,0,0,alpha=.2), cex=1)

That looks very nice but apparently I would have to mutliply the retransformation with 1/50 to get the scaling right.
Questions:
- How do I know how to scale a Fourier retransformation without having to check the result?
- What is the technical foundation of this scaling?
code with suggested corrections: https://github.com/joyofdata/miscellaneous/blob/master/fourier-transform.r