Inhomogeneous heat equation Neumann boundary conditions with f(x,t)=cos(2x).

822 Views Asked by At

Consider the following inhomogeneous heat equation with Neumann boundary conditions. $$ \begin{cases} u_t-u_{xx}=\cos(2x)\\ u(x,0)=x \\ u_x(0,t)=u_x(\pi,t)=0 \end{cases}\text{ for }\: \begin{align} 0<x<\pi,\\ 0<t\quad \end{align}$$ By separation of variables I arrive at the homogeneous solution $$u_h(x,t)=\sum_{i=0}^\infty A_ne^{-n^2t}\cos(nx)$$ $$ A_n= \begin{cases} \pi /2 & n=0\\ -4/(\pi n^2)& \text{if $n$ is odd}\\ 0& \text{if $n$ is even} \end{cases}$$ On trying to find the inhomogeneous solution by applying Duhamel's principle i.e. using $$u_p(x,t)=\int_0^t\sum_{i=0}^\infty B_n(s)\cos(nx)e^{-n^2(t-s)}ds$$ where $$B_n(s)=2/\pi \int_0^\pi \cos(nx)\cos(2x) dx$$ I get $$B_n(s)=0$$ What went wrong? Any assistance much appreciated.

1

There are 1 best solutions below

0
On

Using the Laplace transform

$$ {\cal L}\left(u_t-u_{xx}-\cos(2x)\right) = sU(s,x)-u(0,x)-U_{xx}(s,x)-\frac 1s\cos(2x) $$

and now solving

$$ sU(s,x)-x-U_{xx}(s,x)-\frac 1s\cos(2x)=0,\ \ U_x(s,0)=U_x(s,\pi) $$

we have

$$ U(s,x) = \frac{1}{s(s+4)}\left((s+4)x+\cos(2x)-(s(s+4))(e^{\sqrt s x}-e^{\sqrt s(s-x)})C(s)\right) $$

now assuming that $U(s,x)$ remains limited as $x\to\infty$ we have $C(s) = 0$ and then

$$ U(s,x) = \frac xs+\frac{\cos(2x)}{s(s+4)} $$

with inverse

$$ u(t,x) = \frac 14\left(1-e^{-4 t}\right) \cos (2 x)+x $$