# inhomogenous wave equation with initial value; PDE

Find the general solution of the inhomogeneous wave equation $$u_{tt} − c^2u_{xx} = \sin t$$ What is the solution to the initial-value problem for this equation with $$u(x, 0) = 0$$ and $$u_t(x, 0) = 1$$?

I know that the general solution to the homogenous equation is $$u(x,t) = f(x+ct) + g(x-ct)$$ and I know how to solve the initial value problem from there. It's the inhomogenous part of this equation that is confusing me.

• Consider $u(x,t) = v(x,t) + 2 t - \sin(t)$ to obtain a much simpler initial value problem for $v$. – Christoph Jan 30 at 4:15

First, observe that a particular solution is $$u_p(t) = -\sin t$$.

Then, find the remaining homogeneous solution $$v(x,t)$$ such that $$u = u_p + v$$. This gives the BVP

$$\begin{cases} v_{tt} - c^2 v_{xx} = 0 \\ v(x,0) = u(x,0) - u_p(0) = 0 \\ v_t(x,0) = u_t(x,0) - u_p'(0) = 2 \end{cases}$$

d'Alembert's formula gives

$$v(x,t) = \frac{1}{2c}\int_{x-ct}^{x+ct} 2 ds = \frac{1}{c}\big[(x+ct) - (x-ct) \big] = \frac{2ct}{c} = 2t$$

• That particular solution does not agree with the initial condition of du/dt(x,0) = 1. Your particular solution gives -1 – meff11 Feb 1 at 16:39
• @meff11 It doesn't have to! The particular solution only needs to satisfy the inhomogeneous equation. The initial condition is corrected by the remaining homogeneous solution. See my notes on $v(x,t)$ – Dylan Feb 1 at 16:56
• makes sense thanks! also, when I do d'Alembert's formula I keep getting t not 2t. Am I missing something? or could you show your calculations? thanks – meff11 Feb 1 at 17:10
• @meff11 No problem. I added the calculation. – Dylan Feb 1 at 17:45

$$u_{tt} − c^2u_{xx} = \sin t$$ You know that the general solution to the homogenous equation is $$u(x,t) = f(x+ct) + g(x-ct)$$

Then you have to find a particular solution of the inhomogeneous equation (any one). Only by inspection it is easy to see that $$u_p=-\sin(t)$$ is a solution.

If you don't see it, try any fonction of $$t$$ only, that is on the form $$u_p(t)$$. So, you solve the ODE $$u_p''(t)=\sin(t)$$ . No need for all solutions. Any one among them is sufficient, for example $$u_p=-\sin(t)$$ .

Thus the general solution of the PDE is : $$u(x,t)=f(x+ct)+g(x-ct)-\sin(t)$$ $$u_t=cf'(x+ct)-cg'(x-ct)-\cos(t)$$

Conditions :

$$\begin{cases} u(x,0)=f(x)+g(x)=0\quad\implies\quad g(x)=-f(x) \\ u-t(x,0)=cf'(x)-cg'(x)-1=1 \quad\implies\quad 2cf'(x)=2 \end{cases}$$

Integrating the second equation leads to $$\quad f(x)=\frac{x}{c}+C \quad$$ and $$\quad g(x)=-\frac{x}{c}-C$$ .

Putting them into the above general solution gives : $$u(x,t)=(\frac{x+ct}{c}+C)+(-\frac{x-ct}{c}-C)-\sin(t)$$ Finally, after simplification the solution is : $$u(x,t)=2t-\sin(t)$$