9.7 problem 7

Internal problem ID [1113]

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

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

Solve \begin {gather*} \boxed {y^{\prime \prime }-2 y^{\prime }+2 y-{\mathrm e}^{x} \sec \relax (x )=0} \end {gather*} Given that one solution of the ode is \begin {align*} y_1 &= {\mathrm e}^{x} \cos \relax (x ) \end {align*}

Solution by Maple

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

dsolve([diff(y(x),x$2)-2*diff(y(x),x)+2*y(x)=exp(x)*sec(x),exp(x)*cos(x)],y(x), singsol=all)
 

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

Solution by Mathematica

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

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

\begin{align*} y(x)\to e^x ((x+c_1) \sin (x)+\cos (x) (\log (\cos (x))+c_2)) \\ \end{align*}