Diffusion equation & separation of variables

In summary: For boundary conditions - you need to specify the conditions at $x=0$, $x=-L$ and $x=L$ - these should be simple linear conditions.
  • #1
vladimir69
130
0
hi
i have been trying to solve the diffusion equation using separation of variables. i know the answer should turn out something like the normal probability density function but its just turns into a mess when i try it.
i am given the following information:
[tex]\frac{\partial p}{\partial t}=D\frac{\partial^2 p}{\partial x^2}[/tex]
where [tex]p=p(x,t)[/tex]
[tex]p(0,0)=1[/tex]
[tex]p(L,t)=0[/tex]
[tex]p(-L,t)=0[/tex]
where D is a constant (its not specified whether its negative or positive). it would be safe to say the sign for D which gives the easiest solution is the right one.
now this is what i did
[tex]p(x,t)=T(t)X(x)[/tex]
[tex]X\frac{dT}{dt}=DT\frac{d^2 X}{dx^2}[/tex]
which gives 2 equations, namely
[tex]\frac{1}{DT}\frac{dT}{dt}=\lambda[/tex] (1) and
[tex]\frac{1}{X}\frac{d^2X}{dx^2}=\lambda[/tex] (2)
solving (1) and applying the initial conditions and boundary conditions i get
[tex]T(t)=\exp(D\lambda t)[/tex]
for (2) i assumed [tex]\lambda>0[/tex] to get
[tex]X(x)=a \exp(\sqrt{\lambda}x)+b \exp(-\sqrt{\lambda}x)[/tex]
then finally you plug all back into [tex]p(x,t)=T(t)X(x)[/tex]
now I'm not sure where to go here, or how to apply the initial and boundary conditions and nor can i see how this would end up being something like a normal pdf (with an exp(-x^2) in there somwhere)

thanks in advance
 
Last edited:
Physics news on Phys.org
  • #2
vladimir69 said:
hi
i have been trying to solve the diffusion equation using separation of variables. i know the answer should turn out something like the normal probability density function but its just turns into a mess when i try it.
i am given the following information:
[tex]\frac{\partial p}{\partial t}=D\frac{\partial^2 p}{\partial x^2}[/tex]
where [tex]p=p(x,t)[/tex]
[tex]p(0,0)=1[/tex]
[tex]p(L,t)=0[/tex]
[tex]p(-L,t)=0[/tex]
where D is a constant (its not specified whether its negative or positive). it would be safe to say the sign for D which gives the easiest solution is the right one.
now this is what i did
[tex]p(x,t)=T(t)X(x)[/tex]
[tex]X\frac{dT}{dt}=DT\frac{d^2 X}{dx^2}[/tex]
which gives 2 equations, namely
[tex]\frac{1}{DT}\frac{dT}{dt}=\lambda[/tex] (1) and
[tex]\frac{1}{X}\frac{d^2X}{dx^2}=\lambda[/tex] (2)
solving (1) and applying the initial conditions and boundary conditions i get
[tex]T(t)=\exp(D\lambda t)[/tex]
for (2) i assumed [tex]\lambda>0[/tex] to get
[tex]X(x)=a \exp(\sqrt{\lambda}x)+b \exp(-\sqrt{\lambda}x)[/tex]
then finally you plug all back into [tex]p(x,t)=T(t)X(x)[/tex]
now I'm not sure where to go here, or how to apply the initial and boundary conditions and nor can i see how this would end up being something like a normal pdf (with an exp(-x^2) in there somwhere)

thanks in advance

Okay, why did you assume [itex]\lambda[/itex] is positive? What happens if it is negative? Also "p(0,0)= 1" is not sufficient. Initial values for partial differential equations are typically functions: what is p(x,0)? Unless there is a [tex]e^{-x^2}[/tex] in the initial condition you will not get one in the solution to the differential equation!

The general solution will be a sum of the separate solutions:
[tex]\Sigma X(x)T(t)[/tex]
 
  • #3
i assumed lambda to be positive so that the solution to (2) was an exponential (if its negative then i think the solution involves sin and cos, further i would not know what the solution is if lambda can be positive and negative). i am doing stuff to do with the distribution of random walking particles over a period of time, its behaviour is said to display a normal distribution. i thought i needed a function like p(x,0) but it was not given. could you explain why p(0,0)=1 is not sufficient? is the equation not solvable given the information in the first post?

cheers
 
Last edited:
  • #4
Firstly, on the positive assumption of $\lambda$...

In this problem, it's usual to take your $\lambda$ (seperation constant) as $-\lambda$ and $D$ as, say, $\alpha^2$, then you reqns become:

$\dot{T}+\lambda\alpha^2=0$

and

$\ddot{X}+\lambda\alpha^2X=0$

You should now see that the different signs of (this new) $\lambda$ give constant, normal or hyberbolic trig fn answers.

For you initial condition - you need to specify $p(x,0)=f(x)$ - I guess you want $f(x)=0$ which is fine but you should probably state $0\le x\le L$
 
Last edited:

Related to Diffusion equation & separation of variables

1. What is the diffusion equation?

The diffusion equation is a mathematical equation that describes the movement of particles from areas of high concentration to areas of low concentration. It is used in various fields, such as physics, chemistry, and biology, to model the diffusion of gases, liquids, and other substances.

2. How is the diffusion equation derived?

The diffusion equation can be derived from Fick's laws, which describe the rate of diffusion based on the concentration gradient. It can also be derived using the principles of mass conservation and the random walk theory, which models the random movement of particles.

3. What is separation of variables in the context of the diffusion equation?

Separation of variables is a mathematical technique used to solve partial differential equations, such as the diffusion equation. It involves breaking down the equation into simpler equations that can be solved separately and then combining the solutions to obtain the overall solution.

4. What are the applications of the diffusion equation?

The diffusion equation has various applications in different fields. It is commonly used in physics to describe the diffusion of heat and mass transfer, in chemistry to model the diffusion of chemicals, and in biology to study the diffusion of molecules across cell membranes.

5. Are there any limitations to the diffusion equation?

The diffusion equation has some limitations, such as assuming that the diffusing particles are non-interacting and moving randomly. It also does not take into account other factors, such as convection and chemical reactions, which can affect the diffusion process. Therefore, it may not accurately describe all real-world scenarios.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
446
  • Calculus and Beyond Homework Help
Replies
6
Views
374
  • Calculus and Beyond Homework Help
Replies
7
Views
638
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
769
  • Calculus and Beyond Homework Help
Replies
5
Views
695
Replies
0
Views
492
  • Calculus and Beyond Homework Help
Replies
1
Views
509
  • Calculus and Beyond Homework Help
Replies
7
Views
450
  • Calculus and Beyond Homework Help
Replies
1
Views
754
Back
Top