28.2.56 problem 56

Internal problem ID [4499]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 4. Linear Differential Equations. Page 183
Problem number : 56
Date solved : Monday, January 27, 2025 at 09:21:45 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-2 y^{\prime }+y&=\frac {{\mathrm e}^{x}}{x} \end{align*}

Solution by Maple

Time used: 0.007 (sec). Leaf size: 18

dsolve(diff(y(x),x$2)-2*diff(y(x),x)+y(x)=exp(x)/x,y(x), singsol=all)
 
\[ y \left (x \right ) = \left (x \ln \left (x \right )+x \left (c_{1} -1\right )+c_{2} \right ) {\mathrm e}^{x} \]

Solution by Mathematica

Time used: 0.021 (sec). Leaf size: 22

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