38.2.27 problem 27

Internal problem ID [6456]
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 : 27
Date solved : Wednesday, March 05, 2025 at 12:46:01 AM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 22
ode:=x*y(x)*diff(y(x),x)-(1+x)*(-1+y(x))^(1/2) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \frac {\left (-2 y-4\right ) \sqrt {y-1}}{3}+x +c_1 +\ln \left (x \right ) = 0 \]
Mathematica. Time used: 4.628 (sec). Leaf size: 582
ode=x*y[x]*D[y[x],x]-(1+x)*Sqrt[y[x]-1]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{2} \sqrt [3]{9 x^2+3 \sqrt {(x+\log (x)+c_1){}^2 \left (9 x^2+9 \log ^2(x)+18 c_1 x+18 (x+c_1) \log (x)+16+9 c_1{}^2\right )}+9 \log ^2(x)+18 c_1 x+18 (x+c_1) \log (x)+8+9 c_1{}^2}+\frac {2}{\sqrt [3]{9 x^2+3 \sqrt {(x+\log (x)+c_1){}^2 \left (9 x^2+9 \log ^2(x)+18 c_1 x+18 (x+c_1) \log (x)+16+9 c_1{}^2\right )}+9 \log ^2(x)+18 c_1 x+18 (x+c_1) \log (x)+8+9 c_1{}^2}}-1 \\ y(x)\to \frac {1}{4} i \left (\sqrt {3}+i\right ) \sqrt [3]{9 x^2+3 \sqrt {(x+\log (x)+c_1){}^2 \left (9 x^2+9 \log ^2(x)+18 c_1 x+18 (x+c_1) \log (x)+16+9 c_1{}^2\right )}+9 \log ^2(x)+18 c_1 x+18 (x+c_1) \log (x)+8+9 c_1{}^2}+\frac {-1-i \sqrt {3}}{\sqrt [3]{9 x^2+3 \sqrt {(x+\log (x)+c_1){}^2 \left (9 x^2+9 \log ^2(x)+18 c_1 x+18 (x+c_1) \log (x)+16+9 c_1{}^2\right )}+9 \log ^2(x)+18 c_1 x+18 (x+c_1) \log (x)+8+9 c_1{}^2}}-1 \\ y(x)\to -\frac {1}{4} i \left (\sqrt {3}-i\right ) \sqrt [3]{9 x^2+3 \sqrt {(x+\log (x)+c_1){}^2 \left (9 x^2+9 \log ^2(x)+18 c_1 x+18 (x+c_1) \log (x)+16+9 c_1{}^2\right )}+9 \log ^2(x)+18 c_1 x+18 (x+c_1) \log (x)+8+9 c_1{}^2}+\frac {-1+i \sqrt {3}}{\sqrt [3]{9 x^2+3 \sqrt {(x+\log (x)+c_1){}^2 \left (9 x^2+9 \log ^2(x)+18 c_1 x+18 (x+c_1) \log (x)+16+9 c_1{}^2\right )}+9 \log ^2(x)+18 c_1 x+18 (x+c_1) \log (x)+8+9 c_1{}^2}}-1 \\ y(x)\to 1 \\ \end{align*}
Sympy. Time used: 0.514 (sec). Leaf size: 66
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x)*Derivative(y(x), x) - (x + 1)*sqrt(y(x) - 1),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \begin {cases} \frac {2 \sqrt {y{\left (x \right )} - 1} y{\left (x \right )}}{3} + \frac {4 \sqrt {y{\left (x \right )} - 1}}{3} & \text {for}\: \left |{y{\left (x \right )}}\right | > 1 \\\frac {2 i \sqrt {1 - y{\left (x \right )}} y{\left (x \right )}}{3} + \frac {4 i \sqrt {1 - y{\left (x \right )}}}{3} & \text {otherwise} \end {cases} = C_{1} + x + \log {\left (x \right )} \]