Consider the inhomogeneous linear second-order ode given by

$$\ddot x + p(t) \dot x + q(t) x = g_1(t)+g_2(t).$$

Show that

$$x(t) = x_h(t) + x_{p_1}(t) + x_{p_2}(t)$$

is the general solution, where $$x_h(t)$$ is the general solution to the homogeneous ode, $$x_{p_1}(t)$$ is a particular solution for the inhomogeneous ode with only $$g_1(t)$$ on the right-hand-side, and $$x_{p_2}(t)$$ is a particular solution for the inhomogeneous ode with only $$g_2(t)$$ on the right-hand side.