# The wave equation with forcing function

What would the solution to this problem be?

$\frac{1}{x} u _t - (x u_x )_x = \frac{1}{x} \ln{x} \quad 1<x<e \quad t>0$

$u(x,0) = \sin{(\frac{\pi}{2}\ln{x})} \quad (1<x<e)$

$u(1,t)=0,\quad u_x(e,t)=0 \quad (t>0)$

Having a hard time with it, thanks!

Let $u(x,t)=\sum\limits_{n=0}^\infty A(n,t)\sin\dfrac{(2n+1)\pi\ln x}{2}$ so that it automatically satisfies $u(1,t)=0$ and $u_x(e,t)=0$ ,

Then $\sum\limits_{n=0}^\infty\dfrac{\partial A(n,t)}{\partial t}\sin\dfrac{(2n+1)\pi\ln x}{2}-x\sum\limits_{n=0}^\infty\dfrac{(2n+1)\pi A(n,t)}{2x}\cos\dfrac{(2n+1)\pi\ln x}{2}-x^2\left(-\sum\limits_{n=0}^\infty\dfrac{(2n+1)^2\pi^2A(n,t)}{4x^2}\sin\dfrac{(2n+1)\pi\ln x}{2}-\sum\limits_{n=0}^\infty\dfrac{(2n+1)\pi A(n,t)}{2x^2}\cos\dfrac{(2n+1)\pi\ln x}{2}\right)=\ln x$

$\sum\limits_{n=0}^\infty\dfrac{\partial A(n,t)}{\partial t}\sin\dfrac{(2n+1)\pi\ln x}{2}-\sum\limits_{n=0}^\infty\dfrac{(2n+1)\pi A(n,t)}{2}\cos\dfrac{(2n+1)\pi\ln x}{2}+\sum\limits_{n=0}^\infty\dfrac{(2n+1)^2\pi^2A(n,t)}{4}\sin\dfrac{(2n+1)\pi\ln x}{2}+\sum\limits_{n=0}^\infty\dfrac{(2n+1)\pi A(n,t)}{2}\cos\dfrac{(2n+1)\pi\ln x}{2}=\ln x$

$\sum\limits_{n=0}^\infty\left(\dfrac{\partial A(n,t)}{\partial t}+\dfrac{(2n+1)^2\pi^2A(n,t)}{4}\right)\sin\dfrac{(2n+1)\pi\ln x}{2}=\ln x$

$\sum\limits_{n=0}^\infty\left(\dfrac{\partial A(n,t)}{\partial t}+\dfrac{(2n+1)^2\pi^2A(n,t)}{4}\right)\sin\dfrac{(2n+1)\pi y}{2}=y$

For $0<y<1$ , i.e. $1<x<e$ , with reference to Wave equation with initial and boundary conditions - is this function right? ,

$\sum\limits_{n=0}^\infty\left(\dfrac{\partial A(n,t)}{\partial t}+\dfrac{(2n+1)^2\pi^2A(n,t)}{4}\right)\sin\dfrac{(2n+1)\pi y}{2}=\sum\limits_{n=0}^\infty2\int_0^1y\sin\dfrac{(2n+1)\pi y}{2}dy~\sin\dfrac{(2n+1)\pi y}{2}$

$\sum\limits_{n=0}^\infty\left(\dfrac{\partial A(n,t)}{\partial t}+\dfrac{(2n+1)^2\pi^2A(n,t)}{4}\right)\sin\dfrac{(2n+1)\pi y}{2}=-\sum\limits_{n=0}^\infty\dfrac{8(-1)^n}{(2n+1)^2\pi^2}\sin\dfrac{(2n+1)\pi y}{2}$

$\therefore\dfrac{\partial A(n,t)}{\partial t}+\dfrac{(2n+1)^2\pi^2A(n,t)}{4}=-\dfrac{8(-1)^n}{(2n+1)^2\pi^2}$

$\dfrac{\partial}{\partial t}\left(e^\frac{(2n+1)^2\pi^2t}{4}A(n,t)\right)=-\dfrac{8(-1)^ne^\frac{(2n+1)^2\pi^2t}{4}}{(2n+1)^2\pi^2}$

$e^\frac{(2n+1)^2\pi^2t}{4}A(n,t)=C(n)-\dfrac{32(-1)^ne^\frac{(2n+1)^2\pi^2t}{4}}{(2n+1)^4\pi^4}$

$A(n,t)=C(n)e^{-\frac{(2n+1)^2\pi^2t}{4}}-\dfrac{32(-1)^n}{(2n+1)^4\pi^4}$

$\therefore u(x,t)=\sum\limits_{n=0}^\infty C(n)e^{-\frac{(2n+1)^2\pi^2t}{4}}\sin\dfrac{(2n+1)\pi\ln x}{2}-\sum\limits_{n=0}^\infty\dfrac{32(-1)^n}{(2n+1)^4\pi^4}\sin\dfrac{(2n+1)\pi\ln x}{2}$

$u(x,0)=\sin\dfrac{\pi\ln x}{2}$ :

$\sum\limits_{n=0}^\infty C(n)\sin\dfrac{(2n+1)\pi\ln x}{2}-\sum\limits_{n=0}^\infty\dfrac{32(-1)^n}{(2n+1)^4\pi^4}\sin\dfrac{(2n+1)\pi\ln x}{2}=\sin\dfrac{\pi\ln x}{2}$

$C(n)-\dfrac{32(-1)^n}{(2n+1)^4\pi^4}=\begin{cases}1&\text{when}~n=0\\0&\text{otherwise}\end{cases}$

$C(n)=\begin{cases}\dfrac{32}{(2n+1)^4\pi^4}+1&\text{when}~n=0\\\dfrac{32(-1)^n}{(2n+1)^4\pi^4}&\text{otherwise}\end{cases}$

$\therefore u(x,t)=e^{-\frac{\pi^2t}{4}}\sin\dfrac{\pi\ln x}{2}+\sum\limits_{n=0}^\infty\dfrac{32(-1)^n}{(2n+1)^4\pi^4}\left(e^{-\frac{(2n+1)^2\pi^2t}{4}}-1\right)\sin\dfrac{(2n+1)\pi\ln x}{2}$

• In the third line when you plug in the guess into the pde and differential WRT x once, how do you get sine and not cosine? Commented Mar 10, 2015 at 5:50