# Is $A\cos(kx-wt)$ a valid solution to the diffusion equation? [closed]

I know that for the wave equation $$\frac{\partial^2\psi}{\partial t^2}=c^2\frac{\partial^2\psi}{\partial x^2} \;,$$ we could always plug in the ansatz $$A\cos(kx-\omega t)$$, since equations of this form always satisfy the wave equation. However, for the diffusion equation, $$\frac{\partial T}{\partial t}=D\frac{\partial^2 T}{\partial x^2} \;,$$ where $$T$$ is temperature and $$D$$ is thermal diffusivity, does $$A\cos(kx-\omega t)$$ still serve as a valid guess for the solution?

## closed as off-topic by Aaron Stevens, Jon Custer, Peter Kravchuk, GiorgioP, stafusaJul 5 at 12:59

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Homework-like questions should ask about a specific physics concept and show some effort to work through the problem. We want our questions to be useful to the broader community, and to future users. See our meta site for more guidance on how to edit your question to make it better" – Aaron Stevens, Jon Custer, Peter Kravchuk, GiorgioP, stafusa
If this question can be reworded to fit the rules in the help center, please edit the question.

• Have you plugged it in to see if it actually solves the equation? – ACuriousMind Jun 24 at 16:39
• well I'd get a cosine on one side and a sine on the other side of the equal sign. So does that mean no? If the answer is no, then how come using $Ae^{ikz-i\omega t}$ seems to solve the equation then? – Houndbobsaw Jun 24 at 16:47
• What relationship did you get between $\omega$ and $k$? – G. Smith Jun 24 at 17:01
• using the guess $Ae^{ikx-i\omega t}$ I get a relation of $k=\pm\sqrt{\frac{\omega}{D}}e^{i\pi/4}$. I'm not sure if I use the guess $A\cos(kx-\omega t) though. – Houndbobsaw Jun 24 at 17:11 • When you solve for$k$it’s messy. Solve for$\omega\$ and then put that into your exponential ansatz. – G. Smith Jun 24 at 17:19

Well, you can always put in any trial solution into any differential equation, and see if it works. In this case, however, as you indicated,

well I'd get a cosine on one side and a sine on the other side of the equal sign.

Since sines and cosines are linearly independent, that means that the function you've given will not work as a solution.

If the answer is no, then how come using $$Ae^{ikz-i \omega t}$$ seems to solve the equation then?

Because $$\cos(kx-\omega t)$$ and $$e^{ikz-i\omega t}$$ are different functions $$-$$ "related" does not mean "identical". For the specific case of the imaginary-exponential trial solution, the correct procedure is to use the standard matching procedure to obtain the dispersion relationship, i.e. $$\omega$$ as a function of $$k$$ (and not the other way around), which will give you $$\omega(k) = -iDk^2$$.

(Why $$\omega=\omega(k)$$ and not $$k=k(\omega)$$? Essentially, because the former generalizes well to 2D and 3D problems, whereas the latter doesn't.)

To find out what happens to the initial condition $$T(x,0) = A\cos(kx)$$, add together your initial trial $$e^{ikz-i\omega(k) t}$$ with its counter-propagating counterpart $$e^{-ikz-i\omega(-k) t}$$, and see what the time dependence simplifies to. You will see that the time dependence is not oscillatory, as would be implied by a trial function of the type $$\cos(kx-\omega t)$$, which means that it's, as they say, right out.