74.1.52 problem 72

Internal problem ID [15761]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 1. Introduction to Differential Equations. Exercises 1.1, page 10
Problem number : 72
Date solved : Monday, March 31, 2025 at 01:47:24 PM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=\frac {\left (x -4\right ) y^{3}}{x^{3} \left (y-2\right )} \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 76
ode:=diff(y(x),x) = (-4+x)*y(x)^3/x^3/(y(x)-2); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -\frac {\left (x +\sqrt {8+\left (4 c_1 +1\right ) x^{2}-4 x}\right ) x}{2 c_1 \,x^{2}-2 x +4} \\ y &= \frac {\left (-x +\sqrt {8+\left (4 c_1 +1\right ) x^{2}-4 x}\right ) x}{2 c_1 \,x^{2}-2 x +4} \\ \end{align*}
Mathematica. Time used: 0.916 (sec). Leaf size: 91
ode=D[y[x],x]==(x-4)*y[x]^3/(x^3*(y[x]-2)); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {x \left (-x+\sqrt {x^2+4 c_1 x^2-4 x+8}\right )}{2 c_1 x^2-2 x+4} \\ y(x)\to -\frac {x \left (x+\sqrt {x^2+4 c_1 x^2-4 x+8}\right )}{2 c_1 x^2-2 x+4} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.666 (sec). Leaf size: 73
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (x - 4)*y(x)**3/(x**3*(y(x) - 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {x \left (- x - \sqrt {4 C_{1} x^{2} + x^{2} - 4 x + 8}\right )}{2 \left (C_{1} x^{2} - x + 2\right )}, \ y{\left (x \right )} = \frac {x \left (- x + \sqrt {4 C_{1} x^{2} + x^{2} - 4 x + 8}\right )}{2 \left (C_{1} x^{2} - x + 2\right )}\right ] \]