73.7.23 problem 23

Internal problem ID [15102]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 8. Review exercises for part of part II. page 143
Problem number : 23
Date solved : Thursday, March 13, 2025 at 05:39:24 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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

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