38.2.18 problem 18

Internal problem ID [6447]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 24. First order differential equations. Further problems 24. page 1068
Problem number : 18
Date solved : Wednesday, March 05, 2025 at 12:45:10 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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

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