heat equation with convection and forcing function How can I solve this:
$u_t - x u_x -x^2 u_{xx} = \ln{x}$
$u(x,0) = \sin ((\pi/2) \ln{x})$
$u(1,t) = 0 \quad u_x(e,t)=0$
What I have so far:
Since we have homogenous BC consider no forcing term to get eigenfunctions:
$u_t = x u_x + x^2u_{xx}$
Let $u(x,t) = X(x)T(t)$
$(1) \dot{T}+\lambda^2T=0$
$(2)x^2X''+xX'+\lambda^2X=0$
Solving (2) we get:
$X(x)=Acos(\lambda \ln{x}) + B sin(\lambda ln{x})$
Plugging in BC we find:
$X_n(x)=\sin{(\lambda_n \ln{x})}, \lambda_n = \frac{(2n+1)\pi}{2}, n = 0,1,2,3,... \leftarrow$ this is our eigenfunction
Now I want to expand forcing term in terms of eigenfunction:
$\ln{x} = \sum_{n+1} ^\infty S_n(t) \sin{(\lambda_n \ln{x})}$ where $S_n(t) = \frac{2}{e-1}\int_1 ^e \ln{x} \sin{(\lambda_n \ln{x})} dx$
Ya so I am not sure if the last line is correct. If I could expand ln(x) then I could guess an eigenvalue expansion as the solution for u as well. 
 A: Well I am escaping the part you have already understood. By the eigenfunction expansion method, if we assume
$$u(x,t) = \sum_{n = 1}^{\infty} T_n(t) X_n(x),$$
We substitute the above expansion in the original PDE i.e. $$\frac{1}{x}u_t - (xu_x)_x = \frac{1}{x} \ln{x},$$
Here please note that we don't change the original form of the equation. Now we make use of following:
$$ \int\limits_{1}^{e} \frac{1}{x}\sin{(m \ln{x})}\sin{(n \ln{x})}dx = \frac{1}{2},$$
for $m = n$ and will be zero otherwise. Moreover as you have mentioned the $S_n(t)$ will be given by:
$$S_n(t) = \frac{2}{1-e} \int\limits_{1}\frac{1}{x} \ln{x} \sin{((\frac{2n-1)\pi}{2} \ln{x})},$$
$$\implies S_n(t) = -\frac{8 (-1)^n}{(1-e)(\pi -2 \pi  n)^2} = s_n (say).$$
The differential equations for $T_n(t)$ are:
$$\frac{d T_n}{dt} + \lambda^2 T_n = s_n.$$
Where $\lambda$ represents the eigenvalues.
The initial value $u(x,0)$ suggest that we should have following initial conditions for the ODEs for $T_n(t)$:
$$T_1(0) = 1, T_2(0) = T_3(0) = \cdots = 0.$$
Form here onwards you can handle I guess. If you still have any issues with it please let me know.
A: Hint:
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$
