36.1.18 problem 18

Internal problem ID [6273]
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 : 18
Date solved : Sunday, March 30, 2025 at 10:48:10 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=x^{3} \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^3*(1-y(x)); 
ic:=y(0) = 3; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = 1+2 \,{\mathrm e}^{-\frac {x^{4}}{4}} \]
Mathematica. Time used: 0.068 (sec). Leaf size: 18
ode=D[y[x],x]==x^3*(1-y[x]); 
ic={y[0]==3}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 2 e^{-\frac {x^4}{4}}+1 \]
Sympy. Time used: 0.319 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3*(1 - y(x)) + Derivative(y(x), x),0) 
ics = {y(0): 3} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 1 + 2 e^{- \frac {x^{4}}{4}} \]