77.1.13 problem 27 (page 32)

Internal problem ID [17824]
Book : V.V. Stepanov, A course of differential equations (in Russian), GIFML. Moscow (1958)
Section : All content
Problem number : 27 (page 32)
Date solved : Thursday, March 13, 2025 at 10:58:20 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.086 (sec). Leaf size: 21
ode:=(x+2*y(x)+1)*diff(y(x),x) = 2*x+4*y(x)+3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {x}{2}-\frac {\operatorname {LambertW}\left (-\frac {c_{1} {\mathrm e}^{-\frac {7}{2}-\frac {25 x}{2}}}{2}\right )}{5}-\frac {7}{10} \]
Mathematica. Time used: 4.075 (sec). Leaf size: 43
ode=(x+2*y[x]+1)*D[y[x],x]==2*x+4*y[x]+3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{10} \left (-2 W\left (-e^{-\frac {25 x}{2}-1+c_1}\right )-5 x-7\right ) \\ y(x)\to \frac {1}{10} (-5 x-7) \\ \end{align*}
Sympy. Time used: 1.590 (sec). Leaf size: 63
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x + (x + 2*y(x) + 1)*Derivative(y(x), x) - 4*y(x) - 3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \frac {x}{2} - \frac {W\left (- \frac {\sqrt {C_{1} e^{- 25 x}}}{10 e^{\frac {7}{2}}}\right )}{5} - \frac {7}{10}, \ y{\left (x \right )} = - \frac {x}{2} - \frac {W\left (\frac {\sqrt {C_{1} e^{- 25 x}}}{10 e^{\frac {7}{2}}}\right )}{5} - \frac {7}{10}\right ] \]