66.1.21 problem Problem 29

Internal problem ID [13797]
Book : Differential equations and the calculus of variations by L. ElSGOLTS. MIR PUBLISHERS, MOSCOW, Third printing 1977.
Section : Chapter 1, First-Order Differential Equations. Problems page 88
Problem number : Problem 29
Date solved : Monday, March 31, 2025 at 08:12:33 AM
CAS classification : [[_1st_order, _with_linear_symmetries], _rational, _Bernoulli]

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

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