9.10 problem Problem 10

Internal problem ID [2783]

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.
ODE order: 2.
ODE degree: 1.

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

\[ \boxed {y^{\prime \prime }+y=\sec \left (x \right )+4 \,{\mathrm e}^{x}} \]

Solution by Maple

Time used: 0.0 (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.065 (sec). Leaf size: 91

DSolve[y''[x]+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) \]