Math1231 Calculus Chapter 3A: TERM II 2021

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

MATH1231 CALCULUS

Chapter 3A
TERM II 2021

Professor Jeya Jeyakumar

Red Center Room 2073


V.Jeyakumar@unsw.edu.au

June 14, 2021


3. Ordinary Differential Equations

(3.1) Introduction
Engineering and Science are built on models of the physical world.
Mostly, these models are mathematical models which allow
prediction of future or distant quantities. These models are
expressed in terms of “differential equations”.

Some examples of differential equations.


Who cares about differential equations?
dxi
Onsager relations (1931). = γij Xj , γij = γji
dt
Nobel Prize for Chemistry (1968).
1 2 2 ∂2V
∂V ∂V
Black and Scholes equation (1973). + σ S + rS − rV = 0
∂t 2 ∂S 2 ∂S
Nobel Prize for Economics (1997).
∂ ~2 2
Schrödinger equation (1926). i ~ x , t) = −
ψ(~ ∇ ψ(~
x , t) + V (x, t)ψ(~
x , t)
∂t 2m
Nobel Prize for Physics (1933).
GARCH Equations (1982,1987) – (Difference Equations).
X
R XM XN
yt = C + ARi yt−i + ǫt + MAj ǫt−j + βk X (t, k)
i =1 j =1 k=1

2
XP
2
X
Q
2
σt = K + Gi σt−i + Aj ǫt−j
Nobel Prize for Economics (2003).
i =1 j =1
Ordinary Differential Equations (ODEs)
contain the ordinary derivatives of one or more dependent
variables with just one independent variable
Examples

d 2h
m = −mg
dt 2
d 2x
+ ω 2 x = sin(3t)
dt 2
Notation
′ denotes a derivative w.r.t. the independent variable.

′′ denotes two derivatives.

′′′ or (3) denotes three derivatives


(k) denotes k derivatives.

Example– Equivalent Equations


Definition – Order
the order of the highest derivative in the ODE.

Examples
What is a solution to an ODE?
A solution to an ODE is a differentiable function which
satisfies the given equation.
Example The ODE
dy
= x2 + 1
dx
x3
has the solution y (x) = 3 +x
Initial Value Problems (IVP)

An initial value problem is an ODE together with a set of values of


the solution at some fixed point.
Example dy
= 2x, y (0) = 5
dx
is an IVP.
Solution by direct Integration
Consider the equation
dy
= h(x)
dx

Z x
Consider y= h(s) ds where h(s) is cts. on s ∈ [a, x]
a

From the Fundamental Theorem of Calculus


Z x 
dy d
= h(s) ds = h(x)
dx dx a

Z x
dy
Hence y= h(s) ds is the solution of dx
= h(x)
a
Methods for Finding Solutions to ODEs
We consider
◮ ODEs solvable by direct integration – done
◮ First- order ODEs
◮ Separable ODEs
◮ Linear ODEs
◮ Exact ODEs

◮ Second-order linear ODEs


Separable Equations

Example. Solve dy p
= x 1 − y2
dx
Example. Solve dy
= e x+y .
dx
dy g (x)
(3.3) First Order Separable ODEs dx = h(y )
Multiply by h(y ) and integrate w.r.t. x then
Z Z Z Z
dy
h(y ) dx = g (x) dx ⇒ h(y ) dy = g (x) dx
dx
Note:
i) We replaced the derivative dydx
by a quotient (Leibniz notation) in the above.
ii) Carry out the integrations if possible to find an explicit expression for y as a
function of x
iii) If we have the IVP defined with y (x0 ) = y0 then we obtain
Z y Z x
h(y ) dy = g (x) dx
y0 x0
Example. Solve ey
y′ = , y (0) = 1.
x2 + 1
(3.4) First Order Linear ODEs

A first order linear ODE is one that can be written in the form
dy
+ P(x)y = Q(x)
dx
Where P and Q are functions of x.

