\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}

Show that $y=x$ is a solution of $y''+y=x$.

Find a solution $y$ to satisfy $y(\pi)=1$ and $y'(\pi)=0$.


\textbf{Answer}

If $y=y_1(x)=x$ then this will give $y_1'=1$ and $y_1''=0$.
Thus $$y_1''+y_1 = 0 + x.$$

$y_2=A\cos x + B\sin x$ is a solution of $y''+y=0$ and so
$$y=y_1(x)+y_2(x) = x+ A\cos x + B\sin x$$
is also a solution.

The solution will satisfy
\begin{eqnarray*}
1 & = & y(\pi) = \pi - A\\
0 & = & y'(\pi)= 1-B
\end{eqnarray*}
if $A$ and $B$ take the values
\begin{eqnarray*}
A & = & \pi-1 \\
B & = & 1
\end{eqnarray*}
So the solution is
$$y=x+(\pi-1)\cos x +\sin x$$


\end{document}
