2.1.7 problem 2 (i)

Existence and uniqueness analysis
Solved as first order autonomous ode
Maple step by step solution
Maple trace
Maple dsolve solution
Mathematica DSolve solution

Internal problem ID [18170]
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 19, 2024 at 01:51:47 PM
CAS classification : [_quadrature]

Solve

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

With initial conditions

\begin{align*} x \left (0\right )&=1 \end{align*}

Existence and uniqueness analysis

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.

Solved as first order autonomous ode

Time used: 0.401 (sec)

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.

(a) Solution plot
\(x = 1\)

(b) Slope field plot
\(x^{\prime } = x^{2}-3 x+2\)

Summary of solutions found

\begin{align*} x &= 1 \\ \end{align*}
Maple step by step solution
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [x^{\prime }=x^{2}-3 x+2, x \left (0\right )=1\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & x^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & x^{\prime }=x^{2}-3 x+2 \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {x^{\prime }}{x^{2}-3 x+2}=1 \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int \frac {x^{\prime }}{x^{2}-3 x+2}d t =\int 1d t +\mathit {C1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \ln \left (x-2\right )-\ln \left (x-1\right )=t +\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} x \\ {} & {} & x=\frac {-2+{\mathrm e}^{t +\mathit {C1}}}{{\mathrm e}^{t +\mathit {C1}}-1} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} x \left (0\right )=1 \\ {} & {} & 1=\frac {-2+{\mathrm e}^{\mathit {C1}}}{{\mathrm e}^{\mathit {C1}}-1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} \textit {\_C1} \\ {} & {} & \mathit {C1} =\left (\right ) \\ \bullet & {} & \textrm {Solution does not satisfy initial condition}\hspace {3pt} \end {array} \]

Maple trace
`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
<- separable successful`
 
Maple dsolve solution

Solving time : 0.003 (sec)
Leaf size : 5

dsolve([diff(x(t),t) = x(t)^2-3*x(t)+2, 
       op([x(0) = 1])],x(t),singsol=all)
 
\[ x = 1 \]
Mathematica DSolve solution

Solving time : 0.001 (sec)
Leaf size : 6

DSolve[{D[x[t],t]==x[t]^2-3*x[t]+2,{x[0]==1}}, 
       x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to 1 \]