Solving a PDE arising from physics Is there a way to find an analytic solution to the following PDE?
$i \partial _t \psi = - \gamma \partial _x ^2 \psi - c x $cos$(\omega t) \psi $, 
where $\psi (x,t)$ is defined (in $x$) on the interval $[0,L]$, and $\psi (0,t) = \psi (L,t) = 0 $.
 A: Hint for the case of $\gamma,c,\omega\neq0$ :
Let $\psi=e^{\frac{icx\sin(\omega t)}{\omega}}u$ ,
Then $\partial_t\psi=\partial_t\left(e^{\frac{icx\sin(\omega t)}{\omega}}u\right)=e^{\frac{icx\sin(\omega t)}{\omega}}\partial_tu+icx\cos(\omega t)e^{\frac{icx\sin(\omega t)}{\omega}}u$
$\partial_x\psi=\partial_x\left(e^{\frac{icx\sin(\omega t)}{\omega}}u\right)=e^{\frac{icx\sin(\omega t)}{\omega}}\partial_xu+\dfrac{ic\sin(\omega t)}{\omega}e^{\frac{icx\sin(\omega t)}{\omega}}u$
$\partial_x^2\psi=\partial_x\left(e^{\frac{icx\sin(\omega t)}{\omega}}\partial_xu+\dfrac{ic\sin(\omega t)}{\omega}e^{\frac{icx\sin(\omega t)}{\omega}}u\right)=e^{\frac{icx\sin(\omega t)}{\omega}}\partial_x^2u+\dfrac{ic\sin(\omega t)}{\omega}e^{\frac{icx\sin(\omega t)}{\omega}}\partial_xu+\dfrac{ic\sin(\omega t)}{\omega}e^{\frac{icx\sin(\omega t)}{\omega}}\partial_xu+\left(\dfrac{ic\sin(\omega t)}{\omega}\right)^2e^{\frac{icx\sin(\omega t)}{\omega}}u=e^{\frac{icx\sin(\omega t)}{\omega}}\partial_x^2u+\dfrac{2ic\sin(\omega t)}{\omega}e^{\frac{icx\sin(\omega t)}{\omega}}\partial_xu-\dfrac{c^2\sin^2(\omega t)}{\omega^2}e^{\frac{icx\sin(\omega t)}{\omega}}u$
$\therefore i\left(e^{\frac{icx\sin(\omega t)}{\omega}}\partial_tu+icx\cos(\omega t)e^{\frac{icx\sin(\omega t)}{\omega}}u\right)=-\gamma\left(e^{\frac{icx\sin(\omega t)}{\omega}}\partial_x^2u+\dfrac{2ic\sin(\omega t)}{\omega}e^{\frac{icx\sin(\omega t)}{\omega}}\partial_xu-\dfrac{c^2\sin^2(\omega t)}{\omega^2}e^{\frac{icx\sin(\omega t)}{\omega}}u\right)-cx\cos(\omega t)e^{\frac{icx\sin(\omega t)}{\omega}}u$
$ie^{\frac{icx\sin(\omega t)}{\omega}}\partial_tu-cx\cos(\omega t)e^{\frac{icx\sin(\omega t)}{\omega}}u=-\gamma e^{\frac{icx\sin(\omega t)}{\omega}}\partial_x^2u-\dfrac{2ic\gamma\sin(\omega t)}{\omega}e^{\frac{icx\sin(\omega t)}{\omega}}\partial_xu+\dfrac{c^2\gamma\sin^2(\omega t)}{\omega^2}e^{\frac{icx\sin(\omega t)}{\omega}}u-cx\cos(\omega t)e^{\frac{icx\sin(\omega t)}{\omega}}u$
$ie^{\frac{icx\sin(\omega t)}{\omega}}\partial_tu=-\gamma e^{\frac{icx\sin(\omega t)}{\omega}}\partial_x^2u-\dfrac{2ic\gamma\sin(\omega t)}{\omega}e^{\frac{icx\sin(\omega t)}{\omega}}\partial_xu+\dfrac{c^2\gamma\sin^2(\omega t)}{\omega^2}e^{\frac{icx\sin(\omega t)}{\omega}}u$
$\partial_tu=i\gamma\partial_x^2u-\dfrac{2c\gamma\sin(\omega t)}{\omega}\partial_xu-\dfrac{ic^2\gamma\sin^2(\omega t)}{\omega^2}u$
Let $\begin{cases}v=x+\dfrac{2c\gamma\cos(\omega t)}{\omega^2}\\w=t\end{cases}$ ,
Then $\partial_tu=\partial_vu\partial_tv+\partial_wu\partial_tw=-\dfrac{2c\gamma\sin(\omega t)}{\omega}\partial_vu+\partial_wu$
$\partial_xu=\partial_vu\partial_xv+\partial_wu\partial_xw=\partial_vu$
$\partial_x^2u=\partial_x(\partial_vu)=\partial_v(\partial_vu)\partial_xv+\partial_w(\partial_vu)\partial_xw=\partial_v^2u$
$\therefore-\dfrac{2c\gamma\sin(\omega t)}{\omega}\partial_vu+\partial_wu=i\gamma\partial_v^2u-\dfrac{2c\gamma\sin(\omega t)}{\omega}\partial_vu-\dfrac{ic^2\gamma\sin^2(\omega w)}{\omega^2}u$
$\partial_wu=i\gamma\partial_v^2u-\dfrac{ic^2\gamma\sin^2(\omega w)}{\omega^2}u$
Which is separable.
