A problem on heat equation

49 Views Asked by At

Consider the heat equation $u_t=u_{xx}, 0<x<\pi,t>0$ with the boundary conditions $u(0,t)=0,u(\pi,t)=0$ for $t>0$ and the initial condition $u(x,0)=\sin x$. Then $u(\pi/2,1)=?$

Solution: Let $u(x,t)=X(x)T(t)$ be a solution of given heat equation. Then

$X''/X=T'/T=-p^2(say)$

Then

$X''+p^2X=0$ and $T'+p^2T=0$.

Then, we have

$X=c_1\cos px+c_2\sin px$ and $T=c_3e^{-p^2t}$.

It follows that,

$u(x,t)=(c_1\cos px+c_2\sin px)c_3e^{-p^2t}$.

Applying the condition $u(0,t)=0$, we obtain

$0=c_1c_3e^{-p^2t}\cos px$

As $c_3\neq 0$ so $c_1=0$.

Thus, we have $u(x,t)=c_2c_3\sin px e^{-p^2t}$

Now applying the condition $u(\pi,t)=0$. we have

$0=c_2c_3\sin p\pi e^{-p^2t}\Rightarrow \sin p\pi=0\Rightarrow p=n,n\in\mathbb Z$

Hence, we have $u(x,t)=c_2c_3e^{-n^2t}\sin n x$.

Now, applying the condition $u(x,0)=\sin x$. we have

$\sin x=c_2c_3\sin nx$ Using these values we have

$u(x,t)=\frac{sin x}{\sin nx} \cdot \sin nx\cdot e^{-n^2t}$

$u(x,t)=\sin x e^{-n^2t}$.

Now, $u(\pi/2,1)=\sin (\pi/2)e^{-n^2}=e^{-n^2}$

Given answer is 0.36 which is only true if I put $n=\pm1$, so my question is why $n=\pm 1$, or my solution need some more things. Please help me out!

2

There are 2 best solutions below

1
On BEST ANSWER

Let $u(x,t)=X(x)T(t)$ be a solution of given heat equation. Then

$X''/X=T'/T=-p^2(say)$

Then

$X''+p^2X=0$ and $T'+p^2T=0$.

Then, we have

$X=c_1\cos px+c_2\sin px$ and $T=c_3e^{-p^2t}$.

It follows that,

$u(x,t)=(c_1\cos px+c_2\sin px)c_3e^{-p^2t}$.

Applying the condition $u(0,t)=0$, we obtain

$0=c_1c_3e^{-p^2t}\cos px$

As $c_3\neq 0$ so $c_1=0$.

Thus, we have $u(x,t)=c_2c_3\sin px e^{-p^2t}$

Now applying the condition $u(\pi,t)=0$. we have

$0=c_2c_3\sin p\pi e^{-p^2t}\Rightarrow \sin p\pi=0\Rightarrow p=n,n\in\mathbb Z$

Hence, we have $u(x,t)=c_2c_3e^{-n^2t}\sin n x$.

Now, applying the condition $u(x,0)=\sin x$. we have

$\sin x=c_2c_3\sin nx\implies n=1$, and $c_2c_3=1$. Using these values we have

$u(x,t)=1 \cdot \sin (1\cdot x)\cdot e^{-1^2t}$

$u(x,t)=\sin x e^{-t}$.

Now, $u(\pi/2,1)=e^{-1}=0.36$

0
On

After eliminating the cosine and determining the eigenvalues, the most general solution is the linear combination $$ u(x, t) = \sum_{n=1}^\infty A_n \mathrm{e}^{-n^2 t} \sin(nx), $$ where your $c_2 c_3$ has been amalgamated into the single constant $A_n$ (dependent on $n$).

Applying the initial condition $u(x, 0) = \sin x$, we get the Fourier series problem of determining the coefficients $A_n$ such that $$ \sum_{n=1}^\infty A_n \sin(nx) = \sin x. $$

By inspection, we see that $A_1 = 1$, and $A_n = 0$ for all $n \ge 2$.

Thus the only term present is the $n = 1$ term, and we have $$ u(x, t) = \mathrm{e}^{-t} \sin x. $$