0
$\begingroup$

Find the Fourier coefficients and Fourier series of the following function $$f(x)=\frac{\pi e^{-x}}{e^{\pi}-e^{-\pi}};\quad -\pi\le x\le\pi$$

Here is my work:

Since $L=\pi$ we obtain \begin{align*}a_0&=\frac{1}{2\pi}\int\limits_{-\pi}^{\pi}f(x)\text{d}x=\frac{1}{2\left(e^{\pi}-e^{-\pi}\right)}\int\limits_{-\pi}^{\pi}e^{-x}\text{d}x=\frac{1}{2\left(e^{\pi}-e^{-\pi}\right)}\Big[-e^{-x}\Big]_{-\pi}^{\pi}=\frac{1}{2} \\ a_n&=\frac{1}{\pi}\int\limits_{-\pi}^{\pi}f(x)\cos\left(nx\right)\text{d}x=\frac{1}{e^{\pi}-e^{-\pi}}\int\limits_{-\pi}^{\pi}e^{-x}\cos(nx)\text{d}x \\ b_n&=\frac{1}{\pi}\int\limits_{-\pi}^{\pi}f(x)\sin(nx)\text{d}x=\frac{1}{e^{\pi}-e^{-\pi}}\int\limits_{-\pi}^{\pi}e^{-x}\sin(nx)\text{d}x\end{align*}

I'm stuck in $a_{n}$ and $b_{n}$, need help finding an easy way to solve this integration.

$\endgroup$
9
  • 1
    $\begingroup$ What's the problem? You're just integrating sines and cosines, as $e^{-\pi}$ is a constant. $\endgroup$ Commented Aug 22, 2017 at 17:15
  • $\begingroup$ sorry it's e^(-x) $\endgroup$
    – user155971
    Commented Aug 22, 2017 at 17:16
  • 1
    $\begingroup$ Okay - then it's just integration by parts. Also, as a user with 500+ rep, you should know how to use MathJax and not just paste things in an image. $\endgroup$ Commented Aug 22, 2017 at 17:17
  • 1
    $\begingroup$ Like I said, you need to use a special trick once you arrive at the same integral from integrating by parts twice...the trick is in adding the original integrals together and dividing by 2... $\endgroup$ Commented Aug 22, 2017 at 17:21
  • 1
    $\begingroup$ @user155971, I've edited your post. Please notice that you had a mistake in computation of $a_0$. Also, I find that Math Lover's hint is a bit easier than IBP. Up to you choosing what you prefer. $\endgroup$
    – Galc127
    Commented Aug 22, 2017 at 17:30

2 Answers 2

3
$\begingroup$

IBP does the trick. Here's a start:

$$ \frac{1}{n}\int_{-\pi} ^\pi e^{-x} \cos{nx} \ dx = \frac{1}{n} \left(-e^{-x} \cos {nx}\Big|_{-\pi}^\pi - n\int_{-\pi} ^\pi e^{-x} \sin{nx} \ dx \right) $$

The first term is easy. Do another IBP on the second term and you'll get the original integrand, so do what you would do in calculus II and solve for the unknown integral afterwards.

$\endgroup$
6
  • $\begingroup$ I think you need to divide the integration, from -pi to 0 and from 0 to pi $\endgroup$
    – user155971
    Commented Aug 22, 2017 at 17:30
  • $\begingroup$ There's no need to - you'll get the same answer. $\endgroup$ Commented Aug 22, 2017 at 17:31
  • $\begingroup$ also there is mistake , it should be 1/n not in just n , in integration $\endgroup$
    – user155971
    Commented Aug 22, 2017 at 17:35
  • $\begingroup$ Fixed - but of course, you can just add that in later as it's a constant multiplier. $\endgroup$ Commented Aug 22, 2017 at 17:36
  • $\begingroup$ @SeanRoberson, $$\left.-e^{-x}\cos(nx)\right\vert_{-\pi}^{\pi}=\cos(n\pi)\left(e^{\pi}-e^{-\pi}\right)=(-1)^n\left(e^{\pi}-e^{-\pi}\right)$$ i.e, the first term is not $0$. $\endgroup$
    – Galc127
    Commented Aug 22, 2017 at 17:37
2
$\begingroup$

Hint: $$\int e^{-x + i a x} dx = \int{e^{-x} \cos(ax)dx + i \int e^{-x} \sin(ax) dx}.$$

$\endgroup$
2
  • $\begingroup$ Nice one ! (+1) $\endgroup$
    – Galc127
    Commented Aug 22, 2017 at 17:40
  • $\begingroup$ Thanks @Galc127. Using this method, we can get both integrals at the same time by computing the integral of an exponential. $\endgroup$
    – Math Lover
    Commented Aug 22, 2017 at 17:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .