The Student Room Group

fourier series for exponentials

hi, there are the fourier series i obtained for e^x, sinhx and coshx, please can you verify if they are correct.

(QUESTION A)

fourier series for e^x:
ex=eπeπ2π+n=1[(1)n(eπeπ)π(1+n2)cos(nx)+(1)nn(eπeπ)π(1+n2)sin(nx)]\displaystyle e^{x}=\frac{e^{\pi}-e^{-\pi}}{2\pi}+\sum_{n=1}^{\infty}\left[\frac{(-1)^{n}(e^{\pi}-e^{-\pi})}{\pi(1+n^{2})}cos(nx)+\frac{(-1)^{n}n(e^{-\pi}-e^{\pi})}{\pi(1+n^{2})}sin(nx)\right]

fourier series for sinh(x):
sinh(x)=2sinh(x)πn=1[(1)n+1(sin(nx))(1+n2)]\displaystyle sinh(x) = \frac{2 \sinh(x)}{\pi}\sum_{n=1}^{\infty}\left[\frac{(-1)^{n+1} (sin(nx))}{(1+n^2)}\right]

fourier series for cosh(x) = 0..

are these correct?

(QUESTION B)
i need some help working out the An and Bn of the fourier series for e^x:

for example for e^x, how can you show:

an=1πππexcos(nx)dx=(1)n(eπeπ)π(1+n2)\displaystyle a_{n}=\frac{1}{\pi}\int_{-\pi}^{\pi}e^{x}cos(nx)dx=\frac{(-1)^{n}(e^{\pi}-e^{-\pi})}{\pi(1+n^{2})}

my working doesnt seem to arrive . here is my working:

to integrate 1πππexcos(nx)dx\frac{1}{\pi}\int_{-\pi}^{\pi}e^{x}cos(nx)dx

u= e^x, du = e^x ................ dv= cos(nx), v = (sin(nx)/n)
so
Unparseable latex formula:

\displaystyle uv - \int v \hspace{5} du

= ex(sin(nx))nex(sin(nx))n\frac{e^x(sin(nx))}{n} - \int \frac{e^x(sin(nx))}{n}

but the 2nd part (i.e vdu\displaystyle \int vdu, is a never ending process since the e^x will never vanish. as a result i am not able to go on further with this problem. so could you please explain how we arrive at the final answer being: an=(1)n(eπeπ)π(1+n2)a_{n}=\frac{(-1)^{n}(e^{\pi}-e^{-\pi})}{\pi(1+n^{2})}
Reply 1
sinhx=2sinh(π)πn=1[n(1)n+1sin(nx)(1+n2)] \displaystyle \sinh{x} = \frac{2 \sinh(\pi)}{\pi}\sum_{n=1}^{\infty}\left[ \frac{n(-1)^{n+1} \sin(nx)}{(1+n^2)}\right]

coshx=2sinh(π)π(12+n=1[(1)ncos(nx)(1+n2)]) \displaystyle \cosh{x} = \frac{2 \sinh(\pi)}{\pi} \left( \frac{1}{2} + \sum_{n=1}^{\infty}\left[\frac{(-1)^{n} \cos(nx)}{(1+n^2)}\right] \right)

For the next bit, you're on the right lines. By repeated integration by parts (here I'm integrating e^x and differentiating cos(nx)) :

Unparseable latex formula:

[br]\displaystyle \int_{-\pi}^{\pi}e^{x}\cos(nx)dx\\[br]=\ [e^{x}\cos(nx)]_{-\pi}^{\pi} + n\int_{-\pi}^{\pi}e^{x} \sin(nx)dx \\[br]=\ (-1)^n(e^{\pi}-e^{-\pi}) + n \left( [e^{x}\sin(nx)]_{-\pi}^{\pi} - n\int_{-\pi}^{\pi}e^{x} \cos(nx)dx \right)\\[br]=\ (-1)^n(e^{\pi}-e^{-\pi}) - n^2 \int_{-\pi}^{\pi}e^{x} \cos(nx)dx \right)[br]



Solving for ππexcos(nx)dx\displaystyle \int_{-\pi}^{\pi}e^{x}\cos(nx)dx and dividing by π\pi gives:

1πππexcos(nx)dx=(1)n(eπeπ)π(1+n2)=2(1)nsinhππ(1+n2)\displaystyle \frac{1}{\pi}\int_{-\pi}^{\pi}e^{x}\cos(nx)dx = \frac{(-1)^n(e^{\pi}-e^{-\pi})}{\pi(1+n^2)} = \frac{2(-1)^n \sinh{\pi}}{\pi(1+n^2)}
Reply 2
Funny how in the last few hours 11+n2\sum \frac{1}{1+n^2} has come up twice in two unrelated posts!
Reply 3
thanks a lot :smile:
i've worked it out properly now and i get the same answer as you except for one part:

sinhx=2sinh(π)πn=1[n(1)n+1sin(nx)(1+n2)]\displaystyle \sinh{x} = \frac{2 \sinh(\pi)}{\pi}\sum_{n=1}^{\infty}\left[ \frac{n(-1)^{n+1} \sin(nx)}{(1+n^2)}\right]

is there a typo in this series: i.e. look at the sum formula...
you have done

n=1[n(1)n+1sin(nx)(1+n2)]\displaystyle \sum_{n=1}^{\infty}\left[ \frac{n(-1)^{n+1} \sin(nx)}{(1+n^2)}\right]

where did the n(-1)^n+1 come from... is it not meant to be just (-1)^n+1 without the extra "n" at the front..

and most important question:
Can the fourier series for sinhx, coshx, and e^x be shown in a more simpler form? or is this the simplest form?
Reply 4
Unparseable latex formula:

\displaystyle[br]\int_{-\pi}^{\pi} \sinh(x)\sin(nx) dx\\[br]=\ [\cosh(x)\sin(nx)]_{-\pi}^{\pi} - n\int_{-\pi}^{\pi} \cosh(x)\cos(nx) dx\\[br]=\ -n \left( [\sinh(x)\cos(nx)]_{-\pi}^{\pi} + n\int_{-\pi}^{\pi} \sinh(x)\sin(nx) dx \right) \\[br]=\ -n(-1)^{n}(\sinh(\pi) - \sinh(-\pi)) - n^2 \int_{-\pi}^{\pi} \sinh(x)\sin(nx) dx[br]



Solving for πpisinh(x)sin(nx)dx\displaystyle \int_{-\pi}^{pi} \sinh(x)\sin(nx) dx and dividing by π\pi gives:

1πππsinh(x)sin(nx)dx=n(1)n(sinh(π)sinh(π))π(1+n2)=n(1)n+12sinh(π)π(1+n2)[br]\displaystyle \frac{1}{\pi}\int_{-\pi}^{\pi} \sinh(x)\sin(nx) dx = \frac{-n(-1)^{n}(\sinh(\pi) - \sinh(-\pi))}{\pi(1+n^2)} = \frac{n(-1)^{n+1}2\sinh(\pi)}{\pi(1+n^2)}[br]