74.1.53 problem 73

Internal problem ID [15762]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 1. Introduction to Differential Equations. Exercises 1.1, page 10
Problem number : 73
Date solved : Monday, March 31, 2025 at 01:47:28 PM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

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

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