Determining what technique to use to solve a nonhomogeneous second-order PDE $$ 
u_{tt}-u_{xx}=1-x, \space\space\space x \in (0,1)
$$ 
with the following boundary conditions:
$$
u(x,0) = x^2(1-x),
$$
$$
u_{t}(x,0) = 0,
$$
$$
u_{x}(0,t) = 0,
$$
$$
u(1,t) = 0
$$
$u_{tt}$ and $u_{xx}$ are defined respectively as the second partial derivative of $u(x,t)$ with respect to t, and the second partial derivative of $u(x,t)$ with respect to x. My first question is, I see some formulations of the wave equation use a $c^2$ coefficient in front of $u_{xx}$. How does this impact using Duhamel's integral, since that uses a 1/2c term and in my case, c = 0. What does c represent? I suspect there is a change of variables that would allow me to make this equation homogeneous, and possibly even make the boundary conditions homogeneous. I am confused on how to proceed because in every different solution I've found there seem to be extremely varied and exotic methods of solving PDEs of this type and compared to ordinary differential equations I am having trouble seeing the linear progression of these different solution types. Any help on how to proceed would be greatly appreciated.
 A: Hint 1
First of all, get rid of the inhomogeneity. Recall that general solution of inhomogeneous PDE is a superposition of general solution of homogeneous PDE and particular solution of inhomogeneous PDE, so
$$
u = u^h + u^p
$$
where
$$
u^h_{tt}-u^h_{xx} = 0
$$
and
$$
u^p_{tt}-u^p_{xx} = 1 -x
$$
In this particular problem guessing particular solution is quite easy
\begin{align}
u^p &= \frac {t^2}2 - \frac {x^3}6
\end{align}
So, you can reformulate your problem as
$$
u^h_{tt} - u^h_{xx} = 0
$$
with appropriate BCs, where
\begin{align}
u^h &= u - u^p = u - \frac {t^2}2 + \frac {x^3}6 \\
u^h_t &= u_t - t \\
u^h_x &= u_x + \frac {x^2}2
\end{align}
Now you need to find BCs of homogeneous part
\begin{align}
u^h(x,0) &= u(x,0) - u^p(x,0) = x^2-x^3 + \frac {x^3}6 = x^2 \left ( 1 - \frac 56 x\right ) \\
u^h_t(x,0) &= u_t(x,0) - 0 = 0 \\
u^h_x(0,t) &= u_x(0,t) + 0 = 0 \\
u^h(1,t) &= u(1,t) - \frac {t^2}2 + \frac 16 = \frac 16 - \frac {t^2}2
\end{align}
So, now you just need to solve homogeneous wave equation with appropriate boundary and initial conditions.
Hint 2
New problem:
$$
u_{tt} - u_{xx} = 0 \\
\begin{align}
u(x, 0) &= x^2 \left ( 1 - \frac 56 x\right ) \\
u_t(x,0) &= 0 \\
u_x(0,t) &= 0 \\
u(1,t) &= \frac 16 - \frac {t^2}2
\end{align}
$$
Equation above can be solved using separation of variables
$$
u = XT,\quad X = X(x),\ T = T(t) \\
u_{tt} - u_{xx} = XT'' - X''T = 0 \implies \frac {T''}T = \frac {X''}X = -\lambda^2
$$
each function has a solution
$$
T = C_1 \cos \lambda t + C_2 \sin \lambda t \\
X = C_3 \cos \lambda x + C_4 \sin \lambda x
$$
Now, you have $4$ unknowns and $4$ conditions to find those unknowns. Is it bit more clearer now?
