One Dimensional Diffusion Equation

  • Thread starter NeoDevin
  • Start date
  • #1
299
1

Homework Statement


Solve:

[tex] \frac{\partial u}{\partial t} = k\frac{\partial^2 u}{\partial x^2}, 0<x<\pi, t>0 [/tex]

with initial condition

[tex] u(x,0)=f(x)=\left\{\begin{array}{cc} 1,& 0\leq x< \pi/2 \\ 0, &\pi/2 \leq x < \pi \end{array}\right [/tex]

and with non-homogeneous boundary conditions

[tex] u(0,t) = 1, u(\pi,t)=0[/tex]

The Attempt at a Solution



I've tried this one a couple different ways, I tried separation of variables, and fourier series. I can get a solution (or infinitely many) to the equation, but I can't seem to make them fit the boundary/initial conditions both.

My solution for the fourier series method is:

[tex]u(x,0)=\frac{A_0}{2} + \sum^{\infty}_{n=1} e^{-kn^2t}(A_n \cos(nx) + B_n \sin(nx) [/tex]

Any ideas how to make this (or any other solution) match both the boundary and initial conditions? Or is the problem incosistent?
 

Answers and Replies

  • #2
mjsd
Homework Helper
726
3
it would be easier to see this if you express the function f(x), the initial condition, as a Fourier series.
 
  • #3
HallsofIvy
Science Advisor
Homework Helper
41,833
961
There is a standard way of handling problems with non-homogeneous boundary conditions: "homogenize" them!

The simple linear function [itex]1- \frac{1}{\pi}x[/itex] satisfies the boundary conditions. Now let [itex]v(x,t)= u(x,t)- 1+ \frac{1}{\pi}x[/itex]
It is easy to see that v(x,t) also satisfies
[tex] \frac{\partial v}{\partial t} = k\frac{\partial^2 v}{\partial x^2} [/tex]
but the boundary conditions for v are v(0, t)= 0, [itex]v(\pi,t)= 0[/itex].
Of course, you have to change the initial condition to
[tex] v(x,0)=\left\{\begin{array}{cc} \frac{1}{\pi}x,& 0\leq x< \pi/2 \\ \frac{1}{\pi}x-1, &\pi/2 \leq x < \pi \end{array}\right [/tex]

Now you can write v in a purely sine series:
[tex]v(x,t)=\sum^{\infty}_{n=1} e^{-kn^2t}B_n \sin(nx) [/tex]

Of course, as mjsd said, you will eventually have to write the initial condition as a Fourier series in order to find the Bn
 

Related Threads on One Dimensional Diffusion Equation

  • Last Post
Replies
6
Views
3K
  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
2
Views
798
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
2
Views
1K
Replies
2
Views
1K
Top