15.8.50 problem 53

Internal problem ID [3053]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 12, page 46
Problem number : 53
Date solved : Sunday, March 30, 2025 at 01:14:32 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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

With initial conditions

\begin{align*} y \left (0\right )&=2 \end{align*}

Maple. Time used: 0.266 (sec). Leaf size: 20
ode:=x-2*y(x)+3 = (x-2*y(x)+1)*diff(y(x),x); 
ic:=y(0) = 2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {5}{2}+\frac {x}{2}+2 \operatorname {LambertW}\left (-\frac {{\mathrm e}^{\frac {x}{4}-\frac {1}{4}}}{4}\right ) \]
Mathematica. Time used: 4.11 (sec). Leaf size: 28
ode=(x-2*y[x]+3)==(x-2*y[x]+1)*D[y[x],x]; 
ic={y[0]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{2} \left (4 W\left (-\frac {1}{4} e^{\frac {x-1}{4}}\right )+x+5\right ) \]
Sympy. Time used: 3.497 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x - (x - 2*y(x) + 1)*Derivative(y(x), x) - 2*y(x) + 3,0) 
ics = {y(0): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x}{2} + 2 W\left (- \frac {\sqrt [4]{e^{x}}}{4 e^{\frac {1}{4}}}\right ) + \frac {5}{2} \]