- #1
twoflower
- 368
- 0
Hi all,
I've been having little problems getting Fourier series of [itex]e^x[/itex].
I have given
[tex]
f(x) = e^{x}, x \in [-\pi, \pi)
[/tex]
Then
[tex]
a_0 = \frac{1}{\pi}\int_{-\pi}^{\pi} e^{x}\ dx = \frac{2\sinh \pi}{\pi}
[/tex]
[tex]
a_{n} = \frac{1}{\pi}\int_{-\pi}^{\pi} e^{x}\cos (nx)\ dx =
\frac{1}{\pi}\left\{\left[ \frac{1}{n}\ e^{x} \sin (nx)\right]_{-\pi}^{\pi} -
\frac{1}{n}\int_{-\pi}^{\pi} e^{x}\sin (nx)\ dx\right\} =
\frac{(-1)^{n+1}\left(e^{-\pi} - e^{\pi}\right)}{\pi(1+n^2)}
[/tex]
[tex]
b_{n} = \frac{1}{\pi}\int_{-\pi}^{\pi}e^{x}\sin (nx)\ dx = \frac{1}{\pi}\left\{
\left[ -\frac{1}{n}\ e^{x}\cos (nx)\right]_{-\pi}^{\pi} +
\frac{1}{n}\int_{-\pi}^{\pi} e^{x}\cos(nx)\ dx\right\} =
\frac{n(-1)^{n}\left(e^{-\pi} - e^{\pi}\right)}{\pi(1+n^2)}
[/tex]
So the Fourier series looks like this:
[tex]
S(f,x) = \frac{\sinh \pi}{\pi}\ +\ \frac{2\sinh \pi}{\pi}\sum_{n=1}^{\infty}
\frac{(-1)^{n+1}}{1+n^2}\left(\cos(nx) - n\sin(nx))
[/tex]
Anyway, our professor gave us another right (I hope so) result:
[tex]
S(f,x) = \frac{\sinh \pi}{\pi}\ +\ \frac{2\sinh \pi}{\pi}\sum_{n=1}^{\infty}
\frac{(-1)^{n}}{1+n^2}\left(\cos(nx) - n\sin(nx))
[/tex]
Obviously my series is just of opposite sign than it should be, but I can't find
the mistake, could you help me please?
I've been having little problems getting Fourier series of [itex]e^x[/itex].
I have given
[tex]
f(x) = e^{x}, x \in [-\pi, \pi)
[/tex]
Then
[tex]
a_0 = \frac{1}{\pi}\int_{-\pi}^{\pi} e^{x}\ dx = \frac{2\sinh \pi}{\pi}
[/tex]
[tex]
a_{n} = \frac{1}{\pi}\int_{-\pi}^{\pi} e^{x}\cos (nx)\ dx =
\frac{1}{\pi}\left\{\left[ \frac{1}{n}\ e^{x} \sin (nx)\right]_{-\pi}^{\pi} -
\frac{1}{n}\int_{-\pi}^{\pi} e^{x}\sin (nx)\ dx\right\} =
\frac{(-1)^{n+1}\left(e^{-\pi} - e^{\pi}\right)}{\pi(1+n^2)}
[/tex]
[tex]
b_{n} = \frac{1}{\pi}\int_{-\pi}^{\pi}e^{x}\sin (nx)\ dx = \frac{1}{\pi}\left\{
\left[ -\frac{1}{n}\ e^{x}\cos (nx)\right]_{-\pi}^{\pi} +
\frac{1}{n}\int_{-\pi}^{\pi} e^{x}\cos(nx)\ dx\right\} =
\frac{n(-1)^{n}\left(e^{-\pi} - e^{\pi}\right)}{\pi(1+n^2)}
[/tex]
So the Fourier series looks like this:
[tex]
S(f,x) = \frac{\sinh \pi}{\pi}\ +\ \frac{2\sinh \pi}{\pi}\sum_{n=1}^{\infty}
\frac{(-1)^{n+1}}{1+n^2}\left(\cos(nx) - n\sin(nx))
[/tex]
Anyway, our professor gave us another right (I hope so) result:
[tex]
S(f,x) = \frac{\sinh \pi}{\pi}\ +\ \frac{2\sinh \pi}{\pi}\sum_{n=1}^{\infty}
\frac{(-1)^{n}}{1+n^2}\left(\cos(nx) - n\sin(nx))
[/tex]
Obviously my series is just of opposite sign than it should be, but I can't find
the mistake, could you help me please?
Last edited: