maxtor101
- 22
- 0
Hi guys!
I'm to find the solution to
\frac{\partial u}{\partial t} = \frac{\partial^2 u}{\partial x^2}
Subject to an initial condition
u(x,0) = u_0(x) = a \exp(- \frac{x^2}{2c^2})
And Neumann boundary conditions
\frac{\partial u}{\partial x} (-1,t) = \frac{\partial u}{\partial x} (1,t) = 0
I can usually do this no problem assuming the domain is for instance [0,L], but I get stuck with this one :
Using separation of variables :
u(x,t) = f(x)g(t)
This yields:
\frac{1}{g} \frac{dg}{dt} = \frac{1}{f} \frac{d^2f}{dx^2} = -\lambda
Spatial Part:
\frac{1}{f} \frac{d^2f}{dx^2} = -\lambda
\frac{d^2f}{dx^2} + \lambda f = 0
Therefore :
f(x) = A \cos(\sqrt{\lambda} x) + B \sin(\sqrt{\lambda} x)
And since I'm considering Neumann Boundary conditions I get the derivative of this
f \prime (x) = -A \sqrt{\lambda}\sin(\sqrt{\lambda} x) + B \sqrt{\lambda} \cos(\sqrt{\lambda} x)
So, f \prime (-1) = 0
This gives:
A \sin(\sqrt{\lambda}) + B \cos(\sqrt{\lambda}) = 0
And for f \prime (1) = 0
I get :
-A \sin(\sqrt{\lambda}) + B \cos(\sqrt{\lambda}) = 0
So from these two equations I can conclude that:
Firstly by just adding the two equations
B \cos(\sqrt{\lambda}) = 0
So either B = 0 or \cos(\sqrt{\lambda}) = 0
Now substituting B \cos(\sqrt{\lambda}) = 0 back into A \sin(\sqrt{\lambda}) + B \cos(\sqrt{\lambda}) = 0
I also get
A \sin(\sqrt{\lambda}) = 0
So either A = 0 or \sin(\sqrt{\lambda}) = 0
Obviously \sin(\sqrt{\lambda}) and \cos(\sqrt{\lambda}) can't both equal zero, so how do I approach this...
Apologies if this is a stupid question..
Any help would be greatly appreciated
Max
I'm to find the solution to
\frac{\partial u}{\partial t} = \frac{\partial^2 u}{\partial x^2}
Subject to an initial condition
u(x,0) = u_0(x) = a \exp(- \frac{x^2}{2c^2})
And Neumann boundary conditions
\frac{\partial u}{\partial x} (-1,t) = \frac{\partial u}{\partial x} (1,t) = 0
I can usually do this no problem assuming the domain is for instance [0,L], but I get stuck with this one :
Using separation of variables :
u(x,t) = f(x)g(t)
This yields:
\frac{1}{g} \frac{dg}{dt} = \frac{1}{f} \frac{d^2f}{dx^2} = -\lambda
Spatial Part:
\frac{1}{f} \frac{d^2f}{dx^2} = -\lambda
\frac{d^2f}{dx^2} + \lambda f = 0
Therefore :
f(x) = A \cos(\sqrt{\lambda} x) + B \sin(\sqrt{\lambda} x)
And since I'm considering Neumann Boundary conditions I get the derivative of this
f \prime (x) = -A \sqrt{\lambda}\sin(\sqrt{\lambda} x) + B \sqrt{\lambda} \cos(\sqrt{\lambda} x)
So, f \prime (-1) = 0
This gives:
A \sin(\sqrt{\lambda}) + B \cos(\sqrt{\lambda}) = 0
And for f \prime (1) = 0
I get :
-A \sin(\sqrt{\lambda}) + B \cos(\sqrt{\lambda}) = 0
So from these two equations I can conclude that:
Firstly by just adding the two equations
B \cos(\sqrt{\lambda}) = 0
So either B = 0 or \cos(\sqrt{\lambda}) = 0
Now substituting B \cos(\sqrt{\lambda}) = 0 back into A \sin(\sqrt{\lambda}) + B \cos(\sqrt{\lambda}) = 0
I also get
A \sin(\sqrt{\lambda}) = 0
So either A = 0 or \sin(\sqrt{\lambda}) = 0
Obviously \sin(\sqrt{\lambda}) and \cos(\sqrt{\lambda}) can't both equal zero, so how do I approach this...
Apologies if this is a stupid question..
Any help would be greatly appreciated
Max