Question: How to do a Fourier Transform on a function defined with a constant ?

Hi,

WARNING: This is a pretty silly question. I know it, but I've been on this for hours already...
I have this function rather simple but which depends on a natural number n. When I try a Fourier transform on it, it cannot evaluate the result for any n.

I have to define another function, and evaluate n=2, in order to get an explicit result.

h := piecewise(abs(t) < 2*Pi*n, cos(t), 0)
                    piecewise(abs(t) < 2*Pi*n, cos(t), 0)
   F.T.               
---------->         fourier(piecewise(abs(t) < 2*Pi*n, cos(t), 0), t, w)         # doesn't work for any n



h2 := eval(h, n = 2)
                      piecewise(abs(t) < 4*Pi, cos(t), 0)

   F.T.               2 w sin(4 Pi w)
---------->          ------------------                                          # works with fixed n=2
                      (w - 1) (w + 1)


How can I have an explicit result for any natural n ?

Thanks for your time

Please Wait...