56.4.3 problem Ex 3

Internal problem ID [14096]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter 2, differential equations of the first order and the first degree. Article 11. Equations in which M and N are linear but not homogeneous. Page 16
Problem number : Ex 3
Date solved : Thursday, October 02, 2025 at 09:13:21 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} 2 x +y-\left (4 x +2 y-1\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.025 (sec). Leaf size: 23
ode:=2*x+y(x)-(4*x+2*y(x)-1)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {\operatorname {LambertW}\left (-2 \,{\mathrm e}^{4-25 x +25 c_1}\right )}{10}+\frac {2}{5}-2 x \]
Mathematica. Time used: 2.236 (sec). Leaf size: 39
ode=(2*x+y[x])-(4*x+2*y[x]-1)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {1}{10} W\left (-e^{-25 x-1+c_1}\right )-2 x+\frac {2}{5}\\ y(x)&\to \frac {2}{5}-2 x \end{align*}
Sympy. Time used: 0.622 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x - (4*x + 2*y(x) - 1)*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - 2 x - \frac {W\left (C_{1} e^{4 - 25 x}\right )}{10} + \frac {2}{5} \]