# Math Help - PDE by Fourier soltion giving zero coeffiecant

1. ## PDE by Fourier solution giving zero coeffiecant

Hi all,

I am working through a PDE and get through to the general solution, but get a seemingly zero Fourier coefficient.

$\frac {\partial u}{\partial t} = \frac {\partial^2 u}{\partial x^2}$

Using seperable variables method and setting the general solution $u(x,t) = X(x)T(t) = XT$ and substituting into original equation:

$\frac{X''}{X} = \frac {T'}{T} = -p^2$ where $-p^2$ is an arbitary constant. Solving the ODE's given yields:
$X = ACos(px) + Bsin(px)$ and $T = Ce^{-p^2t}$

$u(x,t) = XT = (YCos(px) + ZSin(px))e^{-p^2t}$

->Condition $u(0,t) =0$ applied $=> 0 = (Y +0) e^0=> Y = 0$

->now apply second condition $u(\pi,t) = 0$

$0 = sin(\pi p) => n\pi = p\pi => n = p$ since $sin(n/pi}$ always satisfies the zero condition

$n= 1,2,3, 4 etc etc$ rewrite infinite solution as a fourier series.

$u(x,t) = \sum_{n =1,2,3, etc}^{\infty} QrSin(nx)e^{-p^2t}$

$u(x,0) = sin^2(x) ; 0 evaluate $Qr$

$Qr = \frac{\pi}{2} \int_{o}^{\pi} sin^2(x)sin(2nx)$

I evaluated the $sin$ terms to simplify first:

$sin^2(x) = 1 - cos^2(x)$ subn

$= sin(2nx) - Cos^2(x)sin(2nx)$

but $cos^2{x} = 1/2 + 1/2cos(2x)$ subn

$= sin(2nx) -1/2sin(2nx)- 1/2cos(2x)sin(2nx)$

but $1/2cos(2x)sin(2nx) = 1/4(sin(2x-2nx) -sin(2x+2nx))$ subn

$= 1/2 sin(2nx) - 1/4(sin(2x-2nx) -sin(2x+2nx))$ now back into integral:

$Qr = \frac{\pi}{2} \int_{o}^{\pi} 1/2 sin(2nx) - 1/4(sin(2x-2nx) -sin(2x+2nx))$

$= \frac{\pi}{2} [-ncos(2nx) +1/4(2n-2)cos((2n-2)x)) - 1/4(2n+2)cos((2+2n)x)]_{0}^{\pi}$

It is this last part I always seem to have the expression collapsing to zero; since $cos(0)$ and $cos(n\pi)$ are always the same with the limits of $0;\pi$
I know I must have made a mistake somewhere, I suspect in changing the period length and associated limits ,but can't see it!
$\dfrac{2}{\pi}\displaystyle{\int}_0^{\pi} \sin^2 x \sin nx\,dx = - \dfrac{8}{\pi n(n^2-4)}$ for n odd and zero otherwise.