41.2.36 problem 34

Internal problem ID [8738]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.2 Homogeneous equations problems. page 12
Problem number : 34
Date solved : Tuesday, September 30, 2025 at 05:47:59 PM
CAS classification : [[_homogeneous, `class C`], _rational]

\begin{align*} y^{\prime }&=\frac {2 \left (y+2\right )^{2}}{\left (x +y+1\right )^{2}} \end{align*}
Maple. Time used: 0.011 (sec). Leaf size: 25
ode:=diff(y(x),x) = 2*(y(x)+2)^2/(x+y(x)+1)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -2-\tan \left (\operatorname {RootOf}\left (-2 \textit {\_Z} +\ln \left (\tan \left (\textit {\_Z} \right )\right )+\ln \left (x -1\right )+c_1 \right )\right ) \left (x -1\right ) \]
Mathematica. Time used: 0.115 (sec). Leaf size: 142
ode=D[y[x],x]==2*((y[x]+2)/(x+y[x]+1))^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{y(x)}\left (\frac {2 (x-1)}{x^2-2 x+K[2]^2+4 K[2]+5}-\int _1^x\left (\frac {2 (K[2]+2) (2 K[2]+4)}{\left (K[1]^2-2 K[1]+K[2]^2+4 K[2]+5\right )^2}-\frac {2}{K[1]^2-2 K[1]+K[2]^2+4 K[2]+5}\right )dK[1]+\frac {1}{K[2]+2}\right )dK[2]+\int _1^x-\frac {2 (y(x)+2)}{K[1]^2-2 K[1]+y(x)^2+4 y(x)+5}dK[1]=c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*(y(x) + 2)**2/(x + y(x) + 1)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out