49.21.6 problem 2(a)

Internal problem ID [7736]
Book : An introduction to Ordinary Differential Equations. Earl A. Coddington. Dover. NY 1961
Section : Chapter 5. Existence and uniqueness of solutions to first order equations. Page 190
Problem number : 2(a)
Date solved : Sunday, March 30, 2025 at 12:20:29 PM
CAS classification : [_quadrature]

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

With initial conditions

\begin{align*} y \left (x_{0} \right )&=y_{0} \end{align*}

Maple. Time used: 0.038 (sec). Leaf size: 18
ode:=diff(y(x),x) = y(x)^2; 
ic:=y(x__0) = y__0; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -\frac {y_{0}}{-1+\left (x -x_{0} \right ) y_{0}} \]
Mathematica. Time used: 0.03 (sec). Leaf size: 16
ode=D[y[x],x]==x2*y[x]; 
ic={y[x0]==y0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \text {y0} e^{\text {x2} (x-\text {x0})} \]
Sympy. Time used: 0.144 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x)**2 + Derivative(y(x), x),0) 
ics = {y(x__0): y__0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {1}{x + \frac {- x^{0} y^{0} - 1}{y^{0}}} \]