# An MCQ of Solving a heat equation with no boundary conditions

Let $u(x, t)$ be the solution of the equation $$\frac{∂^2 u}{∂x^2} = \frac{∂u}{∂t}$$ which tends to zero as $t → ∞$ and has the value $cos x$ when $t = 0.$ Then

1. $u = \sum_{n = 1}^{∞} a_n sin(nx + b_n)e^{- nt}$, where $a_n, b_n$ are arbitrary constants.

2. $u = \sum_{n = 1}^{∞} a_n sin(nx + b_n)e^{- n^2t}$, where $a_n, b_n$ are nonzero constants.

3. $u = \sum_{n = 1}^{∞} a_n cos(nx + b_n)e^{- n^2t}$, where $a_n$ are not all zeros and $b_n = 0$ for $n \geq 0$.

4. $u = \sum_{n = 1}^{∞} a_n cos(nx + b_n)e^{- n^2t}$, where $a_1 \neq 0, a_n = 0$for $n > 1,$ and$b_n = 0$ for $n \geq 0$.

If the boundary conditions were given, it would have been solved by the usual process by method of variation of parametere, then solving the two ODEs. But what to do now?

• Well one way to see it without actually solving is that General solution at $t=0$ where $X(x)=c_1\sin (\sqrt{\lambda} x)+c_2 \cos (\sqrt{\lambda} x)$ ,$u(X,0)=c_3 * \sqrt{c_1^2+c_2^2} \cos (\sqrt{\lambda} x - \phi)= \cos x$ (given) . Hence $\phi=0$ $\implies$ $c_1=0$ and $c_2c_3=1$ Whereas for $\sqrt{\lambda}$ try to find it when the equality of cos hold both sides in terms of $n$.Where $T(t)=c_3 e^{-\lambda t}$ – Mann May 15 '15 at 13:58
• @Mann, $\lamda$ should be negative. – Parveen Chhikara May 15 '15 at 14:01
• It is for. Time :O, the solution is decaying and goes to 0. – Mann May 15 '15 at 14:02
• @Mann, what is $\phi$? Where does it come from? – Parveen Chhikara May 15 '15 at 14:04
• Well , I just expression the solution for $X(x)$ in another form using phase shift identity. I know, it's generally not valid. but i just wanted to see how was the best way to compare it with $cos x$ on other side , so that i do not arbitrarily assume constant and make mistake. Just multiply and divide by $\sqrt{c_1^2+c_2^2}$ – Mann May 15 '15 at 14:06

Let us assume that $u(x,t)=X(x) T(t)$

$u_{xx}=X''(x)T(t)$
$u_{t}=X(x)T'(t)$

Substituting we get ,

$$\frac{X''(x)}{X(x)}=\frac{T'(t)}{T(t)}=-\lambda$$

Now all the same dependence thing i am pretty sure you know it already. One term depend upon time, other only on Position etc.

We get two equations,

$X''(x)+\lambda X(x)=0$ and $\frac{T'(t)}{T(t)}=-\lambda$

Therefore solution is $X(x)=c_1\cos (\sqrt{\lambda}x)+c_2 \sin (\sqrt{\lambda}x)$

$T(t)=c_3e^{-\lambda t}$

Hence $u(x,t)=c_1\cos (\sqrt{\lambda}x)+c_2 \sin (\sqrt{\lambda}x)\times c_3e^{-\lambda t}$

Now given that $u(x,0)=\cos x =c_1c_3\cos (\sqrt{\lambda}x)+c_2c_3 \sin (\sqrt{\lambda}x)$

It is evident from this equation that only possible case for the constant $c_2=0$ otherwise sine terms will exist which is not possible.

Hence, $c_1c_3\cos (\sqrt{\lambda }x)=\cos x$
Let us transform this statement into the one given in our options.

Here for now so far we have figured the solution is not dependent on $\sin$ Hence (a) , (b) are not valid.

Moreover $b_n=0$ always since there is no phase.

$c_1c_3\cos (\sqrt{\lambda }x)=\cos x$ ,

Let use replace now safely $\sqrt{\lambda}=n$ in whole solution.

And let use replace $c_1c_3=a_n$ reason I will tell you later.

In our equation.

$a_n\times \cos nx = cos x$ .

Now what does this equation tell us? As you know with any other normal case. These kind of equation has usually infinite number of solution. Well so does thus one and we have to sum all of them. Or countable of them as per the desired solution.

But what will be the solution? Let us take an example with $n=2$.

$a_2 \cos (2x)= \cos x$

Here $a_2$ is any constant having any value we desire it to have. Where as $cos 2x \neq \cos x$ , but we can make them equal by choosing a suitable constant or value $a_2$ such that they do become equal. Hence we can apply this reasoning for every other term. Therefore general solution is sum of all such term. I know my approach is not very rigorous , I'd love to see more rigorous approach by someone else.

Hence $u(x,t)=a_n \cos nx\times e^{-n^2 t}$

or $u(x,t)=\sum_{n=1}^{\infty}a_n \cos nx\times e^{-n^2 t}$ option (c)

But the fact is our solution might just be based on only the first term of our solution. Hence option(d)

Why not we take $a_0$ as well?

$a_0\cos 0= \cos x$

$a_0 = \cos x$ , whereas RHS is a variable , LHS is constant. Hence it can't be a valid solution.

Why is $a_1\neq 0$? I am pretty sure you can figure this out.

Why can some $a_n=0$? , the reasoning in this is harder. But it will take away the fun. Good luck :)

Why do we only consider the natural number, and not any other? Well the thing is, you are taking an infinite series of natural number. And eventually you will get enough information from all the constants $a_n$ and $cos n x$ that you won't be missing any information of your solution, i.e, your solution will be complete. Hence, we only need to consider $n \in N$ or it goes as per question.