Partial differential equations problem with boundary conditions I need to solve this problem .
any hint or help will be  appreciated  .
the problem is taken from a past exam .
$\frac{\partial^2 u}{\partial t^2}+2\frac{\partial u}{\partial t}=\frac{\partial^2 u}{\partial x^2} +8u+ 2x(1-4t)+cos(3x) , 0< x< \frac{\pi}{2} $ .
$\frac{\partial u}{\partial x}(0,t)=t$
$u(\frac{\pi}{2},t)=\frac{\pi t}{2}$
$u(x,0)=0$
$\frac{\partial u}{\partial t}(x,0)=x$


*

*i tried separation of variable + super position principle but with no point since the problem is in the boundary condition i don't know how to use .

 A: Regards @Bey . If I may, when using separation of variables, 
$$ u = X(x)T(t) $$
from the boundary and initial conditions, you would be able to get


*

*From $u_{x}(0,t) = t$, then we get
$$  T(t) = \frac{t}{X'(0)}, \:\:\: T(0)=0 $$

*From $u(\frac{\pi}{2},t) = \frac{\pi}{2}t$, we get
$$ X(\pi/2)T(t) = \frac{\pi}{2}t \implies  X'(0) = 2\frac{X(\frac{\pi}{2})}{\pi} $$

*The initial condition implies $T(0)=0$

*From $u_{t}(x,0) = t$, we get
$$ X(x)= \frac{x}{T'(0)} $$
So 
$$  u(x,t) = X(x)T(t) = \frac{xt}{X'(0)T'(0)}=\frac{xt}{C} $$
You would also be able to see that $C=1$.
$$ u = xt $$ 
This solution is true for
$$u_{tt} + 2u_{t} = u_{xx} + 8u + 2x(1-4t) $$

This is a small contribution.. I also wonder how is the $\cos(3x)$ term..
If you put 
$$ u(x,t) = xt + g(t) \cos(3x)$$
then put this to the PDE, then you must find the function $g(t)$ such that
$$ g''(t) \cos(3x) + 2g'(t) \cos(3x) + 9 g(t) \cos(3x) - 8 g(t) \cos(3x) = \cos(3x) $$
which implies that you may solve  $ g''(t) + 2g'(t) + g(t) = 1 $. The PDE initial conditions imply the $g(t)$ initial conditions : 
$$g(0)=g'(0)=0$$
Hope this helps. Regards, Arief
