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

Heat equation Fourier Series

  1. Jul 5, 2008 #1
    I'm trying to solve a basic heat equation [tex]\frac{\partial T}{\partial t}=\alpha \frac{\partial^2 T}{\partial x^2}[/tex] I manage to get [tex]T=X(x)\tau(t)[/tex]
    Then [tex]\tau(t)=A*e^{-\alpha*\lambda^2*t} and X(x)=C*sin(\lambda x) where \lambda=\pi/Ln n=1,2,3,...[/tex]

    From here I don't know how or why I get to a Fourier Serie. Like this [tex] u(t,x) = \sum_{n = 1}^{+\infty} D_n \left(\sin \frac{n\pi x}{L}\right) e^{-\frac{n^2 \pi^2 kt}{L^2}} \\ and \\ D_n = \frac{2}{L} \int_0^L f(x) \sin \frac{n\pi x}{L} \, dx. [/tex]

    Can someone explain why I have this Fourier Serie?

    Thanks Link
  2. jcsd
  3. Jul 5, 2008 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    From here, recall that when you seperated the variables you stated that:
    Which leads to:

    [tex]T = u_n(x,t) = A_n*e^{-\alpha\left(\frac{n\pi}{L}\right)^2 t}\left(C_n*sin(\frac{n\pi}{L} x)\right)[/tex]

    This is the general solution for each value of [itex]n\in\mathbb{Z}^+[/itex]. However, the general solution to the heat equation is a superposition of all possible modes (or values of n). In otherwords, to find the general solution to the original PDE you need to sum over all possible n:

    [tex]u(x,t) = \sum^{\infty}_{n=1}\left\{ A_n*e^{-\alpha\left(\frac{n\pi}{L}\right)^2 t}\left[C_n*sin\left(\frac{n\pi}{L} x\right)\right]\right\}

    Combining the coefficients such that [itex]A_n\cdot C_n = D_n[/itex]:

    [tex]u(x,t) = \sum^{\infty}_{n=1}D_ne^{-\alpha\left(\frac{n\pi}{L}\right)^2 t}\sin\left(\frac{n\pi}{L} x\right)

    In general the Fourier series of a function my be written as the sum of sines and cosines, but since your function is odd (i.e. only has sines and exponents) the coefficients of the cosine component are identically equal to zero. Therefore, you are simply left with the coefficients of the sine component which are given by Euler's formula:

    [tex]b_n = \frac{2}{L}\int_0^Lf(x)\sin\left(\frac{2n\pi}{T}x\right)[/tex]

    Where T is the period, which in this case is 2L. Hence:

    [tex]D_n = \frac{2}{L}\int_0^Lf(x)\sin\left(\frac{n\pi}{L}x\right)[/tex]

    I hope this helps.
    Last edited: Jul 5, 2008
  4. Jul 6, 2008 #3
    Thanks a lot Hootenanny.
  5. Jul 7, 2008 #4
    I'm assuming f(x)=u(0,x) which is the initial condition of the PDE. So the solution u(t,x) must satsify IC (well I'm more used to u(x,t) but what the heck...)

    u(t,x) = \sum_{n = 1}^{+\infty} D_n \left(\sin \frac{n\pi x}{L}\right) e^{-\frac{n^2 \pi^2 kt}{L^2}}
    so by setting t=0, you got
    u(0,x) = f(x)=\sum_{n = 1}^{+\infty} D_n \left(\sin \frac{n\pi x}{L}\right) }
    Multiply both sides by sin(mPI/L)
    f(x) \sin \frac{m\pi x}{L}=\sum_{n = 1}^{+\infty} D_n \left(\sin \frac{m\pi x}{L} \sin \frac{n\pi x}{L}\right) }
    perform a term by term integration on RHS over 0=<x=<L
    \int _{0}^{L}f(x) \sin \frac{m\pi x}{L}dx= \sum_{n = 1}^{+\infty} \int _{0}^{L}D_n \left(\sin \frac{m\pi x}{L} \sin \frac{n\pi x}{L}\right) }dx
    \int _{0}^{L}\left(\sin \frac{m\pi x}{L} \sin \frac{n\pi x}{L}\right) }dx = 0 \quad when \quad m \neq n
    \int _{0}^{L}\sin ^{2} \left(\frac{m\pi x}{L}\right) }dx = \frac{L}{2} \quad when \quad m=n \neq0
    It reduced to
    \int _{0}^{L}f(x) \sin \frac{m\pi x}{L}dx=D_{n}\frac{L}{2}
    now replace m with n (because m=n)
    D_{n}=\frac{2}{L}\int _{0}^{L}f(x) \sin \frac{n\pi x}{L}dx

    Hope that helps, at least partially.
    Last edited: Jul 7, 2008
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook