30.2.8 problem 8

Internal problem ID [7436]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.3, Linear equations. Exercises. page 54
Problem number : 8
Date solved : Tuesday, September 30, 2025 at 04:35:19 PM
CAS classification : [_linear]

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