7.5.57 problem 57

Internal problem ID [161]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.6 (substitution and exact equations). Problems at page 72
Problem number : 57
Date solved : Saturday, March 29, 2025 at 04:37:30 PM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(x)*y+H(x)]`]]

\begin{align*} y^{\prime }+p \left (x \right ) y&=q \left (x \right ) y \ln \left (y\right ) \end{align*}

Maple. Time used: 0.065 (sec). Leaf size: 27
ode:=diff(y(x),x)+p(x)*y(x) = q(x)*y(x)*ln(y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\left (-\int p \left (x \right ) {\mathrm e}^{-\int q \left (x \right )d x}d x +c_1 \right ) {\mathrm e}^{\int q \left (x \right )d x}} \]
Mathematica. Time used: 0.193 (sec). Leaf size: 104
ode=D[y[x],x]+p[x]*y[x]==q[x]*(y[x]*Log[y[x]]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^x-\exp \left (-\int _1^{K[2]}q(K[1])dK[1]\right ) (p(K[2])-\log (y(x)) q(K[2]))dK[2]+\int _1^{y(x)}\left (-\int _1^x\frac {\exp \left (-\int _1^{K[2]}q(K[1])dK[1]\right ) q(K[2])}{K[3]}dK[2]-\frac {\exp \left (-\int _1^xq(K[1])dK[1]\right )}{K[3]}\right )dK[3]=c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
p = Function("p") 
q = Function("q") 
ode = Eq(p(x)*y(x) - q(x)*y(x)*log(y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(-p(x) + q(x)*log(y(x)))*y(x) + Derivative(y(x), x) cannot be solved by the factorable group method