78.1.20 problem 11.d

Internal problem ID [20946]
Book : A FIRST COURSE IN DIFFERENTIAL EQUATIONS FOR SCIENTISTS AND ENGINEERS. By Russell Herman. University of North Carolina Wilmington. LibreText. compiled on 06/09/2025
Section : Chapter 1, First order ODEs. Problems section 1.5
Problem number : 11.d
Date solved : Thursday, October 02, 2025 at 06:49:58 PM
CAS classification : [_Bernoulli]

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