15.8.12 problem 12

Internal problem ID [3015]
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 : 12
Date solved : Tuesday, March 04, 2025 at 03:44:17 PM
CAS classification : [_separable]

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

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