38.6.7 problem 7

Internal problem ID [8437]
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 : 7
Date solved : Tuesday, September 30, 2025 at 05:36:45 PM
CAS classification : [_linear]

\begin{align*} x^{2} y^{\prime }+x y&=1 \end{align*}
Maple. Time used: 0.000 (sec). Leaf size: 12
ode:=x^2*diff(y(x),x)+x*y(x) = 1; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\ln \left (x \right )+c_1}{x} \]
Mathematica. Time used: 0.016 (sec). Leaf size: 14
ode=x^2*D[y[x],x]+x*y[x]==1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\log (x)+c_1}{x} \end{align*}
Sympy. Time used: 0.196 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), x) + x*y(x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + \log {\left (x \right )}}{x} \]