Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help solving heat equation with Neumann Boundary Conditions with different domain

  1. Nov 16, 2011 #1
    Hi guys!

    I'm to find the solution to

    [tex]\frac{\partial u}{\partial t} = \frac{\partial^2 u}{\partial x^2} [/tex]

    Subject to an initial condition

    [tex] u(x,0) = u_0(x) = a \exp(- \frac{x^2}{2c^2}) [/tex]

    And Neumann boundary conditions

    [tex] \frac{\partial u}{\partial x} (-1,t) = \frac{\partial u}{\partial x} (1,t) = 0 [/tex]

    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 :

    [tex] u(x,t) = f(x)g(t) [/tex]

    This yields:

    [tex] \frac{1}{g} \frac{dg}{dt} = \frac{1}{f} \frac{d^2f}{dx^2} = -\lambda [/tex]

    Spatial Part:

    [tex] \frac{1}{f} \frac{d^2f}{dx^2} = -\lambda [/tex]

    [tex] \frac{d^2f}{dx^2} + \lambda f = 0 [/tex]

    Therefore :

    [tex] f(x) = A \cos(\sqrt{\lambda} x) + B \sin(\sqrt{\lambda} x) [/tex]

    And since I'm considering Neumann Boundary conditions I get the derivative of this

    [tex] f \prime (x) = -A \sqrt{\lambda}\sin(\sqrt{\lambda} x) + B \sqrt{\lambda} \cos(\sqrt{\lambda} x) [/tex]

    So, [tex] f \prime (-1) = 0 [/tex]

    This gives:

    [tex] A \sin(\sqrt{\lambda}) + B \cos(\sqrt{\lambda}) = 0[/tex]

    And for [tex] f \prime (1) = 0 [/tex]

    I get :

    [tex] -A \sin(\sqrt{\lambda}) + B \cos(\sqrt{\lambda}) = 0[/tex]

    So from these two equations I can conclude that:

    Firstly by just adding the two equations

    [tex] B \cos(\sqrt{\lambda}) = 0 [/tex]

    So either [itex] B = 0 [/itex] or [itex] \cos(\sqrt{\lambda}) = 0 [/itex]

    Now substituting [itex] B \cos(\sqrt{\lambda}) = 0 [/itex] back into [itex] A \sin(\sqrt{\lambda}) + B \cos(\sqrt{\lambda}) = 0[/itex]

    I also get
    [tex] A \sin(\sqrt{\lambda}) = 0 [/tex]

    So either [itex] A = 0 [/itex] or [itex] \sin(\sqrt{\lambda}) = 0 [/itex]

    Obviously [itex] \sin(\sqrt{\lambda}) [/itex] and [itex] \cos(\sqrt{\lambda}) [/itex] can't both equal zero, so how do I approach this...

    Apologies if this is a stupid question..
    Any help would be greatly appreciated
  2. jcsd
  3. Nov 20, 2011 #2


    User Avatar
    Homework Helper

    Have you tried a transform method? I might be tempted to try a Laplace transform on the t variable. I think that this problem requires a transform solution rather than a separation of variable solution.
  4. Nov 21, 2011 #3


    User Avatar
    Science Advisor

    [itex]sin(\sqrt{\lambda})[/itex] and [itex]cos(\sqrt{\lambda})[/itex] don't both have to be 0: one of A and B can be 0 and still give you a non-trivial solution.
  5. Nov 24, 2011 #4
    Ah ok I see! Thanks for your help.

    So I can choose for example in case 1: A=0 , B=B . case2: B=0 , A=A
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook