Internal
problem
ID
[19667]
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
(iii)
Date
solved
:
Tuesday, March 10, 2026 at 11:54:27 AM
CAS
classification
:
[_quadrature]
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.
0.133 (sec)
Entering first order ode autonomous solver
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 of dividing by the above earlier. This gives the following singular solution(s), which also has 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 plot for \(x^{\prime } = \left (x-1\right )^{2}\) | Direction fields for \(x^{\prime } = \left (x-1\right )^{2}\) |
| |
|
| Isoclines for \(x^{\prime } = \left (x-1\right )^{2}\) |
Summary of solutions found
0.526 (sec)
Entering first order ode exact solver
To solve an ode of the form
We assume there exists a function \(\phi \left ( x,y\right ) =c\) where \(c\) is constant, that satisfies the ode. Taking derivative of \(\phi \) w.r.t. \(x\) gives
Hence
Comparing (A,B) shows that
But since \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) then for the above to be valid, we require that
If the above condition is satisfied, then the original ode is called exact. We still need to determine \(\phi \left ( x,y\right ) \) but at least we know now that we can do that since the condition \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) is satisfied. If this condition is not satisfied then this method will not work and we have to now look for an integrating factor to force this condition, which might or might not exist. The first step is to write the ODE in standard form to check for exactness, which is
Therefore
Comparing (1A) and (2A) shows that
The next step is to determine if the ODE is is exact or not. The ODE is exact when the following condition is satisfied
Using result found above gives
And
Since \(\frac {\partial M}{\partial x} \neq \frac {\partial N}{\partial t}\), then the ODE is not exact. Since the ODE is not exact, we will try to find an integrating factor to make it exact. Let
Since \(A\) depends on \(x\), it can not be used to obtain an integrating factor. We will now try a second method to find an integrating factor. Let
Since \(B\) does not depend on \(t\), it can be used to obtain an integrating factor. Let the integrating factor be \(\mu \). Then
The result of integrating gives
\(M\) and \(N\) are now multiplied by this integrating factor, giving new \(M\) and new \(N\) which are called \(\overline {M}\) and \(\overline {N}\) so not to confuse them with the original \(M\) and \(N\).
And
So now a modified ODE is obtained from the original ODE which will be exact and can be solved using the standard method. The modified ODE is
The following equations are now set up to solve for the function \(\phi \left (t,x\right )\)
Integrating (1) w.r.t. \(t\) gives
Where \(f(x)\) is used for the constant of integration since \(\phi \) is a function of both \(t\) and \(x\). Taking derivative of equation (3) w.r.t \(x\) gives
But equation (2) says that \(\frac {\partial \phi }{\partial x} = \frac {1}{\left (x -1\right )^{2}}\). Therefore equation (4) becomes
Solving equation (5) for \( f'(x)\) gives
Integrating the above w.r.t \(x\) gives
But since \(\phi \) itself is a constant function, then let \(\phi =c_2\) where \(c_2\) is new constant and combining \(c_1\) and \(c_2\) constants into the constant \(c_1\) gives the solution as
Solving for the constant of integration from initial conditions, the solution becomes
| |
|
| Solution plot for \(x^{\prime } = \left (x-1\right )^{2}\) | Direction fields for \(x^{\prime } = \left (x-1\right )^{2}\) |
| |
|
| Isoclines for \(x^{\prime } = \left (x-1\right )^{2}\) |
Summary of solutions found
ode:=diff(x(t),t) = (x(t)-1)^2; ic:=[x(0) = 1]; dsolve([ode,op(ic)],x(t), singsol=all);
Maple trace
Methods for first order ODEs: --- Trying classification methods --- trying a quadrature trying 1st order linear trying Bernoulli trying separable <- separable successful
ode=D[x[t],t]==(x[t]-1)^2; ic={x[0]==1}; DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
from sympy import * t = symbols("t") x = Function("x") ode = Eq(-(x(t) - 1)**2 + Derivative(x(t), t),0) ics = {x(0): 1} dsolve(ode,func=x(t),ics=ics)
ValueError : Couldnt solve for initial conditions
Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] Sympy version 1.14.0
classify_ode(ode,func=x(t)) ('factorable', 'separable', '1st_exact', '1st_rational_riccati', '1st_power_series', 'lie_group', 'separable_Integral', '1st_exact_Integral')