32.6.14 problem Exercise 12.14, page 103

Internal problem ID [5879]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 12, Miscellaneous Methods
Problem number : Exercise 12.14, page 103
Date solved : Sunday, March 30, 2025 at 10:22:34 AM
CAS classification : [_Bernoulli]

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

Maple. Time used: 0.002 (sec). Leaf size: 18
ode:=x*diff(y(x),x)+y(x) = x^2*(exp(x)+1)*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {1}{\left (x +{\mathrm e}^{x}-c_1 \right ) x} \]
Mathematica. Time used: 0.272 (sec). Leaf size: 55
ode=x*D[y[x],x]+y[x]==x^2*(1+exp[x])*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{-x \int _1^x(\exp (K[1])+1)dK[1]+c_1 x} \\ y(x)\to 0 \\ y(x)\to -\frac {1}{x \int _1^x(\exp (K[1])+1)dK[1]} \\ \end{align*}
Sympy. Time used: 0.277 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*(exp(x) + 1)*y(x)**2 + x*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {1}{x \left (C_{1} + x + e^{x}\right )} \]