How to integrate from a Fourier sine coefficient?

Jan 2019
5
0
UK
I try to solve a Fourier series (it is the solution of heat equation) as


$$-100x = \sum_{n=1}^{\infty}b_n\sin n\pi x$$


$$b_n=2 \int_0^1{(-100x)\sin (n \pi x)}dx = -200 \int_0^1 x \sin (n \pi x) dx =(-1)^n \frac{200}{n \pi}$$


I know it is simple and stupid, but I do not understand how the last integration of this equation yields to $(-1)^n \frac{200}{n \pi}$ (only the last part).


Can someone explain how this integration is made, and how will be the solution if removing $x$ from the initial equation as


$$-100 = \sum_{n=1}^{\infty}b_n\sin n\pi x$$
 

romsek

MHF Helper
Nov 2013
6,828
3,073
California
forget about the constant for a moment and let's look at

$\displaystyle \int_0^1 x \sin(n \pi x)~dx$

use integration by parts

$u=x,~du=dx$

$dv = \sin(n \pi x),~v = -\dfrac{\cos(n \pi x)}{n\pi}$

$\displaystyle \int_0^1 x \sin(n \pi x)~dx =$

$\left . -\dfrac{x \cos(n \pi x)}{n\pi}\right |_0^1 + \displaystyle \int_0^1~\dfrac{\cos(n \pi x)}{n\pi}~dx = $

$-\dfrac{(-1)^n}{n\pi}+\left . \dfrac{\sin(n\pi x)}{n^2\pi^2} \right |_0^1 = $

$-\dfrac{(-1)^n}{n\pi}$

now multiply by the constant of -200

$-200 \displaystyle \int_0^1 x \sin(n \pi x)~dx = 200 \dfrac{(-1)^n}{n\pi}$
 
  • Like
Reactions: 3 people
Jan 2019
5
0
UK
Thanks for the detailed reply, but I still do not understand how the integration goes for

$$-100 = \sum_{n=1}^{\infty}b_n\sin n\pi x$$

Sorry if it is a stupid question.