# Homework Help: PDE: heat equation

1. Sep 16, 2011

### saxen

1. The problem statement, all variables and given/known data
u$_{t}$=3u$_{xx}$ x=[0,pi]
u(0,t)=u(pi,t)=0
u(x,0)=sinx*cos4x

2. Relevant equations

3. The attempt at a solution

with separation of variables and boundry conditions I get:

u(x,t)= $\sum$B$_{n}$e$^-3n^{2)}}*sinnx$

u(x,0)=sinx*cos4x

f(x)=sinx*cos4x=$\sum$B$_{n}*sinnx$

And here is where I am stuck! I tried computing B$_{n} by computing it like a Fourier coeff. of f(x) but all I got was zero... I don't really know where to go from here. I'm having a hard time with Fourier analysis, that's why I have bombarded this forums with question these last couple of days. I really appreciate the help I get. 2. Sep 16, 2011 ### danielakkerma Hey, It might help to consult the literature on this; Try http://en.wikipedia.org/wiki/Heat_equation#equation_6". And as for your case, in particular, can you please show us how did you integrate the Coefficient? It should be something along the lines of: $$B_n \propto \int_{0}^{\pi}f(x)\sin(nx\pi)$$ as per your statement, certainly not zero! Daniel Last edited by a moderator: Apr 26, 2017 3. Sep 16, 2011 ### saxen Bn= 2/L *integral sinx*cos4x*sinnpix/L L should be pi since my intervall is 0 to pi, or have I misunderstood something? Then integral becomes: http://www.wolframalpha.com/input/?i=integrate+sinx*cos4x*sin(n*x) sin(n+5)pi should be zero for all n? Last edited by a moderator: Apr 26, 2017 4. Sep 17, 2011 ### danielakkerma Last edited by a moderator: Apr 26, 2017 5. Sep 17, 2011 ### saxen Thanks dude, this problem is driving me insane. 6. Sep 17, 2011 ### danielakkerma Okay, Firstly I solved your problem numerically, and received the following graph, tested it using two schemes, and it's mighty accurate!(Pat on the back here . Since we're getting zero here, one naturally inclines to use a Taylor expansion of the series, around Pi. In the case of Sin(n*x), we'll get, up to the second order: That the expansion of the integral, at large, gives: [itex]B_n = \frac{(15 + n^2) \sin(n \pi)}{((-5 + n) (-3 + n) (3 + n) (5 + n))}$
This resolves, for most N, as:
$B_n = \frac{-n(x-\pi)^3}{3}$
I would advise you to plot the resulting function using this expansion, and see whether it matches the attached diagram.
Lets hope it works!
Daniel

#### Attached Files:

• ###### G_1.bmp
File size:
252.7 KB
Views:
172
7. Sep 18, 2011

### saxen

Thanks! Pat on back is well deserved =). Will try this. Do you think there is a way to solve this analytical?

Last edited: Sep 18, 2011
8. Sep 18, 2011

### danielakkerma

The Fourier solution method is very discreet and is only effective for particular cases. I would advise you to use, in such PDEs and those beyond these(i.e Hyperbolic ones etc.) Numerical methods..
Daniel

9. Sep 20, 2011

### saxen

I tried this problem again this morning and solved after 5 minutes. I am sooooo stupid.

sinx*cos4x = 1/2*(sin3x+sin5x)

So: ∑Bn∗sinnx = 1/2(sin3x+sin5x)

---> Bn1sinn1x+Bn2+sinn2=1/2(sin3x+sin5x)

Bn1=Bn2=1/2

n1=3
n2=5

And its solved. That is all.

10. Sep 20, 2011

### danielakkerma

Well done!
I had a feeling this had to sit with reducing your compound expression with the cosines and sines...
Congratulations, and kudos!
Daniel

11. Sep 20, 2011

### Ray Vickson

Why does your summation formula for u(x,t) not have t in it anywhere?

RGV