12.9.7 problem 7

Internal problem ID [1763]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 5 linear second order equations. Section 5.6 Reduction or order. Page 253
Problem number : 7
Date solved : Monday, January 27, 2025 at 05:34:33 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using reduction of order method given that one solution is

\begin{align*} y&={\mathrm e}^{x} \cos \left (x \right ) \end{align*}

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.034 (sec). Leaf size: 26

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