49.21.15 problem 5(c)

Internal problem ID [7745]
Book : An introduction to Ordinary Differential Equations. Earl A. Coddington. Dover. NY 1961
Section : Chapter 5. Existence and uniqueness of solutions to first order equations. Page 190
Problem number : 5(c)
Date solved : Wednesday, March 05, 2025 at 04:54:28 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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

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