38.6.20 problem 20

Internal problem ID [8450]
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 : 20
Date solved : Tuesday, September 30, 2025 at 05:37:12 PM
CAS classification : [_linear]

\begin{align*} \left (x +2\right )^{2} y^{\prime }&=5-8 y-4 x y \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 19
ode:=(x+2)^2*diff(y(x),x) = 5-8*y(x)-4*x*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\frac {5 \left (x +2\right )^{3}}{3}+c_1}{\left (x +2\right )^{4}} \]
Mathematica. Time used: 0.021 (sec). Leaf size: 32
ode=(x+2)^2*D[y[x],x]==5-8*y[x]-4*x*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {5 x^3+30 x^2+60 x+3 c_1}{3 (x+2)^4} \end{align*}
Sympy. Time used: 0.243 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*x*y(x) + (x + 2)**2*Derivative(y(x), x) + 8*y(x) - 5,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + \frac {5 x^{3}}{3} + 10 x^{2} + 20 x}{x^{4} + 8 x^{3} + 24 x^{2} + 32 x + 16} \]