23.1.612 problem 606

Internal problem ID [5219]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 606
Date solved : Tuesday, September 30, 2025 at 11:56:16 AM
CAS classification : [[_1st_order, _with_linear_symmetries], _rational]

\begin{align*} \left (1-x^{2}+y^{2}\right ) y^{\prime }&=1+x^{2}-y^{2} \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 28
ode:=(1-x^2+y(x)^2)*diff(y(x),x) = 1+x^2-y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y^{2}+2 x y+x^{2}+2 \ln \left (-x +y\right )-c_1 = 0 \]
Mathematica. Time used: 0.24 (sec). Leaf size: 25
ode=(1-x^2+y[x]^2)*D[y[x],x]==1+x^2-y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [e^{\frac {1}{2} (y(x)+x)^2} (x-y(x))=c_1,y(x)\right ] \]
Sympy. Time used: 3.712 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + (-x**2 + y(x)**2 + 1)*Derivative(y(x), x) + y(x)**2 - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + \frac {\left (x + y{\left (x \right )}\right )^{2}}{4} + \frac {\log {\left (x - y{\left (x \right )} \right )}}{2} = 0 \]