30.1.25 problem 25

Internal problem ID [7415]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.2, Separable Equations. Exercises. page 46
Problem number : 25
Date solved : Tuesday, September 30, 2025 at 04:31:49 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (0\right )&=3 \\ \end{align*}
Maple. Time used: 0.022 (sec). Leaf size: 14
ode:=diff(y(x),x) = x^2*(1+y(x)); 
ic:=[y(0) = 3]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -1+4 \,{\mathrm e}^{\frac {x^{3}}{3}} \]
Mathematica. Time used: 0.041 (sec). Leaf size: 18
ode=D[y[x],x]==x^2*(1+y[x]); 
ic={y[0]==3}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 4 e^{\frac {x^3}{3}}-1 \end{align*}
Sympy. Time used: 0.173 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*(y(x) + 1) + Derivative(y(x), x),0) 
ics = {y(0): 3} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 4 e^{\frac {x^{3}}{3}} - 1 \]