Internal
problem
ID
[18485]
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
:
Saturday, February 22, 2025 at 09:17:27 PM
CAS
classification
:
[_quadrature]
Solve
With initial conditions
This is non linear first order ODE. In canonical form it is written as
The \(x\) domain of \(f(t,x)\) when \(t=0\) is
And the point \(x_0 = 1\) is inside this domain. Now we will look at the continuity of
The \(x\) domain of \(\frac {\partial f}{\partial x}\) when \(t=0\) is
And the point \(x_0 = 1\) is inside this domain. Therefore solution exists and is unique.
Time used: 0.089 (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
And the solution is immediately written as
Singular solutions are found by solving
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.
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 \(x = 1\) | Slope field \(x^{\prime } = x^{2}-3 x+2\) |
Summary of solutions found
`Methods for first order ODEs: --- Trying classification methods --- trying a quadrature trying 1st order linear trying Bernoulli trying separable <- separable successful`
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)
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]
Solving time : 0.000
(sec)
Leaf size : 0
Python version: 3.13.1 (main, Dec 4 2024, 18:05:56) [GCC 14.2.1 20240910] Sympy version 1.13.3
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