38.6.13 problem 13

Internal problem ID [8443]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 2. First order differential equations. Section 2.3 Linear equations. Exercises 2.3 at page 63
Problem number : 13
Date solved : Tuesday, September 30, 2025 at 05:36:54 PM
CAS classification : [_linear]

\begin{align*} x^{2} y^{\prime }+x \left (x +2\right ) y&={\mathrm e}^{x} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 19
ode:=x^2*diff(y(x),x)+x*(x+2)*y(x) = exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{-x} c_1 +\frac {{\mathrm e}^{x}}{2}}{x^{2}} \]
Mathematica. Time used: 0.058 (sec). Leaf size: 27
ode=x^2*D[y[x],x]+x*(x+2)*y[x]==Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {e^x+2 c_1 e^{-x-2}}{2 x^2} \end{align*}
Sympy. Time used: 0.197 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), x) + x*(x + 2)*y(x) - exp(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} e^{- x} + \frac {e^{x}}{2}}{x^{2}} \]