28.1.55 problem 56

Internal problem ID [4361]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 56
Date solved : Sunday, March 30, 2025 at 03:10:22 AM
CAS classification : [_separable]

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

Maple. Time used: 0.004 (sec). Leaf size: 33
ode:=1-(y(x)-2*x*y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \sqrt {-\ln \left (2 x -1\right )+c_1} \\ y &= -\sqrt {-\ln \left (2 x -1\right )+c_1} \\ \end{align*}
Mathematica. Time used: 0.014 (sec). Leaf size: 45
ode=1-(y[x]-2*x*y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\sqrt {-\log (1-2 x)+2 c_1} \\ y(x)\to \sqrt {-\log (1-2 x)+2 c_1} \\ \end{align*}
Sympy. Time used: 0.455 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((2*x*y(x) - y(x))*Derivative(y(x), x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {C_{1} - \log {\left (2 x - 1 \right )}}, \ y{\left (x \right )} = \sqrt {C_{1} - \log {\left (2 x - 1 \right )}}\right ] \]