28.1.122 problem 145

Internal problem ID [4428]
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 : 145
Date solved : Sunday, March 30, 2025 at 03:21:40 AM
CAS classification : [[_1st_order, _with_linear_symmetries]]

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

Maple. Time used: 0.020 (sec). Leaf size: 27
ode:=y(x)+2*y(x)^3*diff(y(x),x) = (x+4*y(x)*ln(y(x)))*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\operatorname {RootOf}\left (2 \textit {\_Z}^{2} {\mathrm e}^{\textit {\_Z}}-{\mathrm e}^{3 \textit {\_Z}}+c_1 \,{\mathrm e}^{\textit {\_Z}}-x \right )} \]
Mathematica. Time used: 0.169 (sec). Leaf size: 28
ode=y[x]+2*y[x]^3*D[y[x],x]==(x+4*y[x]*Log[y[x]])*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=y(x) \left (2 \log ^2(y(x))-y(x)^2\right )+c_1 y(x),y(x)\right ] \]
Sympy. Time used: 0.870 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x - 4*y(x)*log(y(x)))*Derivative(y(x), x) + 2*y(x)**3*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + \frac {x}{y{\left (x \right )}} + y^{2}{\left (x \right )} - 2 \log {\left (y{\left (x \right )} \right )}^{2} = 0 \]