8.23 problem Exercise 21.31, page 231

Internal problem ID [4120]

Book: Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section: Chapter 4. Higher order linear differential equations. Lesson 21. Undetermined Coefficients
Problem number: Exercise 21.31, page 231.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

Solve \begin {gather*} \boxed {y^{\prime \prime }+9 y-8 \cos \relax (x )=0} \end {gather*} With initial conditions \begin {align*} \left [y \left (\frac {\pi }{2}\right ) = -1, y^{\prime }\left (\frac {\pi }{2}\right ) = 1\right ] \end {align*}

Solution by Maple

Time used: 0.016 (sec). Leaf size: 27

dsolve([diff(y(x),x$2)+9*y(x)=8*cos(x),y(1/2*Pi) = -1, D(y)(1/2*Pi) = 1],y(x), singsol=all)
 

\[ y \relax (x ) = 4 \sin \relax (x ) \left (\cos ^{2}\relax (x )\right )-\sin \relax (x )+\frac {8 \left (\cos ^{3}\relax (x )\right )}{3}-\cos \relax (x ) \]

Solution by Mathematica

Time used: 0.008 (sec). Leaf size: 20

DSolve[{y''[x]+9*y[x]==8*Cos[x],{y[Pi/2]==-1,y'[Pi/2]==1}},y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \sin (3 x)+\cos (x)+\frac {2}{3} \cos (3 x) \\ \end{align*}