Internal
problem
ID
[18483]
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
:
1
(v)
Date
solved
:
Saturday, February 22, 2025 at 09:17:24 PM
CAS
classification
:
[_quadrature]
Solve
With initial conditions
This is a linear ODE. In canonical form it is written as
Where here
Hence the ode is
The domain of \(q(t)=0\) is
And the point \(t_0 = 1\) is inside this domain. The domain of \(p(t)=\cos \left (t \right )\) is
And the point \(t_0 = 1\) is also inside this domain. Hence solution exists and is unique.
Time used: 0.102 (sec)
Since the ode has the form \(x^{\prime }=f(t)\), then we only need to integrate \(f(t)\).
Solving for the constant of integration from initial conditions, the solution becomes
| |
Solution \(x = \sin \left (t \right )-\sin \left (1\right )\) | Slope field \(x^{\prime } = \cos \left (t \right )\) |
Summary of solutions found
Time used: 0.062 (sec)
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
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}= \frac {\partial N}{\partial t}\), then the ODE is exact 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} = 1\). Therefore equation (4) becomes
Solving equation (5) for \( f'(x)\) gives
Integrating the above w.r.t \(x\) gives
Where \(c_1\) is constant of integration. Substituting result found above for \(f(x)\) into equation (3) gives \(\phi \)
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
Solving for \(x\) gives
| |
Solution \(x = \sin \left (t \right )-\sin \left (1\right )\) | Slope field \(x^{\prime } = \cos \left (t \right )\) |
Summary of solutions found
`Methods for first order ODEs: --- Trying classification methods --- trying a quadrature <- quadrature successful`
Solving time : 0.013
(sec)
Leaf size : 11
dsolve([diff(x(t),t) = cos(t),op([x(1) = 0])],x(t),singsol=all)
Solving time : 0.004
(sec)
Leaf size : 12
DSolve[{D[x[t],t]==Cos[t],{x[1]==0}},x[t],t,IncludeSingularSolutions->True]
Solving time : 0.051
(sec)
Leaf size : 8
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(-cos(t) + Derivative(x(t), t),0) ics = {x(1): 0} dsolve(ode,func=x(t),ics=ics)
Eq(x(t), sin(t) - sin(1))