75.12.35 problem 309

Internal problem ID [16822]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 12. Miscellaneous problems. Exercises page 93
Problem number : 309
Date solved : Thursday, March 13, 2025 at 08:52:22 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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

With initial conditions

\begin{align*} y \left (1\right )&=2 \end{align*}

Maple. Time used: 0.381 (sec). Leaf size: 20
ode:=x+y(x)+1+(2*x+2*y(x)-1)*diff(y(x),x) = 0; 
ic:=y(1) = 2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -x +\frac {3 \operatorname {LambertW}\left (\frac {2 \,{\mathrm e}^{\frac {x}{3}+\frac {1}{3}}}{3}\right )}{2}+2 \]
Mathematica. Time used: 3.633 (sec). Leaf size: 28
ode=(x+y[x]+1)+(2*x+2*y[x]-1)*D[y[x],x]==0; 
ic={y[1]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {3}{2} W\left (\frac {2}{3} e^{\frac {x+1}{3}}\right )-x+2 \]
Sympy. Time used: 3.093 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x + (2*x + 2*y(x) - 1)*Derivative(y(x), x) + y(x) + 1,0) 
ics = {y(1): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - x + \frac {3 W\left (\frac {\sqrt [3]{- e^{x}} \left (1 - \sqrt {3} i\right ) e^{\frac {1}{3}}}{3}\right )}{2} + 2 \]