1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Formal Solution for Heat Equation using Fourier Series

  1. Feb 3, 2012 #1
    1. The problem statement, all variables and given/known data
    Find a formal solution of the heat equation u_t=u_xx subject to the following:
    u(0,t)=0
    u_x(∏,t)=0
    u(x,0)=f(x)

    for 0≤x≤∏ and t≥0

    2. Relevant equations
    u(x,t)=X(x)T(t)


    3. The attempt at a solution
    I first began with a separation of variables.

    T'(t)=λT(t)

    T(t) = Ce^(λt).


    X''(x)=λX(x)
    The boundary conditions show that X(0)=0 and X'(∏)=0.

    There are three general cases for the solution X(x).

    Case 1: When λ=0, I get X(x)=Ax+B, and using the boundary conditions get A=B=0.
    So the solution is a trivial solution (not what I need).

    Case 2: When λ=μ^2 >0, then X(x)=Acosh(μx)+Bsinh(μx) and X'(x)=Aμsinh(μx)+Bμcosh(μx).
    Again, using the boundary conditions lead to C=D=0, leading to the trivial solution X(x)=0.

    Case 3: When λ=-μ^2 <0, then X(x)=Acos(μx)+Bsin(μx). X'(x)=-Aμsin(μx)+Bμcos(μx).

    This is where I'm stuck. After solving I get A=0 and B≠0, as cos(μ∏)=0. How do I continue?

    The solution is along the lines of f(x)=u(x,0)= Summation of n=1 to infinity of (Bn*sin(nx)), but clearly that is wrong. Help?

    EDIT: You don't have to show that the fourier series obtained converges to the solution.
    After looking at it some more, I think that X(x)=sin(μx). λ_n=-(μ_n)^2=-n^2/2 (where n is a positive integer). Would that be right?
     
    Last edited: Feb 4, 2012
  2. jcsd
  3. Feb 4, 2012 #2
    So now I have X(x)=sin((n+0.5)x) where n is a positive integer.

    Using u_n(x,t)=[tex]\sum_{n=1}^{\infty}b_n*T_n(t)*X_n(x)[/tex] and plug in t=0,

    So

    u(x,0)=f(x)=[tex]\sum_{n=1}^{\infty}b_n*sin((n+0.5)x)[/tex].

    Now does b_n = the fourier sine series?
     
  4. Feb 4, 2012 #3

    fluidistic

    User Avatar
    Gold Member

    I am a bit lost. How do you get λ_n=-(μ_n)^2=-n^2/2? I get [itex]\lambda_n=-\frac{n^2\pi ^2}{\Pi^2}[/itex].
    How do you get [itex]X(x)=sin((n+0.5)x)[/itex]? I get [itex]X(x)= B_n \sin \left ( \frac{n\pi x}{\Pi} \right )[/itex].
    I don't know if your b_n's are equal to the sine Fourier series coefficients.
    I'll wait for someone more experienced than me to answer.
     
  5. Feb 4, 2012 #4
    I realized that my edit was incorrect. I corrected with my next post.
    I'm also new to this forum, and forgive me since I meant ∏ to be equal to [itex]\pi[/itex].

    Since cos(μ[itex]\pi[/itex])=0. μ[itex]\pi[/itex]=n[itex]\pi[/itex]+[itex]\pi[/itex]/2 where n=positive integer.

    Then I get,

    X(x) = Bsin((n+0.5)x).

    I don't know if I'm doing this right, this is just my way of going about it, and I need verification.
     
  6. Feb 4, 2012 #5

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    The cosine is function is zero at odd multiples of ##\pi/2##. So you get$$
    \mu_n = \frac {(2n-1)}{2}$$
    and you have$$
    X_n(x) = \sin(\frac {(2n-1)}{2}x)$$Next you will solve for ##T_n(t)##.

    I'm guessing you have studied Sturm-Liouville expansions which is what you will need when it comes time to write down the Fourier Coefficients.
     
    Last edited: Feb 4, 2012
  7. Feb 4, 2012 #6
    Do you mean that X'(x)=cos((n-0.5)x) and so X(x)=sin((n-0.5)x)?

    T_n(t) would be Ce^((λ_n)t).

    And no, I have not learned Sturm-Liouville expansions, so I'm taking a guess that B_n is the Fourier sine series...
     
  8. Feb 4, 2012 #7

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Yes, that's what I meant. Thanks for noting that and I have edited it. So, yes, you would have $$
    T_n(t) = c^{\lambda_n t}$$ giving$$
    u(x,t) = \sum_{n=1}^\infty c_nX_n(x)T_n(t) = \sum_{n=1}^\infty
    c_n\sin(\frac{2n-1}{2}x)e^{-(\frac {2n-1}{2})^2t}$$And, setting ##t=0##, your initial condition gives, as you have noted,$$
    f(x) = u(x,0) = \sum_{n=1}^\infty c_n\sin(\frac{2n-1}{2}x)$$Now, the problem is as I think you understand, that this isn't the standard Fourier sine series. That would have been the case if your sine functions had been ##\sin(nx)##. As a consequence you can't assume that ##c_n## is given by the usual half range formula for the coefficient for the sine series. That would have given you$$
    c_n=b_n=\frac 2 \pi \int_0^\pi f(x)\sin(\frac{2n-1}{2}x)\ dx$$That may in fact be a very good guess because it sometimes works out that way. But, as you realize, it is just a guess. You won't be able to check it until you have studied Sturm Liouville theory which give the formula for ##c_n## in expansions like this. At this point, if I were you, I would make that guess but raise the issue with your teacher.
     
  9. Feb 4, 2012 #8
    Thanks for the input!
    As of right now, I'll just write down what I can (it's only a homework problem). I'll ask my professor on Monday (perhaps he is using this problem as a direct link to teaching us the Sturm Liouville theory).
     
  10. Feb 4, 2012 #9

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Maybe so. Perhaps you can report back here after you talk to your professor.
     
  11. Feb 5, 2012 #10

    fluidistic

    User Avatar
    Gold Member

    I'm trying to solve this problem because I'm currently studying exactly the same stuff.
    When doing separation of variables, for the third case when calculating [itex]X(x)[/itex]...
    I get as you get, [itex]X(x)=A\cos (\mu x )+B \sin (\mu x )[/itex]. Since [itex]X(0)=0[/itex], this means [itex]A=0[/itex]. So I am left with [itex]X(x)=B\sin (\mu x)[/itex]. Using the boundary condition [itex]X(\pi )=0[/itex], I get that either [itex]B=0[/itex] (again trivial solution that we don't care of) or [itex]\sin (\mu x )=0[/itex]. For the latter to happen, [itex]\mu _n \pi[/itex] must equal [itex]n\pi[/itex] with [itex]n\in \mathbb{N}[/itex]. So I get that [itex]\mu _n \in \mathbb{N}[/itex]. Therefore I get [itex]X_n (x)=B_n \sin (nx)[/itex] with [itex]n \in \mathbb{N}[/itex]. This differs from your answer guys. Why were you looking when the cosine is worth 0? I didn't get that part.
     
  12. Feb 5, 2012 #11

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    His boundary condition at ##\pi## was different: ##u_x(\pi, t) = 0## which gives ##X'(\pi) = 0##, not ##X(\pi)=0##.
     
  13. Feb 5, 2012 #12

    fluidistic

    User Avatar
    Gold Member

    Whoops, thanks for pointing this out. Going to try out tomorrow.
     
  14. Feb 6, 2012 #13

    fluidistic

    User Avatar
    Gold Member

    Ok guys I get your result.
    I have that [itex]f(x)=\sum _{n=0}^{\infty } c_n \sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ][/itex].
    Using Evans' book definition for the Fourier coefficients, [itex]c_n=\frac{1}{||\sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ] ||^2} \int _0 ^\pi f(x) \sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ]dx[/itex] where [itex]||\sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ] ||^2=\int _0 ^ \pi \sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ]^2dx=\frac{\pi}{2}-\frac{\sin (\pi ^2 (2n+1))}{2\pi n + \pi}=\pi /2[/itex].
    Therefore [itex]c_n=\frac{2}{\pi} \int _0 ^\pi f(x)\sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ] dx[/itex] which is worth your educated guess LCKurtz.
    There's no mention of S-T theory for this part.
    I'd appreciate any comment of how S-T theory can be applied here.
     
  15. Feb 6, 2012 #14

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I don't have Evans' book. But here's a brief explanation of the connection.

    The Sturm-Liouville theory covers eigenvalue problems of the form$$
    (r(x)y'(x))'+ (q(x)+\lambda w(x))y = 0$$with appropriate boundary conditions. The theory shows that the eigenvalues are real and you get an infinite collection of eigenfunctions ##\{\phi_n(x)\}##which can be used in general Fourier expansions. The usual Fourier Series expansions are a special case. I'm glossing over many details, which you can find on the internet, but the relevance to the above problem is that the eigenfunctions are orthogonal to each other with respect to the weight function w(x). So you get an expansion of the form$$
    f(x) = \sum_{k=0}^\infty c_n\phi_k(x)$$If you define an inner product by$$(f,g)=\int_a^bf(x)\overline g(x)w(x)\, dx$$the orthogonality is respect to that inner product and is referred to as orthogonality with respect to the weight function ##w(x)##. In our problem, everything is real and ##(a,b)=(0,\pi)##, and ##w(x)=1##. If you take the inner produce of the series with ##\phi_n## you get$$
    (f,\phi_n) = \sum_{k=0}^\infty c_k(\phi_k,\phi_n) = c_n(\phi_n, \phi_n)$$
    $$c_n = \frac {(f,\phi_n)}{(\phi_n, \phi_n)}$$In our problem$$\phi_n(x)=\sin(\frac{2n-1} 2x)$$ When you work out that denominator, as you have done when you worked out the norm formula, it gives you the ##2/\pi##, which is what you get when you guess using the standard Fourier coefficient formulas. Luckily, the weight function was 1.
     
  16. Feb 6, 2012 #15
    According to my professor, LCKurtz was right.

    The solution is f(x)=u(x,0)=[tex]\sum_{n=1}^{\infty}b_n*sin((n+0.5)x)[/tex]

    where

    B_n=(2/[itex]\pi[/itex])[itex]\int_{0}^{\pi}f(x)*sin((n+0.5)x)dx[/itex].

    As far as deriving b_n, my professor told me it was a guess. I suppose he'll teach us later on or something.
     
  17. Feb 7, 2012 #16

    fluidistic

    User Avatar
    Gold Member

    Thank you LCKurtz, that was very informative. (I notice I made a small error for the expressions, I have an extra factor "pi" inside the sine function which souldn't be there).
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook