Solving the Diffusion Equation with Boundary Conditions

Click For Summary

Discussion Overview

The discussion revolves around solving the diffusion equation in one dimension with specified boundary and initial conditions. Participants explore the application of separation of variables and the implications of the boundary conditions on the solution, including the behavior of constants and eigenvalues.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant presents the diffusion equation and attempts to apply boundary conditions using separation of variables, leading to a solution involving constants.
  • Another participant suggests that the initial condition of zero everywhere at t=0 implies no diffusion can occur, questioning the validity of the initial condition.
  • Some participants note that the constant C1 can be absorbed into C2 and C3, reducing the number of constants needed in the solution.
  • A participant emphasizes that the boundary conditions will determine permissible values for the constant a, leading to an infinite series solution rather than a single solution.
  • One participant seeks clarification on how to derive eigenvalues and eigenfunctions from the boundary and initial conditions, expressing confusion about their origin.
  • Several participants conclude that with the given conditions, the only solution is u(x,t) = 0 for all times, as the initial condition and boundary conditions lead to no change over time.

Areas of Agreement / Disagreement

There is a general agreement that the initial condition leads to a trivial solution of u(x,t) = 0. However, there is ongoing discussion about the implications of the boundary conditions and the treatment of constants in the solution, indicating some disagreement on the approach to finding non-trivial solutions.

Contextual Notes

Participants note that the initial condition being zero everywhere may conflict with the physical interpretation of diffusion, as it suggests no material is present to diffuse. The discussion also highlights the complexity of applying boundary conditions and the role of eigenvalues in the solution process.

strangequark
Messages
37
Reaction score
0
Hey all,
I'm wondering if someone can help me understand how to apply the boundary conditions to the diffusion equation in one dimension. Diffusion equation is:

[tex]\frac{\partial u}{\partial t}[/tex]=D*[tex]\frac{(\partial)^{2}u}{\partial x^{2}}[/tex]

The initial condition is:
[tex]u(x,0)=0[/tex]

And the boundary conditions are:
[tex]\frac{\partial u(0,t)}{\partial x}[/tex]=[tex]\frac{\partial u(L,t)}{\partial x}[/tex]=0

I've been trying to solve this by separation of variables, and letting [tex]u(x,t)=T(t)X(x)[/tex]I get the two equations:

[tex]\frac{dT}{dt}+DT=a^{2}[/tex]
and
[tex]\frac{d^{2}X}{dx^{2}}+X=a^{2}[/tex]

Then for my solutions I get:
[tex]T(t)=C_{1}e^{-a^{2}Dt}[/tex]
and
[tex]X(x)=C_{2}sin(ax)+C_{3}cos(ax)[/tex]

so then,
[tex]u(x,t)=T(t)X(x)=C_{1}e^{-a^{2}Dt}(C_{2}sin(ax)+C_{3}cos(ax))[/tex]

To apply my boundary/initial conditions, I then differentiate wrt x, and obtain the three simultaneous equations:

[tex]C_{1}(C_{2}sin(ax)+C_{3}cos(ax))=0[/tex]
[tex]C_{2}C_{1}e^{-a^{2}Dt}=0[/tex]
[tex]C_{1}e^{-a^{2}Dt}(C_{2}cos(aL)-C_{3}sin(aL))=0[/tex]

When I try to solve this, I find that the only possible solutions are [tex]C_{1}=C_{2}=C_{3}=0[/tex] but that can't be right.

What am I missing?
 
Physics news on Phys.org
Overall, everything looks pretty good.
I don't think the initial condition works however, if at t = 0, U = 0 for all x... then there is nothing to diffuse.
Also, C1 shouldn't be there, if you distribute C1 to the sin and cos term, its absorbed into C2 and C3 (so there should only be 2 constants of integration), in addition to the constant a (which should be Pi*n/L for some integer n) --> and the solutions should actually be a sum over all n (in general)
 
First, note that you don't actually need [itex]C_1[/itex]. It can be absorbed into [itex]C_3[/itex] and [itex]C_2[/itex]. That said, the boundary conditions are not going to place constraints on the C's, but on your constant [itex]a[/itex]. i.e., what values of [itex]a[/itex] are permitted such that your boundary conditions are satisfied?

You don't want to be looking for conditions on the [itex]C_i[/itex], since you should find that there will be an infinite number of possible values of [itex]a \equiv a_n[/itex] that satisfy your boundary conditions, and the general solution to the problem will in fact be an infinite sum:

