40.3.15 problem 24 (L)

Internal problem ID [6619]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 5. Equations of first order and first degree (Exact equations). Supplemetary problems. Page 33
Problem number : 24 (L)
Date solved : Sunday, March 30, 2025 at 11:12:35 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} x +y+1-\left (x -y-3\right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.012 (sec). Leaf size: 31
ode:=x+y(x)+1-(x-y(x)-3)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -2-\tan \left (\operatorname {RootOf}\left (2 \textit {\_Z} +\ln \left (\sec \left (\textit {\_Z} \right )^{2}\right )+2 \ln \left (x -1\right )+2 c_1 \right )\right ) \left (x -1\right ) \]
Mathematica. Time used: 0.058 (sec). Leaf size: 58
ode=(x+y[x]+1)-(x-y[x]-3)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [2 \arctan \left (\frac {y(x)+x+1}{y(x)-x+3}\right )+\log \left (\frac {x^2+y(x)^2+4 y(x)-2 x+5}{2 (x-1)^2}\right )+2 \log (x-1)+c_1=0,y(x)\right ] \]
Sympy. Time used: 3.550 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x - (x - y(x) - 3)*Derivative(y(x), x) + y(x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (x - 1 \right )} = C_{1} - \log {\left (\sqrt {1 + \frac {\left (y{\left (x \right )} + 2\right )^{2}}{\left (x - 1\right )^{2}}} \right )} + \operatorname {atan}{\left (\frac {y{\left (x \right )} + 2}{x - 1} \right )} \]