47.2.41 problem 39

Internal problem ID [7457]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.2 Homogeneous equations problems. page 12
Problem number : 39
Date solved : Wednesday, March 05, 2025 at 04:38:32 AM
CAS classification : [[_homogeneous, `class C`], _exact, _dAlembert]

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

Maple. Time used: 0.143 (sec). Leaf size: 40
ode:=(diff(y(x),x)+1)*ln((x+y(x))/(x+3)) = (x+y(x))/(x+3); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-x \operatorname {LambertW}\left (\frac {{\mathrm e}^{-1}}{\left (x +3\right ) c_{1}}\right ) c_{1} +1}{\operatorname {LambertW}\left (\frac {{\mathrm e}^{-1}}{\left (x +3\right ) c_{1}}\right ) c_{1}} \]
Mathematica. Time used: 0.241 (sec). Leaf size: 30
ode=(D[y[x],x]+1)*Log[(y[x]+x)/(x+3)]==(y[x]+x)/(x+3); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [-y(x)+(y(x)+x) \log \left (\frac {y(x)+x}{x+3}\right )-x=c_1,y(x)\right ] \]
Sympy. Time used: 3.774 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((Derivative(y(x), x) + 1)*log((x + y(x))/(x + 3)) - (x + y(x))/(x + 3),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x e^{W\left (\frac {e^{C_{1}}}{e \left (x + 3\right )}\right ) + 1} - x + 3 e^{W\left (\frac {e^{C_{1}}}{e \left (x + 3\right )}\right ) + 1} \]