7.5.6 problem 6

Internal problem ID [110]
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 : 6
Date solved : Saturday, March 29, 2025 at 04:32:02 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.018 (sec). Leaf size: 17
ode:=(x+2*y(x))*diff(y(x),x) = y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x}{2 \operatorname {LambertW}\left (\frac {x \,{\mathrm e}^{\frac {c_1}{2}}}{2}\right )} \]
Mathematica. Time used: 4.619 (sec). Leaf size: 31
ode=(x+2*y[x])*D[y[x],x]==y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {x}{2 W\left (\frac {1}{2} e^{-\frac {c_1}{2}} x\right )} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.612 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + 2*y(x))*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = e^{C_{1} + W\left (\frac {x e^{- C_{1}}}{2}\right )} \]