28.2.54 problem 54

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

\begin{align*} y^{\prime \prime }-y&=\frac {1}{x}-\frac {2}{x^{3}} \end{align*}

Solution by Maple

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

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

Solution by Mathematica

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

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