12.5 problem 5

Internal problem ID [11833]

Book: Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section: Chapter 4, Section 4.4. Variation of parameters. Exercises page 162
Problem number: 5.
ODE order: 2.
ODE degree: 1.

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

\[ \boxed {y^{\prime \prime }+4 y=\sec \left (x \right )^{2}} \]

Solution by Maple

Time used: 0.0 (sec). Leaf size: 42

dsolve(diff(y(x),x$2)+4*y(x)=sec(x)^2,y(x), singsol=all)
 

\[ y \left (x \right ) = \left (-2 \cos \left (x \right )^{2}+1\right ) \ln \left (\sec \left (x \right )\right )+2 \cos \left (x \right )^{2} c_{1} +2 \sin \left (x \right ) \left (c_{2} +x \right ) \cos \left (x \right )-\sin \left (x \right )^{2}-c_{1} \]

Solution by Mathematica

Time used: 0.098 (sec). Leaf size: 33

DSolve[y''[x]+4*y[x]==Sec[x]^2,y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to \cos (2 x) (\log (\cos (x))+c_1)+\sin (x) (-\sin (x)+2 (x+c_2) \cos (x)) \]