Examples.
1st Order Linear – Integrating Factor
Write the 1st order linear equation in standard form
dy
dx + P(x)y = Q(x)
Idea: Convert this equation into one that can be solved by
direct integration
Method: Multiply by the integrating factor
Rx
P(x) dx
φ(x) = e
and convert the resulting equation into the form
d
(φ(x)y ) = φ(x)Q(x)
dx
and integrate each side to find the solution.
Rx
means ignore the constant of integration
Rx
Justification for the Integrating Factor φ(x) = e P(x) dx

Multiplying the linear ODE by φ(x) gives us

dy
φ(x) + φ(x)P(x)y = φ(x)Q(x) (1)
dx

d
We want to find the function φ(x) in such a way that LHS of (1) equals (φ(x)y). Let u = φ(x). Then,
dx

d d dy du
φ(x) dy
dx
+ φ(x)P(x)y = u dy
dx
+ uP(x)y and, by the product rule, (φ(x)y) = (uy) = u + y.
dx dx dx dx
d
Equating LHS of (1) to (φ(x)y), we get
dx

dy dy du
u + uP(x)y = u + y.
dx dx dx

du
Comparing the terms both sides, we obtain = uP(x). Now separating variables and integrating each side,
dx Rx
R du Rx Rx
u
= P(x)dx and so, ln|u| = P(x)dx. Hence, the integrating factor is u = e P(x)dx .
Example: Solve
dy e −3x
+ 3y =
dx 1 + x2
Example Solve

dy y
+ = x, x >0
dx x
Example Solve

dy
(x − 1)3 + 4(x − 1)2 y = x + 1
dx
(3.5) First Order Exact ODEs
dy
F (x, y ) + G (x, y ) = 0 or F (x, y )dx + G (x, y )dy = 0
dx
is exact if
∂F ∂G
=
∂y ∂x

The solution y = y (x) is defined implicitly by H(x, y ) = C (a


constant) where

∂H ∂H
=F =G
∂x ∂y
If H(x, y ) = C and y = y (x) then

d d
(H(x, y )) = (C )
dx dx
∂H ∂H dy
⇒ + = 0
∂x ∂y dx
dy
⇒ F (x, y ) + G (x, y ) = 0 or F (x, y )dx + G (x, y )dy = 0
dx
∂H ∂H
where F (x, y ) = and G (x, y ) =
∂x ∂y
So H(x, y ) = C is a solution and

∂F ∂2H ∂2H ∂G
= = =
∂y ∂y ∂x ∂x∂y ∂x
Notes:
The following are equivalent
dy
F (x, y ) + G (x, y ) =0
dx
dy F (x, y )
=−
dx G (x, y )
F (x, y ) dx + G (x, y ) dy = 0

∂F ∂G
Check for exact. Is ∂y = ∂x ?

∂H
How do we find the solution H(x, y ) = C from F = ∂x and
G = ∂H
∂y ?
Example Solve

dy 2xy + 3x 2 y 2 
=− 2
dx x + 2x 3 y + 1
Constructing the solution
◮ Given F (x, y ) = ∂H
∂x
integrate w.r.t. x then
Z x
H(x, y ) = F (x, y ) dx + C1 (y ) = I (x, y ) + C1 (y )
where I (x, y ) is a known function.
∂H ∂I dC1
◮ Differentiate w.r.t. y then = +
∂y ∂y dy
∂H dC1 ∂I
◮ Equate =G ⇒ = G (x, y ) − = J(y )
∂y dy ∂y
Z
◮ Integrate w.r.t. y ⇒ C1 (y ) = J(y ) dy is now a known function.

◮ The final soln is H(x, y ) = I (x, y ) + C1 (y ) = C where I (x, y ) and C1 (y )


are now known functions.
Sample Class Test Problem
◮ Example: Show that the differential equation

e y dx + (xe y + 1)dy = 0

is exact and find a general solution.

You might also like