29.9 problem Ex 10

Internal problem ID [10270]

Book: An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section: Chapter VII, Linear differential equations with constant coefficients. Article 52. Summary. Page 117
Problem number: Ex 10.
ODE order: 2.
ODE degree: 1.

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

Solve \begin {gather*} \boxed {y^{\prime \prime }+4 y-\left (\sec ^{2}\relax (x )\right )=0} \end {gather*}

Solution by Maple

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

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

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

Solution by Mathematica

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

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

\begin{align*} y(x)\to \cos (2 x) (\log (\cos (x))+c_1)+\sin (x) (-\sin (x)+2 (x+c_2) \cos (x)) \\ \end{align*}