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!

The heat equation

  1. Mar 13, 2012 #1
    1. The problem statement, all variables and given/known data

    F(x,t) satisfies

    [tex] \frac{\partial^2 F(x,t)}{\partial x^2}=\frac{\partial F(x,t)}{\partial t} [/tex]

    With the following boundary conditions

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

    [tex]F(0,t) = F(1,t) [/tex]

    [tex] F(x,0) = x^2 \text{ for } x \in (0,1) [/tex]


    3. The attempt at a solution

    I've assumed it's separation of variables but I am unsure if I can do this

    If it is

    [tex] F(x,t) = \phi(x) G(t) [/tex]

    I end up with

    [tex] \frac{d^2\phi}{d x^2} +\lambda \phi = 0 [/tex]

    [tex] \frac{dG}{dt} = -\lambda G [/tex]

    So

    [tex] \phi(x) = c_1 \cos(x\sqrt{\lambda}) + c_2 \sin(x\sqrt{\lambda}) [/tex]

    I also got that the constants are

    [tex] c_1 = -\frac{1+\cos(\sqrt{\lambda})}{\sin(\sqrt{\lambda})} [/tex]

    [tex] c_2 = \frac{1+\cos(\sqrt{\lambda})}{\cos(\sqrt{\lambda})-1} [/tex]

    unsure where to go from here in terms of the function phi. lambda denotes eigenfunctions?
     
  2. jcsd
  3. Mar 13, 2012 #2

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Good. I hope you know Fourier series.

    Now, [itex]\lambda[/itex] is the separation constant, so we can choose. Write

    [tex]\lambda=n^2\pi^2[/tex]

    to simplify our notation. (it will appear later why we chose this).

    Can you solve

    [tex]\frac{dG}{dt}+\lambda G=0[/tex]

    for this choice of [itex]\lambda[/itex]??

    Now, our boundary conditions are F(0,t)=F(1,t) and another boundary condition is F(0,0)=0 (forget about all the rest for a second). What does that imply for [itex]\phi[/itex]?? Can you use it to find the constants?
     
  4. Mar 14, 2012 #3
    Why can we choose to write that for lambda?

    [tex]\frac{dG(t)}{dt}+\lambda G(t)=0[/tex]

    so

    [tex]G(t) = A \exp(-\lambda t) [/tex]

    [tex] G(t) = A \exp( -n^2\pi^2 t) [/tex]
     
  5. Mar 14, 2012 #4
    [tex] F(0,t) = F(1,t) \Rightarrow c_1=0 [/tex]

    you get [tex]c_1 = -c_1 [/tex]



    [tex]F(0,0)=0[/tex] does not put any extra constraint on the constants since the sine vanishes at zero.



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

    I seem to get [tex] c_2 = c_2 \cos (n \pi ) [/tex]
     
  6. Mar 14, 2012 #5

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award


    Because lambda is arbitrary. Every value of lambda gives rise to another solution. So I choose [itex]\lambda=n^2\pi^2[/tex]. This special choice will give us the solution we want. So other lambda's don't interest us.

    I don't see how you can deduce this. The only thing that you get from this is

    [tex]\phi(0)=\phi(1)[/tex]

    right? Which is always satisfied.

    Now, F(0,0)=0 gives something interesting.
     
  7. Mar 14, 2012 #6

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I would say choosing ##\lambda## there is putting the cart before the horse. You have$$
    \phi''(x)+\lambda\phi(x) = 0$$ $$
    \phi(0)=\phi(1),\ \phi'(0) = \phi'(1)$$You want to consider the three cases ##\lambda=\mu^2>0,\ \lambda = 0,\ \lambda = -\mu^2 < 0##. I think you will find ##\lambda > 0## gives only trivial solutions while ##\lambda = 0## gives a constant. Let's look more closely at ##\lambda = \mu^2 > 0##. This gives$$
    \phi(x) = A\cos(\mu x)+ B\sin(\mu x)$$ $$
    \phi'(x) = -A\mu \sin(\mu x)+ B\mu\cos(\mu x)$$Your boundary conditions give these two equations:$$
    A(1-\cos \mu)-B\sin \mu = 0$$ $$
    A\sin\mu + B(1-\cos\mu)=0$$These will have a nontrivial solution for ##A## and ##B## if the determinant of coefficients is zero. That gives the equation ##(1-\cos \mu)^2+\sin^2\mu = 0##. That can happen only if both squares are zero so ##\mu = 2n\pi##. What is interesting here is that, for those values of ##\mu##, both equations are satisfied for all ##A## and ##B##. So what you have for the solutions for ##\phi## are ##\phi_n(x) = A_n\cos(2n\pi x)+ B_n\sin(2n\pi x)## and ##\lambda_n = \mu_n^2 = 4n^2\pi^2##.
     
  8. Mar 15, 2012 #7
    Yes I follow that now, though the bounday conditions for lambda less than or equal to zero seem to give me no constraints on A and B rather than constants or zero. But what about ##A_n## and ##B_n## ?

    What happened to Fourier.

    Since ## \phi_n (x) ## is a solution I suppose this sum

    ## \sum_{n=0}^{\infty} \phi_n(x) = \sum_{n=0}^{\infty} A_n \cos (2n \pi x) + B_n \sin (2n\pi x) ##

    is a more general solution?

    This sort of looks more like a fourier series, are the constants now needed for the sum to converge?
     
  9. Mar 15, 2012 #8
    I have forgotten about the function ## F(x,t) = \phi(x) G(t)## We have solutions of the form ##F_n(x,t) = (A_n \sin (n \pi x) + B_n \cos (n \pi x) ) c_3 e^{-\lambda t} ##

    Ah so we have

    ##F(x,0) = x^2, ## ##x\in [0,1] ##

    So this series

    ##F(x,0) = \sum_{n=0}^{\infty} \left( A_n \sin (n \pi x) + B_n \cos (n \pi x) \right)= x^2 ##

    ## x \in [0,1] ##

    So that's where Fourier comes in
     
  10. Mar 15, 2012 #9

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    You mean$$
    \phi_n(x) = \left( A_n \sin (2n \pi x) + B_n \cos (2n \pi x) \right)$$ and $$
    G_n(t) = e^{-4n^2\pi^2 t}$$so you are looking for a solution of your PDE like$$
    F(x,t) =a_0 + \sum_{n=0}^\infty \phi_n(x)G_n(t)=
    a_0 + \sum_{n=0}^\infty \left( A_n \sin (2n \pi x) + B_n \cos (2n \pi x) \right)
    e^{-4n^2\pi^2 t}$$It is only now that you can use the condition $$F(x,0)=x^2$$Also I have included a constant term ##a_0##. You need to work the case ##\lambda=0## to verify you get a constant term.
     
  11. Mar 15, 2012 #10
    ##\phi''(x) = 0 ##


    With the boundary conditions you get

    ##\phi(x) = \c_1##

    constant

    ##dG/dt = 0 ##

    so ##G## is constant

    But how does this help you get the ##a_0##?



    Assuming the solution

    ##F(x,t) = a_0 + \sum_{n=0}^{\infty} \left[ A_n \sin (2n\pi x) + B_n \cos (2 n \pi x) \right] e^{-4n^2\pi^2 t} ##

    ## F(x,0) = a_0 + \sum_{n=0}^{\infty} \left[ A_n \sin (2n\pi x) + B_n \cos (2 n \pi x) \right] ##

    ## \int_0^1 a_0 \sin (2m\pi x) dx + \int_0^1 \sin (2m\pi x) \sum_{n=0}^{\infty} \left[ A_n \sin (2n\pi x) + B_n \cos (2 n \pi x) \right] dx = \int_0^1 x^2 \sin (2m\pi x) dx ##

    ## \int_0^1 a_0 \cos (2m\pi x) dx + \int_0^1 \cos (2m\pi x) \sum_{n=0}^{\infty} \left[ A_n \sin (2n\pi x) + B_n \cos (2 n \pi x) \right] dx = \int_0^1 x^2 \cos (2m\pi x) dx ##

    And this should yield the coefficients?

    ## A_n = \frac{-1}{n \pi} ##
    ## B_n = \frac{1}{n \pi} ##

    Those can't be right I think i've made an error
     
    Last edited: Mar 15, 2012
  12. Mar 15, 2012 #11

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    It tells you ##\lambda = 0## is an eigenvalue with ##\phi_0(x) = c## and ##G_0(t) = de^{-0t}## so ##\phi_0(x) G_0(t)= c d = a_0##, some constant. You add that in with the other terms.
    Did you actually calculate those or get them from an answer key? Do you know how to calculate Fourier Coefficients? I may be able to get back to this later this evening.
     
  13. Mar 16, 2012 #12
    i forgot exactly how to go about finding fourier coefficients. so multiplying by cosine or sine and then integrating I got those, but I think I got mixed up with the integrals.

    I found that the fourier series for x^2 is

    ## \frac{\pi^2}{30} + \sum_{n=0}^{\infty} \frac{2(-1)^n}{5n} \cos(n\pi x) ##

    though Mathematica says it is

    ##\frac{\pi ^2}{3}-4 \text{Cos}[x]+\text{Cos}[2 x]-\frac{4}{9} \text{Cos}[3 x]+\frac{1}{4} \text{Cos}[4 x]-\frac{4}{25} \text{Cos}[5 x]+\frac{1}{9} \text{Cos}[6 x] \cdots ##

    So I know that my coefficients are wrong in my previous post.

    What does ## a_0 = \phi_0 G_0 ## actually refer to?


    So,

    ## \left|\left(
    \begin{array}{cc}
    1-\cos (\mu ) & \sin (\mu ) \\
    \sin (\mu ) & 1-\cos (\mu )
    \end{array}
    \right)\right| = -\sin ^2(\mu )+\cos ^2(\mu )-2 \cos (\mu )+1 = 0##



    This has solutions ## \mu = 2n\pi ## and ## n\pi+\pi/2 ##

    Use the latter...


    ## F(x,0) = a_0 + \sum_{n=1}^{\infty}\left[ A_n \sin \left((n \pi + \frac{\pi}{2})x\right) + B_n \cos \left( (n \pi + \frac{\pi}{2})x \right) \right] ##

    ## F(x,0) = a_0 + \sum_{n=1}^{\infty}\left[ A_n \cos \left(n \pi x\right) + B_n \sin \left( n \pi x \right) \right] = x^2##

    It is an even function so

    ## F(x,0) = a_0 + \sum_{n=1}^{\infty} A_n \cos \left(n \pi x\right) = x^2##

    ## F(\frac{1}{2},0) = a_0 = \frac{1}{4} ##

    ##A_n = \int_{-1}^{1} x^2 \cos (m \pi x ) dx = \frac{4(-1)^m}{m^2 \pi^2} ##


    apart from the constant is wrong ##a_0 ## I should get ##\frac{1}{3} ##


    Ahh now it is obvious, integrate both sides between -1 and 1.

    ## a_0 = \int_{-1}^{1} x^2 dx = \frac{1}{3} ##

    ## \phi(x) = \frac{1}{3} + \sum_{n=1}^{\infty} \frac{4(-1)^n}{n^2 \pi^2} \cos (n \pi x) ##

    ## F(x,t) =\left[ \frac{1}{3} + \sum_{n=1}^{\infty} \frac{4(-1)^n}{n^2 \pi^2} \cos (n \pi x) \right] e^{- (n\pi + \frac{\pi}{2})^2 t} ##
     
    Last edited: Mar 16, 2012
  14. Mar 16, 2012 #13

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    No it doesn't. ##\sin^2\mu + (1-\cos\mu)^2## is only zero when both terms are zero. Only ##2n\pi## works.
    That's not all that is wrong. This whole section is wrong for a couple of reasons. You aren't using the correct eigenfunctions and you don't have an even function. You only have the interval (0,1).
    You need to go back to the earlier equation:$$
    F(x,t) =
    a_0 + \sum_{n=0}^\infty \left( B_n \sin (2n \pi x) + A_n \cos (2n \pi x) \right)
    e^{-4n^2\pi^2 t}$$which gives, when ##t=0## $$
    x^2 = a_0 + \sum_{n=0}^\infty \left( B_n \sin (2n \pi x) + A_n \cos (2n \pi x) \right)
    $$You can get the correct fomulas for the coefficients by using the orthogonality of the eigenfunctions of (0,1). Have you studied Sturm-Liouville theory?

    Edit--I just noticed I had the ##B_n## and ##A_n## switched from the usual use so I changed them here, not that it makes any real difference.
     
    Last edited: Mar 16, 2012
  15. Mar 18, 2012 #14
    Ok I don't know what to do. It's Fourier series to solve is it not? Those sin and cosines must be a basis and each of them are orthogonal? So take the inner product (integral on (0,1) ) to eliminate them?
     
  16. Mar 18, 2012 #15

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    That's right. This series:$$
    x^2 = a_0 + \sum_{k=0}^\infty \left( B_k \sin (2k \pi x) + A_k \cos (2k \pi x) \right)$$ will work. Sturm-Liouville theory guarantees they are orthogonal on (0,1) so just work out the appropriate calculations. For example to calculate ##B_n## multiply both sides by ##\sin(2n\pi x)## and integrate over (0,1) and solve for it. Similarly for the others. While there may be a temptation to use the even extension of ##x^2##, which is itself, on (-1,1), and go for a cosine series, I don't think there is any guarantee these functions form a basis there.
     
  17. Mar 18, 2012 #16
    ##A_0 = \int_{0}^{1} x^2 dx = \frac{1}{3}##

    ## A_n = 2 \int_{0}^{1} x^2 \cos (2 n \pi x) dx = \frac{1}{n^2 \pi^2}##

    ## B_n = 2 \int_{0}^{1} x^2 \sin (2 n \pi x) dx= -\frac{1}{n \pi}##

    ##\phi(x) = \frac{1}{3} + \sum_{n=1}^{\infty} \left[ \frac{1}{n^2 \pi^2} \cos(2 n \pi x) - \frac{1}{n \pi} \sin(2 n \pi x) \right]## ?
     
    Last edited: Mar 18, 2012
  18. Mar 18, 2012 #17

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Yes. Those coefficients are correct. Your sum should go from 1 to ∞. If you have Maple or similar you can plot the first 10 terms or so and see it converging to the parabola on (0,1).
     
  19. Mar 18, 2012 #18

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Remember that your solution should look like the above with your coefficients in there.
     
    Last edited: Mar 18, 2012
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: The heat equation
  1. Heat equation (Replies: 2)

  2. Heat Equation (Replies: 1)

  3. Heat equation (Replies: 2)

Loading...