81.3.35 problem 35

Internal problem ID [18574]
Book : A short course on differential equations. By Donald Francis Campbell. Maxmillan company. London. 1907
Section : Chapter III. Ordinary differential equations of the first order and first degree. Exercises at page 33
Problem number : 35
Date solved : Thursday, March 13, 2025 at 12:24:12 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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

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