20.4.42 problem Problem 60

Internal problem ID [3677]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.8, Change of Variables. page 79
Problem number : Problem 60
Date solved : Sunday, March 30, 2025 at 02:04:53 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {x +2 y-1}{2 x -y+3} \end{align*}

Maple. Time used: 0.013 (sec). Leaf size: 32
ode:=diff(y(x),x) = (x+2*y(x)-1)/(2*x-y(x)+3); 
dsolve(ode,y(x), singsol=all);
 
\[ y = 1+\left (-x -1\right ) \tan \left (\operatorname {RootOf}\left (4 \textit {\_Z} +\ln \left (\sec \left (\textit {\_Z} \right )^{2}\right )+2 \ln \left (x +1\right )+2 c_1 \right )\right ) \]
Mathematica. Time used: 0.068 (sec). Leaf size: 68
ode=D[y[x],x]==(x+2*y[x]-1)/(2*x-y[x]+3); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [32 \arctan \left (\frac {-2 y(x)-x+1}{-y(x)+2 x+3}\right )+8 \log \left (\frac {x^2+y(x)^2-2 y(x)+2 x+2}{5 (x+1)^2}\right )+16 \log (x+1)+5 c_1=0,y(x)\right ] \]
Sympy. Time used: 3.612 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x - 2*y(x) + 1)/(2*x - y(x) + 3) + Derivative(y(x), x),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 )} - 1\right )^{2}}{\left (x + 1\right )^{2}}} \right )} + 2 \operatorname {atan}{\left (\frac {y{\left (x \right )} - 1}{x + 1} \right )} \]