\documentclass[a4paper,12pt]{article}
\usepackage{epsfig}
\newcommand{\un}{\underline}
\newcommand{\ds}{\displaystyle}
\begin{document}
\parindent=0pt

\begin{center}
\textbf{Ordinary Differential Equations}

\textit{\textbf{Classification}}
\end{center}

\textbf{Question}

If one solution of $y''+k^2y = 0$ is $y_1=\cos (kx)$, guess and verify
a solution $y_2$ that is not a multiple of $y_1$.

Find a solution to satisfy $y(\pi/k)=3$ and $y'(\pi/k)=3$.


\textbf{Answer}

As $y_1=\cos(kx)$ is a solution. A sensible guess for $y_2$ is
$y_2=\sin (kx)$.

Since
$$y_2''+k^2y_2 = -k^2 \sin (kx) + k^2 \sin (kx) =0$$
then $y_2$ is confirmed as a solution.

The DE is linear and homogeneous, so any function of the form
$$y = Ay_1+By_2 = A \cos (kx) + B \sin (kx)$$
is also a solution.

To satisfy the given conditions:
\begin{eqnarray*}
3 & = & y(\pi/k) = A\cos (\pi) + B\sin (\pi) = -A\\
3 & = & y'(\pi/k) = -Ak\sin (\pi) + Bk \cos (\pi) =-Bk
\end{eqnarray*}
and so
\begin{eqnarray*}
A & = & -3\\
B & = & -3/k
\end{eqnarray*}
So the solution is
$$y = -3 \cos(kx) - \frac{3}{k}\sin(kx)$$


\end{document}
