# Why does this "clearly" solve the heat equation?

1. Nov 6, 2015

So one of my least favorite things that textbooks do is using the words "clearly", "it should be obvious", etc.

In my PDEs class, we've started the Fourier Transform, and I missed the first day of it so I am trying to read through my book. Regarding the heat equation on an infinite domain, it tells me this:

From our previous experience, we note that the expression $\sin{\frac{n\pi x} L } e^{-k(\frac{n\pi} L)^2t}$ solves the heat equation [$u_t=k\cdot u_{xx}$] for integer n, as well as $\cos{\frac{n\pi x} L } e^{-k(\frac{n\pi} L)^2t}$. In fact, it is clear tha
$$u(x,t)=e^{-i\omega x}e^{-k\omega^2t}$$
solves [the heat equation as well], for arbitrary ω both positive and negative.​

It's not "clear" to me why this happens, so I tried 'deriving' this form for a bit by using $\omega=\frac{n\pi}L$ and writing both of the trig functions in their exponential forms

$$\sin x = \frac 1 2(e^{ix}-e^{-ix})$$
$$\cos x = \frac 1 2(e^{ix}+e^{-ix})$$

(and with terms like $e^{i\omega x}$ as well) and added, multiplied, etc, but to no avail.

To be clear (no pun intended), I know that the $e^{-k\omega^2t}$ term is the same as the exponential term in both of the expressions which solve the equation, but I'm failing to see where $e^{-i\omega x}$ came into play.

Any advice as to how I can figure this out? (If possible, please give me some advice on 'deriving' it myself before giving a full answer?)

2. Nov 7, 2015

### SteamKing

Staff Emeritus
If you assume that $u (x, t) = \sin({\frac{n\pi x} L }) ⋅ e^{-k(\frac{n\pi} L)^2t}$, then all you need to do is calculate ut and uxx and substitute these back into the original heat equation, [$u_t=k\cdot u_{xx}$]. You don't have to convert sine or cosine into their exponential equivalents to do this, just use plain old partial differentiation with the product rule.

3. Nov 7, 2015

I know how to plug it in, but I don't see where the solution that is the product of the exponentials comes from. How was it found?

4. Nov 7, 2015

### SteamKing

Staff Emeritus
I really can't say. However, your textbook says, "From our previous experience, we note that ...", which leads me to believe that there is an earlier section in your text where such a solution was developed. Perhaps separation of variables was used, a common technique which is utilized to solve PDEs like this heat equation.

For this PDE, note that one side of the equation involves a derivative w.r.t. t, while the other side involves a second derivative w.r.t. x. The exponential function is solely a function of t while the trig function involves only x. If you differentiate sine or cosine twice, you get the same function back, just like you get back an exponential function if you differentiate an exponential function, plus some multiplicative constants, of course.

These facts would suggest that a trial solution of the form u(x,t) = sin(Ax) ⋅ exp (Bt) with the appropriate choice of the constants A and B would solve ut = k ⋅ uxx.

5. Nov 7, 2015

### maka89

1. Fourier transform the equation over x, to get an ODE (with t as the variable) for the fourier transform of the solution.
2. Solve this ODE. Get a nice expression for the fourier transform of the final solution.
3. Inverse fourier transform this expression.

Step 1 gives:

$\hat{u}_t = -k\omega^2\hat{u}$. Have used that the property of the fourier transform: $\mathcal{F}(\frac{du}{dx}) = (i\omega)\hat{u}$.

Step 2 is solving this first order ODE for $\hat{u}(\omega,t)$.
Step 3 is applying the inverse fourier transform to this solution.
$u(x,t) = \frac{1}{2\pi}\int^\infty_\infty \exp(i\omega x)\hat{u}(\omega,t) d\omega$. You may need the following formula: $\int^\infty_{-\infty} e^{-(ax^2+bx+c)} dx = \sqrt{\frac{\pi}{a}} e^\frac{b^2-4ac}{4a}$

EDIT: Not implying that this should be "clearly obvious", though ^^

Last edited: Nov 7, 2015
6. Nov 8, 2015

### Staff: Mentor

$$u(x,t)=e^{iωx}e^{-kω^2t}=(cos(ωx)+isin(ωx))e^{-kω^2t}=cos(ωx)e^{-kω^2t}+isin(ωx)e^{-kω^2t}$$
Each term of the final expression satisfies the differential equation individually.