12.10.4 problem 4

Internal problem ID [1808]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 5 linear second order equations. Section 5.7 Variation of Parameters. Page 262
Problem number : 4
Date solved : Monday, January 27, 2025 at 05:35:37 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

dsolve(diff(y(x),x$2)-2*diff(y(x),x)+2*y(x)=3*exp(x)*sec(x),y(x), singsol=all)
 
\[ y = 3 \left (-\cos \left (x \right ) \ln \left (\sec \left (x \right )\right )+\frac {\cos \left (x \right ) c_1}{3}+\sin \left (x \right ) \left (x +\frac {c_2}{3}\right )\right ) {\mathrm e}^{x} \]

Solution by Mathematica

Time used: 0.035 (sec). Leaf size: 30

DSolve[D[y[x],{x,2}]-2*D[y[x],x]+2*y[x]==3*Exp[x]*Sec[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to e^x ((3 x+c_1) \sin (x)+\cos (x) (3 \log (\cos (x))+c_2)) \]