12.5.52 problem 51

Internal problem ID [1676]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Transformation of Nonlinear Equations into Separable Equations. Section 2.4 Page 68
Problem number : 51
Date solved : Saturday, March 29, 2025 at 11:26:39 PM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(y)]`], [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.005 (sec). Leaf size: 46
ode:=(y(x)+exp(x^2))*diff(y(x),x) = 2*x*(y(x)^2+y(x)*exp(x^2)+exp(2*x^2)); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -\left (1+\sqrt {2 x^{2}-2 c_1 +1}\right ) {\mathrm e}^{x^{2}} \\ y &= \left (-1+\sqrt {2 x^{2}-2 c_1 +1}\right ) {\mathrm e}^{x^{2}} \\ \end{align*}
Mathematica. Time used: 0.723 (sec). Leaf size: 76
ode=(y[x]+Exp[x^2])*D[y[x],x]==2*x*(y[x]^2+y[x]*Exp[x^2]+Exp[2*x^2]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -e^{x^2}-\frac {\sqrt {2 x^2+1+c_1}}{\sqrt {e^{-2 x^2}}} \\ y(x)\to -e^{x^2}+\frac {\sqrt {2 x^2+1+c_1}}{\sqrt {e^{-2 x^2}}} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x*(y(x)**2 + y(x)*exp(x**2) + exp(2*x**2)) + (y(x) + exp(x**2))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -2*x*(y(x)**2 + y(x)*exp(x**2) + exp(2*x**2))/(y(x) + exp(x**2)) + Derivative(y(x), x) cannot be solved by the factorable group method