First, recognize that this is a second-order linear differential equation with constant coefficients. Start by finding the complementary function (solution to the homogeneous equation) by solving the auxiliary equation $m^2 + a^2 = 0$.
The particular integral using the variation of parameters is
\[
y_{\mathrm{PI} }(x) = u(x) f(x) + v(x) g(x),
\]
where $f$ and $g$ are the two functions obtained from the complementary function. Also,
\begin{align*}
u(x) = -\int \frac{g(x) \csc x }{W(f,g)}\mathrm{d} x \quad \text{ and } \quad v(x) = \int \frac{f(x) \csc x}{W(f,g)} \mathrm{d} x,
\end{align*}
where $W(f,g)$ is the Wronskian of $f$ and $g$.
Solution: The given differential equation is
\begin{equation}\label{eq:07Mar2025-1}
\frac{\mathrm{d}^2y}{\mathrm{d}x^2} + a^2 y = \csc 3x.
\end{equation}
The corresponding auxiliary equation will be
\[
m^2 + a^2 = 0 \implies m = \pm a \iota.
\]
Thus, the complementary function will be
\[
y_{\mathrm{cf}}(x) = c_1 \cos(ax) + c_2 \sin(ax).
\]
Now, we will use the method of variation of parameters to find a particular solution. Let us write $f(x) = \cos ax$ and $g(x) = \sin ax$. The particular integral will be
\begin{equation}\label{eq:07Mar2025-2}
y_{\mathrm{PI} }(x) = u(x) \cos (ax) + v(x) \sin (ax),
\end{equation}
where
\begin{align*}
u(x) = -\int \frac{g(x) \csc x }{W(f,g)}\mathrm{d} x \quad \text{ and } \quad v(x) = \int \frac{f(x) \csc x}{W(f,g)} \mathrm{d} x,
\end{align*}
where $W(f,g)$ is the Wronskian of the functions $f$ and $g$ which is
\[
W(f,g) = \begin{vmatrix}
f(x) & g(x) \\
f'(x) & g'(x) \\
\end{vmatrix} = \begin{vmatrix}
\cos ax & \sin ax \\
-a\sin ax & a \cos ax \\
\end{vmatrix} = a.
\]