9.10 problem Problem 10

Internal problem ID [2274]

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]]

Solve \begin {gather*} \boxed {y^{\prime \prime }+y-\sec \relax (x )-4 \,{\mathrm e}^{x}=0} \end {gather*}

Solution by Maple

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

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

\[ y \relax (x ) = \sin \relax (x ) c_{2}+\cos \relax (x ) c_{1}+\sin \relax (x ) x +\cos \relax (x ) \ln \left (\cos \relax (x )\right )+2 \,{\mathrm e}^{x} \]

Solution by Mathematica

Time used: 0.028 (sec). Leaf size: 90

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

\begin{align*} y(x)\to -4 i e^x \, _2F_1\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} \, _2F_1\left (1,1-\frac {i}{2};2-\frac {i}{2};-e^{2 i x}\right ) \cos (x)+c_1 \cos (x)+\left (4 e^x+c_2\right ) \sin (x) \\ \end{align*}