73.1.7 problem 2 (i)

Internal problem ID [19780]
Book : Elementary Differential Equations. By R.L.E. Schwarzenberger. Chapman and Hall. London. First Edition (1969)
Section : Chapter 3. Solutions of first-order equations. Exercises at page 47
Problem number : 2 (i)
Date solved : Thursday, October 02, 2025 at 04:43:18 PM
CAS classification : [_quadrature]

\begin{align*} x^{\prime }&=x^{2}-3 x+2 \end{align*}

With initial conditions

\begin{align*} x \left (0\right )&=1 \\ \end{align*}
Maple. Time used: 0.010 (sec). Leaf size: 5
ode:=diff(x(t),t) = x(t)^2-3*x(t)+2; 
ic:=[x(0) = 1]; 
dsolve([ode,op(ic)],x(t), singsol=all);
 
\[ x = 1 \]
Mathematica. Time used: 0.001 (sec). Leaf size: 6
ode=D[x[t],t]==x[t]^2-3*x[t]+2; 
ic={x[0]==1}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to 1 \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-x(t)**2 + 3*x(t) + Derivative(x(t), t) - 2,0) 
ics = {x(0): 1} 
dsolve(ode,func=x(t),ics=ics)
 
ValueError : Couldnt solve for initial conditions