# fancy about inverse discrete Fourier sine and cosine transform (i.e. Fourier sine and cosine series)

In order to find $f(x)$ so that $F(u)=\sum\limits_{x=0}^\infty f(x)\sin\dfrac{\pi ux}{L}$ and $F(u)=\sum\limits_{x=0}^\infty f(x)\cos\dfrac{\pi ux}{L}$ , we can borrow the idea from Fourier sine series and Fourier cosine series so that the results are $f(x)=\dfrac{2}{L}\int_0^LF(u)\sin\dfrac{\pi xu}{L}du$ and $f(x)=\begin{cases}\dfrac{1}{L}\int_0^LF(u)~du&\text{when}~x=0\\\dfrac{2}{L}\int_0^LF(u)\cos\dfrac{\pi xu}{L}du&\text{when}~x\neq0\end{cases}$ respectively, but unfortunately the above formulae only hold for $u\in(0,L)$ .

So do they exist any better formula of $f(x)$ so that really hold for at least $u\in\mathbb R$ ?

But why the continuous versions $F(u)=\int_0^\infty f(x)\sin ux~dx$ and $F(u)=\int_0^\infty f(x)\cos ux~dx$ can exist formulae $f(x)=\dfrac{2}{\pi}\int_0^\infty F(u)\sin xu~du$ and $f(x)=\dfrac{2}{\pi}\int_0^\infty F(u)\cos xu~du$ respectively so that they really hold for at least $u\in\mathbb R$ ?

