50.2.15 problem 2(e)

Internal problem ID [7821]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 1. What is a differential equation. Section 1.3 SEPARABLE EQUATIONS. Page 12
Problem number : 2(e)
Date solved : Wednesday, March 05, 2025 at 05:07:10 AM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (-1\right )&=2 \end{align*}

Maple. Time used: 0.017 (sec). Leaf size: 15
ode:=diff(y(x),x) = x^2*y(x)^2; 
ic:=y(-1) = 2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -\frac {6}{2 x^{3}-1} \]
Mathematica. Time used: 0.116 (sec). Leaf size: 16
ode=D[y[x],x]==x^2*y[x]^2; 
ic={y[-1]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {6}{1-2 x^3} \]
Sympy. Time used: 0.155 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*y(x)**2 + Derivative(y(x), x),0) 
ics = {y(-1): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {3}{x^{3} - \frac {1}{2}} \]