Question about the solution to the heat equation?

54 Views Asked by At

The question I am attempting to solve is to show that the solution to the heat equation of a rod of length $10$ with initial temperature distribution given by $u(x,0)=f(x)$ is $$\frac{a_0}{2} +\sum_{n=1}^{\infty} a_n\text{exp}\left(-\left(\frac{\alpha n \pi}{10}\right)^2 t\right)\cos\left(\frac{n\pi x}{10} \right ) $$

Yet after my working I get the answer to be $$\sum_{n=1}^{\infty} a_n\text{exp}\left(-\left(\frac{\alpha n \pi}{10}\right)^2 t\right)\sin\left(\frac{n\pi x}{10} \right )$$ which looks to be correct according to the solution to the heat equation I looked at online.

I'm wondering though if this is actually correct and if it is how do I show that it is actually equal to $$\frac{a_0}{2} +\sum_{n=1}^{\infty} a_n\text{exp}\left(-\left(\frac{\alpha n \pi}{10}\right)^2 t\right)\cos\left(\frac{n\pi x}{10} \right ) $$Thanks.