29.28.24 problem 822

Internal problem ID [5405]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 28
Problem number : 822
Date solved : Sunday, March 30, 2025 at 08:10:24 AM
CAS classification : [_quadrature]

\begin{align*} {y^{\prime }}^{2}-\left (4+y^{2}\right ) y^{\prime }+4+y^{2}&=0 \end{align*}

Maple. Time used: 0.042 (sec). Leaf size: 75
ode:=diff(y(x),x)^2-(4+y(x)^2)*diff(y(x),x)+4+y(x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -2 i \\ y &= 2 i \\ x +2 \int _{}^{y}\frac {1}{-\textit {\_a}^{2}+\sqrt {\textit {\_a}^{2} \left (\textit {\_a}^{2}+4\right )}-4}d \textit {\_a} -c_1 &= 0 \\ x -2 \int _{}^{y}\frac {1}{\textit {\_a}^{2}+\sqrt {\textit {\_a}^{2} \left (\textit {\_a}^{2}+4\right )}+4}d \textit {\_a} -c_1 &= 0 \\ \end{align*}
Mathematica. Time used: 0.544 (sec). Leaf size: 73
ode=(D[y[x],x])^2-(4+y[x]^2)*D[y[x],x]+4+y[x]^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {x^2-4 c_1 x-1+4 c_1{}^2}{x-2 c_1} \\ y(x)\to \frac {x^2+4 c_1 x-1+4 c_1{}^2}{x+2 c_1} \\ y(x)\to -2 i \\ y(x)\to 2 i \\ \end{align*}
Sympy. Time used: 3.987 (sec). Leaf size: 51
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-y(x)**2 - 4)*Derivative(y(x), x) + y(x)**2 + Derivative(y(x), x)**2 + 4,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ - 2 \int \limits ^{y{\left (x \right )}} \frac {1}{y^{2} - y \sqrt {y^{2} + 4} + 4}\, dy = C_{1} - x, \ - 2 \int \limits ^{y{\left (x \right )}} \frac {1}{y^{2} + y \sqrt {y^{2} + 4} + 4}\, dy = C_{1} - x\right ] \]