47.2.37 problem 35

Internal problem ID [7453]
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 : 35
Date solved : Sunday, March 30, 2025 at 12:07:28 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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

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