18.1.12 problem Problem 14.14

Internal problem ID [3468]
Book : Mathematical methods for physics and engineering, Riley, Hobson, Bence, second edition, 2002
Section : Chapter 14, First order ordinary differential equations. 14.4 Exercises, page 490
Problem number : Problem 14.14
Date solved : Tuesday, March 04, 2025 at 04:41:12 PM
CAS classification : [[_homogeneous, `class C`], [_Abel, `2nd type`, `class C`], _dAlembert]

\begin{align*} y^{\prime }&=\frac {1}{x +2 y+1} \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 21
ode:=diff(y(x),x) = 1/(x+2*y(x)+1); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = -\operatorname {LambertW}\left (-\frac {c_{1} {\mathrm e}^{-\frac {x}{2}-\frac {3}{2}}}{2}\right )-\frac {x}{2}-\frac {3}{2} \]
Mathematica. Time used: 60.048 (sec). Leaf size: 34
ode=D[y[x],x] == 1/(x+2*y[x]+1); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{2} \left (-2 W\left (-\frac {1}{2} c_1 e^{-\frac {x}{2}-\frac {3}{2}}\right )-x-3\right ) \]
Sympy. Time used: 0.859 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - 1/(x + 2*y(x) + 1),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {x}{2} - W\left (C_{1} e^{- \frac {x}{2} - \frac {3}{2}}\right ) - \frac {3}{2} \]