20.9.10 problem Problem 10

Internal problem ID [3754]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.7, The Variation of Parameters Method. page 556
Problem number : Problem 10
Date solved : Monday, January 27, 2025 at 07:59:42 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.059 (sec). Leaf size: 91

DSolve[D[y[x],{x,2}]+y[x]==4*Exp[x]*Sec[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to -4 i e^x \operatorname {Hypergeometric2F1}\left (-\frac {i}{2},1,1-\frac {i}{2},-e^{2 i x}\right ) \cos (x)+\left (\frac {8}{5}+\frac {4 i}{5}\right ) e^{(1+2 i) x} \operatorname {Hypergeometric2F1}\left (1,1-\frac {i}{2},2-\frac {i}{2},-e^{2 i x}\right ) \cos (x)+4 e^x \sin (x)+c_1 \cos (x)+c_2 \sin (x) \]