[tex]\sum_{n=0}^{\infty}e^{-a_n^2Dt}\left\{A_n \cos a_n x + B_n \sin a_n x \right\}[/tex]
 
All right, everything you guys said makes sense, especially getting rid of one of the constants. But, I'm trying to apply this to a physical situation, so I need to find a way to get rid of the constants. There is nothing in the region of interest [0,L] at t=0, but at t>0, material diffuses thru the boundary regions into the region of interest. If [tex]a_{n}=\frac{n/pi}{L}[/tex], how do I go about finding the other constants?

The paper I'm looking at gives,
[tex]\lambda_{0}=0[/tex]
[tex]\lambda_{j}=(\frac{\pi j}{L})^{\frac{1}{2}}[/tex]
[tex]\psi_{0}(x)=(\frac{1}{L})^{\frac{1}{2}}[/tex]
[tex]\psi_{j}(x)=(\frac{2}{L})^{\frac{1}{2}})cos(\frac{\pi j x}{L})[/tex]

as eigenvalues and eigenfunctions. I thought these were obtained from the boundary and initial conditions, but apparently that isn't the case. I'm not seeing the eigenvalue equation that they derived these from...Where do these come from?
 
strangequark said:
Hey all,
I'm wondering if someone can help me understand how to apply the boundary conditions to the diffusion equation in one dimension. Diffusion equation is:

[tex]\frac{\partial u}{\partial t}[/tex]=D*[tex]\frac{(\partial)^{2}u}{\partial x^{2}}[/tex]

The initial condition is:
[tex]u(x,0)=0[/tex]

And the boundary conditions are:
[tex]\frac{\partial u(0,t)}{\partial x}[/tex]=[tex]\frac{\partial u(L,t)}{\partial x}[/tex]=0

I've been trying to solve this by separation of variables, and letting [tex]u(x,t)=T(t)X(x)[/tex]I get the two equations:

[tex]\frac{dT}{dt}+DT=a^{2}[/tex]
and
[tex]\frac{d^{2}X}{dx^{2}}+X=a^{2}[/tex]

Then for my solutions I get:
[tex]T(t)=C_{1}e^{-a^{2}Dt}[/tex]
and
[tex]X(x)=C_{2}sin(ax)+C_{3}cos(ax)[/tex]

so then,
[tex]u(x,t)=T(t)X(x)=C_{1}e^{-a^{2}Dt}(C_{2}sin(ax)+C_{3}cos(ax))[/tex]

To apply my boundary/initial conditions, I then differentiate wrt x, and obtain the three simultaneous equations:

[tex]C_{1}(C_{2}sin(ax)+C_{3}cos(ax))=0[/tex]
[tex]C_{2}C_{1}e^{-a^{2}Dt}=0[/tex]
[tex]C_{1}e^{-a^{2}Dt}(C_{2}cos(aL)-C_{3}sin(aL))=0[/tex]

When I try to solve this, I find that the only possible solutions are [tex]C_{1}=C_{2}=C_{3}=0[/tex] but that can't be right.

What am I missing?
The first thing you should do is combine that "C1" into C2 and C3. What you really have is
[tex]u(x,t)=T(t)X(x)=e^{-a^{2}Dt}(C_{2}sin(ax)+C_{3}cos(ax))[/tex]
with two unknown constants, not 3. Now, since the derivatives are to be 0 and x=0, and the derivative of sin(ax) is cos(ax) which is NOT 0 and x= 0, yes, yes C2= 0. That leaves you with
[tex]u_x(L, t)= e^{-a^2Dt}(-aC_3 sin(aL))= 0[/itex]<br /> which requires that C<sub>3</sub> be 0 <b>unless</b> sin(aL)= 0. If aL is a multiple of [itex]\pi[/itex]: that is if [itex]a= n\pi/L[/itex], you have non-trivial solutions. THEN pick C<sub>3</sub> to satisfy "initial condition".<br /> <br /> Because that initial condition is u(x,0)= 0 for all x, you do, in fact, get u(x,t)= 0 as the solution. If the initial temperature is 0 and no heat can diffuse in or out, the temperature stays 0![/tex]
 
lzkelley is right: with the boundary conditions you have specified, the answer is 0 at all times. Think of it this way: if u=0 at t=0, then du/dx = d^2u/dx^2 = 0. But then, by the diffusion equation, du/dt = 0, and so the solution cannot change with time.
 
damn, I see what you're saying. Thanks for your help! I emailed the author of the paper in hopes that he can shed some light on how he obtained his solution.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 36 ·
2
Replies
36
Views
6K
Replies
4
Views
4K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K