-
I think Fourier transform is an answer to your first question. Just split the real and imaginary parts. (I actually don't quite understand the question.) – Tunococ Aug 17 '12 at 2:53

In fact we can slightly modify the derivations in Fourier sine series and Fourier cosine series to get the formulae of $f(x)$ which hold for $u\in\mathbb R$ :

Part $1$ :

$F(u)=\sum\limits_{x=0}^\infty f(x)\sin\dfrac{\pi ux}{L}$

$F(u)\sin\dfrac{\pi yu}{L}=\sum\limits_{x=1}^\infty f(x)\sin\dfrac{\pi xu}{L}\sin\dfrac{\pi yu}{L}$

$\int_{kL}^{(k+1)L}F(u)\sin\dfrac{\pi yu}{L}du=\int_{kL}^{(k+1)L}\sum\limits_{x=1}^\infty f(x)\sin\dfrac{\pi xu}{L}\sin\dfrac{\pi yu}{L}du$ , $\forall k\in\mathbb{Z}$

$\int_{kL}^{(k+1)L}F(u)\sin\dfrac{\pi yu}{L}du=\sum\limits_{x=1}^\infty f(x)\int_{kL}^{(k+1)L}\sin\dfrac{\pi xu}{L}\sin\dfrac{\pi yu}{L}du$ , $\forall k\in\mathbb{Z}$

$\because\int_{kL}^{(k+1)L}\sin\dfrac{\pi xu}{L}\sin\dfrac{\pi yu}{L}du$

$=\int_{kL}^{(k+1)L}\dfrac{1}{2}\biggl(\cos\dfrac{\pi(x-y)u}{L}-\cos\dfrac{\pi(x+y)u}{L}\biggr)du$

$=\begin{cases}\biggl[\dfrac{L}{2\pi(x-y)}\sin\dfrac{\pi(x-y)u}{L}-\dfrac{L}{2\pi(x+y)}\sin\dfrac{\pi(x+y)u}{L}\biggr]_{kL}^{(k+1)L}&\text{when}~x\neq y~\text{and}~x\neq-y\\\biggl[\dfrac{u}{2}-\dfrac{L}{2\pi(x+y)}\sin\dfrac{\pi(x+y)u}{L}\biggr]_{kL}^{(k+1)L}&\text{when}~x=y\\\biggl[\dfrac{L}{2\pi(x-y)}\sin\dfrac{\pi(x-y)u}{L}-\dfrac{u}{2}\biggr]_{kL}^{(k+1)L}&\text{when}~x=-y\\\left[0\right]_{kL}^{(k+1)L}&\text{when}~x=y~\text{and}~x=-y\end{cases}$

$=\begin{cases}0&\text{when}~x,y~\text{and}~k~\text{are integers and}~x\neq y~\text{and}~x\neq-y~\text{and}~(x=y~\text{and}~x=-y)\\\dfrac{L}{2}&\text{when}~x,y~\text{and}~k~\text{are integers and}~x=y\\-\dfrac{L}{2}&\text{when}~x,y~\text{and}~k~\text{are integers and}~x=-y\end{cases}$

$\therefore\int_{kL}^{(k+1)L}F(u)\sin\dfrac{\pi yu}{L}du=f(y)\dfrac{L}{2}$ , $\forall k\in\mathbb{Z}$ , $u\in(kL,(k+1)L)$

$f(y)=\dfrac{2}{L}\int_{kL}^{(k+1)L}F(u)\sin\dfrac{\pi yu}{L}du$ , $\forall k\in\mathbb{Z}$ , $u\in(kL,(k+1)L)$

$f(x)=\dfrac{2}{L}\int_{kL}^{(k+1)L}F(u)\sin\dfrac{\pi xu}{L}du$ , $\forall k\in\mathbb{Z}$ , $u\in(kL,(k+1)L)$

Hence $f(x)=\sum\limits_{k=-\infty}^\infty\dfrac{2\prod_{kL,(k+1)L}(u)}{L}\int_{kL}^{(k+1)L}F(u)\sin\dfrac{\pi xu}{L}du$ , $\forall k\in\mathbb{Z}$ , $u\in\mathbb R$

Part $2$ :

$F(u)=\sum\limits_{x=0}^\infty f(x)\cos\dfrac{\pi ux}{L}$

$F(u)\cos\dfrac{\pi yu}{L}=\sum\limits_{x=0}^\infty f(x)\cos\dfrac{\pi xu}{L}\cos\dfrac{\pi yu}{L}$

$\int_{kL}^{(k+1)L}F(u)\cos\dfrac{\pi yu}{L}du=\int_{kL}^{(k+1)L}\sum\limits_{x=0}^\infty f(x)\cos\dfrac{\pi xu}{L}\cos\dfrac{\pi yu}{L}du$ , $\forall k\in\mathbb{Z}$

$\int_{kL}^{(k+1)L}F(u)\cos\dfrac{\pi yu}{L}du=\sum\limits_{x=0}^\infty f(x)\int_{kL}^{(k+1)L}\cos\dfrac{\pi xu}{L}\cos\dfrac{\pi yu}{L}du$ , $\forall k\in\mathbb{Z}$

$\because\int_{kL}^{(k+1)L}\cos\dfrac{\pi xu}{L}\cos\dfrac{\pi yu}{L}du$

$=\int_{kL}^{(k+1)L}\dfrac{1}{2}\biggl(\cos\dfrac{\pi(x-y)u}{L}+\cos\dfrac{\pi(x+y)u}{L}\biggr)du$

$=\begin{cases}\biggl[\dfrac{L}{2\pi(x-y)}\sin\dfrac{\pi(x-y)u}{L}+\dfrac{L}{2\pi(x+y)}\sin\dfrac{\pi(x+y)u}{L}\biggr]_{kL}^{(k+1)L}&\text{when}~x\neq y~\text{and}~x\neq-y\\\biggl[\dfrac{u}{2}+\dfrac{L}{2\pi(x+y)}\sin\dfrac{\pi(x+y)u}{L}\biggr]_{kL}^{(k+1)L}&\text{when}~x=y\\\biggl[\dfrac{L}{2\pi(x-y)}\sin\dfrac{\pi(x-y)u}{L}+\dfrac{u}{2}\biggr]_{kL}^{(k+1)L}&\text{when}~x=-y\\\left[u\right]_{kL}^{(k+1)L}&\text{when}~x=y~\text{and}~x=-y\end{cases}$

$=\begin{cases}0&\text{when}~x,y~\text{and}~k~\text{are integers and}~x\neq y~\text{and}~x\neq-y\\\dfrac{L}{2}&\text{when}~x,y~\text{and}~k~\text{are integers and}~x=y\\\dfrac{L}{2}&\text{when}~x,y~\text{and}~k~\text{are integers and}~x=-y\\L&\text{when}~x,y~\text{and}~k~\text{are integers and}~x=y~\text{and}~x=-y\end{cases}$

$\therefore\begin{cases}\int_{kL}^{(k+1)L}F(u)~du=f(0)L\\\int_{kL}^{(k+1)L}F(u)\cos\dfrac{\pi yu}{L}du=f(y)\dfrac{L}{2}&\text{when}~y\neq0\end{cases}$ , $\forall k\in\mathbb{Z}$ , $u\in(kL,(k+1)L)$

$f(y)=\begin{cases}\dfrac{1}{L}\int_{kL}^{(k+1)L}F(u)~du&\text{when}~y=0\\\dfrac{2}{L}\int_{kL}^{(k+1)L}F(u)\cos\dfrac{\pi yu}{L}du&\text{when}~y\neq0\end{cases}$ , $\forall k\in\mathbb{Z}$ , $u\in(kL,(k+1)L)$

$f(x)=\begin{cases}\dfrac{1}{L}\int_{kL}^{(k+1)L}F(u)~du&\text{when}~x=0\\\dfrac{2}{L}\int_{kL}^{(k+1)L}F(u)\cos\dfrac{\pi xu}{L}du&\text{when}~x\neq0\end{cases}$ , $\forall k\in\mathbb{Z}$ , $u\in(kL,(k+1)L)$

Hence $f(x)=\begin{cases}\sum\limits_{k=-\infty}^\infty\dfrac{\prod_{kL,(k+1)L}(u)}{L}\int_{kL}^{(k+1)L}F(u)~du&\text{when}~x=0\\\sum\limits_{k=-\infty}^\infty\dfrac{2\prod_{kL,(k+1)L}(u)}{L}\int_{kL}^{(k+1)L}F(u)\cos\dfrac{\pi xu}{L}du&\text{when}~x\neq0\end{cases}$ , $\forall k\in\mathbb{Z}$ , $u\in\mathbb R$

-