31.6.21 problem 21

Internal problem ID [5770]
Book : Differential Equations, By George Boole F.R.S. 1865
Section : Chapter 7
Problem number : 21
Date solved : Sunday, March 30, 2025 at 10:14:10 AM
CAS classification : [_separable]

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

Maple. Time used: 0.041 (sec). Leaf size: 19
ode:=(y(x)-x*diff(y(x),x))/(y(x)^2+diff(y(x),x)) = (y(x)-x*diff(y(x),x))/(1+x^2*diff(y(x),x)); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= c_1 x \\ y &= -\tanh \left (-\operatorname {arctanh}\left (x \right )+c_1 \right ) \\ \end{align*}
Mathematica. Time used: 60.137 (sec). Leaf size: 45
ode=(y[x]-x*D[y[x],x])/(y[x]^2+D[y[x],x])==(y[x]-x*D[y[x],x])/(1+x^2*D[y[x],x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {x+e^{2 c_1} (x-1)+1}{-x+e^{2 c_1} (x-1)-1} \\ y(x)\to c_1 x \\ \end{align*}
Sympy. Time used: 0.591 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x*Derivative(y(x), x) + y(x))/(y(x)**2 + Derivative(y(x), x)) - (-x*Derivative(y(x), x) + y(x))/(x**2*Derivative(y(x), x) + 1),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = C_{1} x, \ y{\left (x \right )} = \frac {C_{1} x - C_{1} + x + 1}{- C_{1} x + C_{1} + x + 1}\right ] \]