22.1.15 problem 15

Internal problem ID [4321]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 15
Date solved : Tuesday, September 30, 2025 at 07:18:00 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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