Variation of parameters exercise -- harmonic motion I am self-studying differential equations using MIT's publicly available materials.     One of the assignments asks us to show that the general solution of the inhomogeneous DE $y'' + k^2y = R(x)$ is given by
    \begin{align}
 y & = \frac{1}{k}\left[\int_a^t\sin k(x - t)R(t)dt\right] + c_1\sin kx + c_2 \cos kx.
 \end{align}
(The problem, like many of those assigned in the course, comes from Birkhoff and Rota.)  
It is clear that a basis of solutions to the corresponding homogeneous equation is given by $\cos kx$ and $\sin kx$.  So the general solution is given by
\begin{align}
y = y_p + c_1\sin kx + c_2\cos kx
\end{align}
where $y_p$ is a particular solution of the inhomogenous equation.  Thus we are to establish that $y_p = \frac{1}{k}\left[\int_a^t\sin k(x - t)R(t)dt\right].$
The Wronskian of our basis of solutions is $k$.  So by variation of parameters, we obtain
\begin{align}
 y_p & = \cos kx\int_a^x\frac{-R(t)\sin kt}{k}dt + \sin kx\int_a^x\frac{R(t)\cos kt}{k}dt\\
 & = \frac{1}{k}\left[\cos kx \int_a^x -R(t)\sin ktdt + \sin kx\int_a^xR(t)\cos ktdt\right]
\end{align}
which is where I get stuck.  I have two questions:
1)  What's up with the limits of integration in the purported solution?  As far as I know, it doesn't make a lot of sense to integrate with respect to $t$ while $t$ is also a limit of integration.
2)  Assuming the preceding is a typical Birkhoffian/Rotarian typo, how would one move from from 
\begin{align}
\frac{1}{k}\left[\cos kx \int_a^x -R(t)\sin ktdt + \sin kx\int_a^xR(t)\cos ktdt\right]
\end{align}
to something that in some way resembles
\begin{align}
\frac{1}{k}\left[\int_a^t\sin k(x - t)R(t)dt\right]?
\end{align}
I had thought of applying integration by parts to the first expression in hopes that I could take advantage of the Pythagorean identity to obtain some helpful simplification, but no dice.
Any help would be appreciated.
 A: You actually have it, it's just a matter of simplifying some trig. Starting from the integral expression you gave, we have
$$
\begin{align*}
y_p 
&= \frac{1}{k} \left[
\cos k x \int_a^x -R(t) \sin k t \, dt + \sin k x \int_a^x R(t) \cos k t \, dt
\right] \\
&= \frac{1}{k} \int_a^x \left( \sin k x \cos k t - \cos k x \sin k t\right) R(t) \,dt \\
&= \frac{1}{k} \int_a^x \sin k(x-t) \, R(t)\, dt,
\end{align*}
$$
where in the last step we use the fact that $\sin A \cos B - \cos A \sin B = \sin (A - B)$.
To answer your former question, having an integration limit of $t$ while integrating over $t$ is a shorthand notation that pops up fairly often. If we have some function $f(t)$ that we are integrating over, we might define something like $F(t) = \int_a^t f(t')\, dt'$, where the primes are used to differentiate the integration limit and the variable of integration. Many authors simply don't write the primes and instead would write $F(t) = \int_a^t f(t)\,dt$. It's just a notational convenience. That said, I do think you're correct that they meant for the upper integration limit to be an $x$ and not a $t$ in this case.
