9.3 problem Exercise 22.3, page 240

Internal problem ID [4125]

Book: Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section: Chapter 4. Higher order linear differential equations. Lesson 22. Variation of Parameters
Problem number: Exercise 22.3, page 240.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

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

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

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

Solution by Mathematica

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

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

\begin{align*} y(x)\to c_1 \cos (x)+\sin (x) \left (2 \tanh ^{-1}\left (\tan \left (\frac {x}{2}\right )\right )+c_2\right )-1 \\ \end{align*}