# Homework Help: Fourier transform and the heat equation, don't understand the provided answer

1. Feb 1, 2012

### fluidistic

1. The problem statement, all variables and given/known data
Using Fourier sine transform with respect to $x$, show that the solution to $\frac{\partial u }{\partial t}=\frac{\partial ^2 u }{\partial x^2}$ with $x$ and $t >0$ subject to the conditions $u(0,t)=0$ and $u(x,0)=1$ for $0<x<1$, $u(x,0)=0$ otherwise, with $u(x,t)$ bounded gives the solution $u (x,t)=\frac{2}{\pi} \int _0 ^{\infty } \frac{1-\cos p}{p} e^{-p^2t} \sin pxdp$ .

2. Relevant equations
Sine Fourier transform of $\frac{\partial ^2 u }{\partial x^2}$ is $-p^2 U_s (p,t)+pu(0,t)$ where $U_s(p,t)$ is the sine Fourier transform of $u(x,t)$. While the sine Fourier transform of $\frac{\partial u }{\partial t}$ is $\frac{d U _s (p,t)}{dt}$.

3. The attempt at a solution
Using the relevant equations and the initial condition I reach that $\frac{dU_s}{dt}=-p^2U_s$. It's a simple ODE, separation of variables gives $U_s=Ae^{-p^2t}$.
However checking at the solution to the problem, I'm already wrong...
Here is the given solution that I don't fully understand:
-------------------------------------
With the boundary conditions $u(x,0)=0$ use the sine Fourier transform to give $\frac{dU_s}{dt}=-kp^2U_s$ with solution $U_s=e^{-kp^2t}$ and the boundary condition is $u(x,0)=1$ for $0<x<1$ and $u(x,0)=0$ for $x \geq 1$. Taking transforms give $U_s(0)=\int _0 ^1 \sin px dx=\frac{1-\cos p }{p}$, hence $A=\frac{1-\cos p }{p}$ and $U_s=\frac{1-\cos p }{p}e^{-kp^2t}$ with inverse $u(x,t)=\frac{2}{\pi} \int _0 ^{\infty } \frac{1-\cos p}{p} e^{-p^2t} \sin pxdp$ as required.
----------------------------------
So I don't understand why he has an extra factor "k" in the exponential compared to me.
After this, if I assume that there's this extra k factor, I understand and worked through every single step of the solution. So this is my only question so far.
Wait, another question... why did the exercise asked for the sine Fourier transform rather than say the common one or cosine one? Is it because u(x,0)=0? In other words, for t=0, sin (t)=0? This looks like a rather strange argument.
How does one know what Fourier transform to use?
Thanks for any help!

Edit: in the last step of the answer (taking the inverse sine Fourier transform), it seems they misteriously drop the factor k. The definiton of the inverse sine Fourier transform of the book is $u(x,t)=\frac{2}{\pi} \int _0 ^{\infty } U _s (p,t)\sin px dx$. If I take their $U _s (p,t)$, the k shouldn't disappear. If I take my k-less value of $U _s(p,t)$, I get the correct answer. Did they make a double typo error with the k's?

Last edited: Feb 1, 2012