47.1.15 problem 15

Internal problem ID [7396]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.1 Separable equations problems. page 7
Problem number : 15
Date solved : Sunday, March 30, 2025 at 11:56:45 AM
CAS classification : [_separable]

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

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