I looked for similar questions and I found this one and this one;
But these two questions are about another method. I want to solve the following problem with Separation of Variables.
$$
\begin{cases}
u_{tt}=u_{xx}\\
u(x,0)=x \\
u_t(x,0)=0 \\
u_x(0,t)=2\sin(t)\\
u_x(\pi,t)=0
\end{cases}
$$
I know how to solve the Homogeneous Wave Equations with Homogeneous B.Cs,
but I have no idea for this problem.
Reply to the comment:
I know I have to write $u(x,t)=X(x)T(t)$, but I don't know how to complete the answer:
$$
u(x,t)=X(x)T(t) \quad\Rightarrow \quad XT''=X''T
$$
$$
\Rightarrow\quad \frac{X''}{X}=\frac{T''}{T}=\lambda \quad \Rightarrow$$
\begin{cases}
X''-\lambda X=0 \\
X'(0)T(t)=2\sin(t)\\
X'(\pi)=0
\end{cases}
Now from the $X'(0)T(t)=2\sin(t)$ what we get?
$$
X'(0)T(t)=2\sin(t) \Longrightarrow T(t)\int X'(x)dx|_{x=0} = \int 2\sin(t)dx$$ $$ \Rightarrow X(x)|_{x=0}T(t)=2x\sin(t)
$$
It looks not to be correct! I mean, is $X(0)=0$ ?