2.1.7 Problem 2 (i)
Internal
problem
ID
[19665]
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, December 11, 2025 at 01:40:41 PM
CAS
classification
:
[_quadrature]
2.1.7.1 Existence and uniqueness analysis
\begin{align*}
x^{\prime }&=x^{2}-3 x+2 \\
x \left (0\right ) &= 1 \\
\end{align*}
This is non linear first order ODE. In canonical form it is written as \begin{align*} x^{\prime } &= f(t,x)\\ &= x^{2}-3 x +2 \end{align*}
The \(x\) domain of \(f(t,x)\) when \(t=0\) is
\[
\{-\infty <x <\infty \}
\]
And the point \(x_0 = 1\) is inside this domain. Now we will look at the
continuity of \begin{align*} \frac {\partial f}{\partial x} &= \frac {\partial }{\partial x}\left (x^{2}-3 x +2\right ) \\ &= 2 x -3 \end{align*}
The \(x\) domain of \(\frac {\partial f}{\partial x}\) when \(t=0\) is
\[
\{-\infty <x <\infty \}
\]
And the point \(x_0 = 1\) is inside this domain. Therefore solution exists and is
unique.
2.1.7.2 Solved using first_order_ode_autonomous
0.070 (sec)
Entering first order ode autonomous solver
\begin{align*}
x^{\prime }&=x^{2}-3 x+2 \\
x \left (0\right ) &= 1 \\
\end{align*}
Since the ode has the form \(x^{\prime }=f(x)\) and initial conditions \(\left (t_0,x_0\right ) \) are
given such that they satisfy the ode itself, then we can write \begin{align*} 0 &= \left . f(x) \right |_{x=x_0}\\ 0 &= 0 \end{align*}
And the solution is immediately written as
\begin{align*}x&=x_0\\ x&=1 \end{align*}
Singular solutions are found by solving
\begin{align*} x^{2}-3 x +2&= 0 \end{align*}
for \(x\) . This is because we had to divide by this in the above step. This gives the following singular
solution(s), which also have to satisfy the given ODE.
\begin{align*} x = 1 \end{align*}
The following diagram is the phase line diagram. It classifies each of the above equilibrium
points as stable or not stable or semi-stable.
Solution plot Slope field \(x^{\prime } = x^{2}-3 x+2\)
Summary of solutions found
\begin{align*}
x &= 1 \\
\end{align*}
2.1.7.3 ✓ Maple. Time used: 0.004 (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
\]
Maple trace
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
trying Bernoulli
trying separable
<- separable successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [\frac {d}{d t}x \left (t \right )=x \left (t \right )^{2}-3 x \left (t \right )+2, x \left (0\right )=1\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d t}x \left (t \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d t}x \left (t \right )=x \left (t \right )^{2}-3 x \left (t \right )+2 \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {\frac {d}{d t}x \left (t \right )}{x \left (t \right )^{2}-3 x \left (t \right )+2}=1 \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int \frac {\frac {d}{d t}x \left (t \right )}{x \left (t \right )^{2}-3 x \left (t \right )+2}d t =\int 1d t +\mathit {C1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \ln \left (x \left (t \right )-2\right )-\ln \left (x \left (t \right )-1\right )=t +\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} x \left (t \right ) \\ {} & {} & x \left (t \right )=\frac {-2+{\mathrm e}^{t +\mathit {C1}}}{{\mathrm e}^{t +\mathit {C1}}-1} \\ \bullet & {} & \textrm {Redefine the integration constant(s)}\hspace {3pt} \\ {} & {} & x \left (t \right )=\frac {-2+\mathit {C1} \,{\mathrm e}^{t}}{\mathit {C1} \,{\mathrm e}^{t}-1} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} x \left (0\right )=1 \\ {} & {} & 1=\frac {-2+\mathit {C1}}{\mathit {C1} -1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} \textit {\_C1} \\ {} & {} & \textrm {No solution}\hspace {3pt} \\ \bullet & {} & \textrm {Solution does not satisfy initial condition}\hspace {3pt} \end {array} \]
2.1.7.4 ✓ 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*}
2.1.7.5 ✗ 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