64.12.5 problem 5

Internal problem ID [13509]
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
Date solved : Tuesday, January 28, 2025 at 05:50:19 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 y&=\sec \left (x \right )^{2} \end{align*}

Solution by Maple

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

dsolve(diff(y(x),x$2)+4*y(x)=sec(x)^2,y(x), singsol=all)
 
\[ y = \left (-2 \cos \left (x \right )^{2}+1\right ) \ln \left (\sec \left (x \right )\right )+2 c_{1} \cos \left (x \right )^{2}+2 \sin \left (x \right ) \left (x +c_{2} \right ) \cos \left (x \right )-\sin \left (x \right )^{2}-c_{1} \]

Solution by Mathematica

Time used: 0.070 (sec). Leaf size: 49

DSolve[D[y[x],{x,2}]+4*y[x]==Sec[x]^2,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \sin (2 x) \int _1^x\frac {1}{2} \left (1-\tan ^2(K[1])\right )dK[1]+c_2 \sin (2 x)+\cos (2 x) (\log (\cos (x))+c_1) \]