1.3.3.6 \(y^{\prime \prime }+y=\sin \left ( x\right ) \) with one mixed IC \(y\left ( 0\right ) +y\left ( 2\right ) =8\)
Since we have second order ode with only one IC, we expect that there will remain one
constant in the final solution that can not be solved for. The general solution is as
before
\[ y=c_{1}\cos x+c_{2}\sin x+\frac {\sin x}{2}-x\frac {\cos x}{2}\]
Now we evaluate each term in the IC which gives
\begin{align*} y\left ( 0\right ) & =c_{1}\cos \left ( 0\right ) +c_{2}\sin \left ( 0\right ) +\frac {\sin \left ( 0\right ) }{2}-\left ( 0\right ) \frac {\cos \left ( 0\right ) }{2}\\ & =c_{1}\end{align*}
And
\[ y\left ( 2\right ) =c_{1}\cos 2+c_{2}\sin 2+\frac {\sin 2}{2}-2\frac {\cos 2}{2}\]
Hence the IC becomes
\begin{align*} y\left ( 0\right ) +y\left ( 2\right ) & =8\\ c_{1}+c_{1}\cos 2+c_{2}\sin 2+\frac {\sin 2}{2}-2\frac {\cos 2}{2} & =9 \end{align*}
We have one equation and two unknowns. We can solve for \(c_{1}\) in terms of \(c_{2}\) or solve for \(c_{2}\) in
terms of \(c_{1}\). The choice is arbitrary.