73.2.4 problem 3.4 d

Internal problem ID [14956]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 3. Some basics about First order equations. Additional exercises. page 63
Problem number : 3.4 d
Date solved : Monday, March 31, 2025 at 01:08:47 PM
CAS classification : [_separable]

\begin{align*} x^{2} y^{\prime }+x y^{2}&=x \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 9
ode:=x^2*diff(y(x),x)+x*y(x)^2 = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \tanh \left (\ln \left (x \right )+c_1 \right ) \]
Mathematica. Time used: 0.543 (sec). Leaf size: 45
ode=x^2*D[y[x],x]+x*y[x]^2==x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{(K[1]-1) (K[1]+1)}dK[1]\&\right ][-\log (x)+c_1] \\ y(x)\to -1 \\ y(x)\to 1 \\ \end{align*}
Sympy. Time used: 0.341 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), x) + x*y(x)**2 - x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + x^{2}}{- C_{1} + x^{2}} \]