15.5.12 problem 12

Internal problem ID [2948]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 9, page 38
Problem number : 12
Date solved : Sunday, March 30, 2025 at 01:00:55 AM
CAS classification : [_Bernoulli]

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

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