39.4.2 problem Problem 12.10

Internal problem ID [6536]
Book : Schaums Outline Differential Equations, 4th edition. Bronson and Costa. McGraw Hill 2014
Section : Chapter 12. VARIATION OF PARAMETERS. Supplementary Problems. page 109
Problem number : Problem 12.10
Date solved : Monday, January 27, 2025 at 02:11:47 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.002 (sec). Leaf size: 22

dsolve(diff(y(x),x$2)+y(x)=sec(x),y(x), singsol=all)
 
\[ y = -\ln \left (\sec \left (x \right )\right ) \cos \left (x \right )+\cos \left (x \right ) c_1 +\sin \left (x \right ) \left (x +c_2 \right ) \]

Solution by Mathematica

Time used: 0.021 (sec). Leaf size: 22

DSolve[D[y[x],{x,2}]+y[x]==Sec[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to (x+c_2) \sin (x)+\cos (x) (\log (\cos (x))+c_1) \]