87.6.18 problem 21

Internal problem ID [23335]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 1. Elementary methods. First order differential equations. Exercise at page 53
Problem number : 21
Date solved : Thursday, October 02, 2025 at 09:38:22 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {y-x +1}{3 x -y-1} \end{align*}
Maple. Time used: 0.534 (sec). Leaf size: 58
ode:=diff(y(x),x) = (-x+y(x)+1)/(3*x-y(x)-1); 
dsolve(ode,y(x), singsol=all);
 
\[ -\frac {\ln \left (\frac {-x^{2}-2 x \left (1+y\right )+\left (1+y\right )^{2}}{x^{2}}\right )}{2}-\sqrt {2}\, \operatorname {arctanh}\left (\frac {\left (-x +y+1\right ) \sqrt {2}}{2 x}\right )-\ln \left (x \right )-c_1 = 0 \]
Mathematica. Time used: 0.055 (sec). Leaf size: 75
ode=D[y[x],x]==(-x+y[x]+1)/(3*x-y[x]-1); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [8 \sqrt {2} \text {arctanh}\left (\frac {\sqrt {2} (y(x)-2 x+1)}{-y(x)+3 x-1}\right )+4 \log \left (\frac {-x^2+y(x)^2-2 (x-1) y(x)-2 x+1}{2 x^2}\right )+8 \log (x)+c_1=0,y(x)\right ] \]
Sympy. Time used: 2.988 (sec). Leaf size: 53
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(-x + y(x) + 1)/(3*x - y(x) - 1) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (x \right )} = C_{1} - \log {\left (\frac {\sqrt {\left (-1 + \sqrt {2} + \frac {y{\left (x \right )} + 1}{x}\right )^{1 + \sqrt {2}}}}{\left (- \sqrt {2} - 1 + \frac {y{\left (x \right )} + 1}{x}\right )^{- \frac {1}{2} + \frac {\sqrt {2}}{2}}} \right )} \]