2025-01-21 17:02:55 -08:00
|
|
|
#import "@youwen/zen:0.1.0": *
|
2025-01-07 15:29:58 -08:00
|
|
|
|
2025-01-21 17:02:55 -08:00
|
|
|
#show: zen.with(
|
2025-01-07 15:29:58 -08:00
|
|
|
title: "Math 4B Course Notes",
|
|
|
|
author: "Youwen Wu",
|
|
|
|
date: "Winter 2025",
|
|
|
|
subtitle: [Taught by Guofang Wei],
|
|
|
|
)
|
|
|
|
|
|
|
|
#outline()
|
|
|
|
|
|
|
|
= Course logistics
|
|
|
|
|
|
|
|
The textbook is Elementary Differential Equations, 11th edition, 2017. Chapters
|
|
|
|
1-4, 6, 7, and 9 will be covered.
|
|
|
|
|
|
|
|
Attendance to discussion sections is mandatory.
|
|
|
|
|
|
|
|
= Lecture #datetime(day: 7, month: 1, year: 2025).display()
|
|
|
|
|
|
|
|
== Trivial preliminaries
|
|
|
|
|
|
|
|
#definition[
|
|
|
|
An ODE involves an unknown function of a single variable and its derivatives
|
|
|
|
up to some fixed order. The order of an ODE is the order of the highest
|
|
|
|
derivative that appears.
|
|
|
|
]
|
|
|
|
|
|
|
|
#example[First order ODE][
|
|
|
|
$ (dif y) / (dif x) = y^2 $
|
|
|
|
]
|
|
|
|
|
|
|
|
#example[Second order ODE][
|
|
|
|
$
|
|
|
|
y'' &= x \
|
|
|
|
integral.double y'' dif x &= integral.double x dif x \
|
|
|
|
y &= 1 / 6 x^3 + C
|
|
|
|
$
|
|
|
|
]
|
|
|
|
|
|
|
|
#definition[
|
|
|
|
A function $y(x)$ defined on $(a,b)$ is a *solution* of the ODE
|
|
|
|
$ y' = F(x,y) $
|
|
|
|
if and only if
|
|
|
|
$ y'(x) = F(x, y(x)), forall x in (a,b) $
|
|
|
|
]
|
|
|
|
|
|
|
|
#problem[
|
|
|
|
Check that $y(x) = 20 + 10e^(-x / 2)$ is a solution to the ODE
|
|
|
|
$ y' = -1 / 2 y + 10 $
|
|
|
|
]
|
|
|
|
|
|
|
|
#definition[
|
|
|
|
A first order ODE
|
|
|
|
$ y' = F(x,y) $
|
|
|
|
is called *linear* if there are functions $A(x)$ and $B(x)$ such that
|
|
|
|
$ F(x,y) = A(x) y + B(x) $
|
|
|
|
]
|
|
|
|
|
|
|
|
#example("Linear ODEs")[
|
|
|
|
- $y' = x$
|
|
|
|
- $y' = y$
|
|
|
|
- $y' = x^2$
|
|
|
|
]
|
|
|
|
|
|
|
|
#example("Nonlinear ODEs")[
|
|
|
|
- $y' = y^2$
|
|
|
|
]
|
|
|
|
|
2025-01-10 12:44:05 -08:00
|
|
|
#definition[
|
|
|
|
In general, a differential equation is called linear if and only if it can be
|
|
|
|
written in the form
|
|
|
|
$
|
|
|
|
a_n (t) (dif^n y) / (dif t^n) + a_(n-1) (t) (d^(n-1) y) / (d t^(n-1)) + dots + a_1 (t) (dif y) / (dif t) + a_0 (t) y = g(t)
|
|
|
|
$
|
|
|
|
where $a_k (t)$ and $g(t)$ are single variable functions of $t$.
|
|
|
|
]
|
|
|
|
|
2025-01-07 15:29:58 -08:00
|
|
|
#definition[
|
|
|
|
*Equilibrium solutions* for the ODE
|
|
|
|
$ y' = F(x,y) $
|
|
|
|
are solutions $y(x)$ such that $y'(x) = 0$, that is, $y(x)$ is constant.
|
|
|
|
]
|
|
|
|
|
|
|
|
#example[
|
|
|
|
The equation
|
|
|
|
$ y' = y(y +2) $
|
|
|
|
has two equilibria
|
|
|
|
$
|
|
|
|
y(x) &= 0 \
|
|
|
|
y(x) &= -2
|
|
|
|
$
|
|
|
|
]
|
|
|
|
|
|
|
|
#problem[
|
|
|
|
What are the equilibria of the equation
|
|
|
|
$ y' = y(y - x) $
|
|
|
|
]
|
2025-01-10 12:44:05 -08:00
|
|
|
|
|
|
|
== General solution of a first order linear ODE
|
|
|
|
|
|
|
|
We start with the differential equation in standard form
|
|
|
|
|
|
|
|
$ (dif y) / (dif t) + p(t) y = g(t) $
|
|
|
|
|
|
|
|
where $p(t)$ and $g(t)$ are continuous single variable functions of $t$.
|
|
|
|
|
|
|
|
Then let us assume the existence of an *integrating factor* $mu(t)$, such that
|
|
|
|
|
|
|
|
$ mu(t) p(t) = mu'(t) $
|
|
|
|
|
|
|
|
and then multiplying each term by $mu(t)$ to obtain
|
|
|
|
|
|
|
|
$ mu(t) (dif y) / (dif t) + mu(t) p(t) y = mu(t) g(t) $
|
|
|
|
|
|
|
|
Then
|
|
|
|
|
|
|
|
$ mu(t) (dif y) / (dif t) + mu'(t) y = mu(t) g(t) $
|
|
|
|
|
|
|
|
Then recognize that the left side of the equation is the product rule to obtain
|
|
|
|
|
|
|
|
$
|
|
|
|
(mu(t) y(t))' &= mu(t) g(t) \
|
|
|
|
integral (mu(t) y(t))' dif t &= integral mu(t) g(t) dif t \
|
|
|
|
mu(t) y(t) + C &= integral mu(t) g(t) dif t \
|
|
|
|
y(t) &= (integral mu(t) g(t) dif t + C) / (mu(t))
|
|
|
|
$
|
|
|
|
|
|
|
|
Now we have a general solution but we need to determine $mu(t)$.
|
|
|
|
|
|
|
|
$
|
|
|
|
mu(t) p(t) &= mu'(t) \
|
|
|
|
(mu'(t)) / (mu(t)) &= p(t) \
|
|
|
|
(ln mu(t))' &= p(t)
|
|
|
|
$
|
|
|
|
|
|
|
|
So now
|
|
|
|
|
|
|
|
$
|
|
|
|
integral mu(t) + k &= integral p(t) dif t \
|
|
|
|
ln mu(t) &= integral p(t) dif t + k \
|
|
|
|
mu(t) = e^(integral p(t) dif t + k) &= k e^(integral p(t) dif t)
|
|
|
|
$
|
|
|
|
|
|
|
|
Now substitute
|
|
|
|
|
|
|
|
$
|
|
|
|
y(t) &= (integral k e^(integral p(t) dif t) g(t) dif t + C) / (k e^(integral p(t))) \
|
|
|
|
&= (k integral e^(integral p(t) dif t) g(t) dif t + C) / (k e^(integral p(t)))
|
|
|
|
$
|
|
|
|
|
|
|
|
Now do some cursed constant manipulation to obtain a final solution with only one arbitrary constant
|
|
|
|
|
|
|
|
$
|
|
|
|
y(t) = (integral e^(integral p(t) dif t) g(t) dif t + C) / (e^(integral p(t)))
|
|
|
|
$
|
|
|
|
|
|
|
|
#remark[
|
|
|
|
The most useful result to us is
|
|
|
|
$
|
|
|
|
y(t) &= (integral mu(t) g(t) dif t + C) / (mu(t)) \
|
|
|
|
mu(t) &= e^(integral p(t) dif t)
|
|
|
|
$
|
|
|
|
We can easily obtain a solution form for any first order linear ODE simply by
|
|
|
|
identifying $p(t)$ and $g(t)$.
|
|
|
|
]
|
2025-01-21 17:02:55 -08:00
|
|
|
|
|
|
|
= Lecture #datetime(day: 22, year: 2025, month: 1).display() - existence and uniqueness of solutions
|
|
|
|
|
|
|
|
Midterm 1 is #datetime(month: 1, day: 28, year: 2025).display() in class, covering Chapter 2. Five problems:
|
|
|
|
|
|
|
|
- Solving separable equations (10pts)
|
|
|
|
- Solving Linear ODE (10pts)
|
|
|
|
- Modeling (Newton's law of cooling) (10pts)
|
|
|
|
- Eulers's method (5 pts)
|
|
|
|
- True or false problem (if ODE linear, existence, etc) (5 pts)
|
|
|
|
|
|
|
|
== Existence and uniqueness of solutions to the initial value problem
|
|
|
|
|
|
|
|
Before we looked at particular ODEs. Now we turn our attention to general ODEs.
|
|
|
|
In general ODEs do not have solutions, so let us discuss methods to identify
|
|
|
|
when solutions exist.
|
|
|
|
|
|
|
|
Given a first order initial value problem ODE
|
|
|
|
|
|
|
|
$ y' = F(t,y), underbrace(y(t_0) = y_0, "initial value") $
|
|
|
|
|
|
|
|
When does a solution exist? Is it unique?
|
|
|
|
|
|
|
|
Warm up:
|
|
|
|
|
|
|
|
$ y' = -x / y $
|
|
|
|
|
|
|
|
It's separable and we can solve it.
|
|
|
|
|
|
|
|
$
|
|
|
|
1 / 2 y^2 &= -1 / 2 x^2 + C \
|
|
|
|
y^2 &= 2C - x^2 \
|
|
|
|
y &= plus.minus sqrt(2C - x^2)
|
|
|
|
$
|
|
|
|
|
|
|
|
Say $y(1) = 1$. Then $C = 1$.
|
|
|
|
|
|
|
|
Since $y(1) = 1$, we choose the positive version of solution.
|
|
|
|
|
|
|
|
$ y = sqrt(2 - x^2) $
|
|
|
|
|
|
|
|
The slope field shows that the solutions are semicircles above and below the
|
|
|
|
$x$-axis.
|
|
|
|
|
|
|
|
Consider this initial value
|
|
|
|
|
|
|
|
$
|
|
|
|
y(3) &= 0 \
|
|
|
|
2C &= 9 \
|
|
|
|
y &= plus.minus sqrt(9 - x^2)
|
|
|
|
$
|
|
|
|
|
|
|
|
Now should we choose $+$ or $-$? It seems that either can work, but it turns
|
|
|
|
out that it is not a solution!
|
|
|
|
|
|
|
|
Recall the equation
|
|
|
|
|
|
|
|
$ y' = -x / y $
|
|
|
|
|
|
|
|
With our initial condition, this equation was not defined! So there is no
|
|
|
|
solution for this initial condition.
|
|
|
|
|
|
|
|
Now consider
|
|
|
|
|
|
|
|
$ y' = sqrt(y) $
|
|
|
|
|
|
|
|
Again it is separable
|
|
|
|
|
|
|
|
$
|
|
|
|
integral dif x &= integral sqrt(y) dif y \
|
|
|
|
2y^(1 / 2) &= x + C \
|
|
|
|
$
|
|
|
|
|
|
|
|
With initial condition $y(0) = 0$,
|
|
|
|
|
|
|
|
$
|
|
|
|
y = (x / 2)^2
|
|
|
|
$
|
|
|
|
|
|
|
|
However we lost a solution, since we divided by $sqrt(y)$, which could've been
|
|
|
|
0!
|
|
|
|
|
|
|
|
When $F(t,y)$ (RHS) is not nice (differentiable) at the initial value $(t_0,
|
|
|
|
y_0)$, existence and uniqueness (E/U) could fail. We do have E/U when $F(t,y)$
|
|
|
|
is nice.
|
|
|
|
|
2025-01-23 14:21:33 -08:00
|
|
|
== Existence of solutions to IVP - linear case
|
2025-01-21 17:02:55 -08:00
|
|
|
|
|
|
|
The first order linear ODE is
|
|
|
|
|
|
|
|
$
|
|
|
|
y'(t) = p(t) y(t) = g(t) \
|
|
|
|
$
|
|
|
|
|
|
|
|
Use integrating factor
|
|
|
|
|
|
|
|
$ mu(t) = e^(integral p(t) dif t) $
|
|
|
|
|
|
|
|
We know a general solution using the method of integrating factors.
|
|
|
|
|
|
|
|
$ y(t) = 1 / mu(t) [C + integral mu(t) g(t) dif t] $
|
|
|
|
|
|
|
|
We are assuming that $p(t)$ and $g(t)$ are given continuous functions defined
|
|
|
|
on some interval $I$. The solution $y(t)$ is defined on the same interval
|
|
|
|
$I$.
|
|
|
|
|
|
|
|
#remark[
|
|
|
|
The solution of the initial value problem for a linear equation exists, is
|
|
|
|
unique, and is defined as long as the coefficients in the equation are defined.
|
|
|
|
]
|
|
|
|
|
|
|
|
#remark[
|
|
|
|
Existence and uniqueness are important. It guarantees there is one and only one
|
|
|
|
solution curve passing through an initial point $(t_0, y_0)$.
|
|
|
|
]
|
|
|
|
|
|
|
|
#example[
|
|
|
|
Consider
|
|
|
|
$ y'(t) - 1 / t y(t) = 1 / (t^2), y(1) = 0 $
|
|
|
|
|
|
|
|
+ $(-infinity, 0)$
|
|
|
|
+ $(0, infinity)$
|
|
|
|
+ $(-infinity, infinity)$
|
|
|
|
+ $(0, 2)$
|
|
|
|
|
|
|
|
$0$ is a bad value. So we choose either $(0, infinity)$ or $(-infinity, 0)$.
|
|
|
|
But the initial value exists on $(0, infinity)$, so we choose (1).
|
|
|
|
]
|
|
|
|
|
|
|
|
Now let's consider a general first order ODE
|
|
|
|
|
|
|
|
$ y' = F(t,y), y(t_0) = y_0 $
|
|
|
|
|
|
|
|
Now "nice" is not so clear cut.
|
|
|
|
Assume $F(t,y)$ is a "nice" function ($F$, $(diff F)/(diff y)$ are continuous)
|
|
|
|
defined on some rectangle in $(t,y)$-plane.
|
|
|
|
|
|
|
|
#theorem("Existence and uniqueness theorem for ODE")[
|
|
|
|
If the initial point $(t_0, y_0)$ belongs to the rectangle where $F(t,y)$ is
|
|
|
|
defined, then this initial value problem has a *unique solution* $y(t)$ defined
|
|
|
|
on some time interval $I$.
|
|
|
|
]<eutheorem>
|
|
|
|
|
|
|
|
#example[
|
|
|
|
Find the solution of the initial value problem
|
|
|
|
$
|
|
|
|
y' = y^2, y(0) = 1 \
|
|
|
|
y(t) = 1 / (1-t)
|
|
|
|
$
|
|
|
|
|
|
|
|
The function on the right side is
|
|
|
|
$ F(t,y) = y^2 $
|
|
|
|
It's defined for all $t$ and $y$. Nevertheless the largest interval on which
|
|
|
|
the solution is defined is $-infinity < t < 1$.
|
|
|
|
]
|
|
|
|
|
|
|
|
Consider IVP
|
|
|
|
|
|
|
|
$
|
|
|
|
y' = sqrt(9 - y^2), y(1) = 0
|
|
|
|
$
|
|
|
|
|
|
|
|
Any E/U problems?
|
|
|
|
|
|
|
|
== Numerical approximations with Euler's method
|
|
|
|
|
|
|
|
We can determine if solutions exist using @eutheorem but in general we cannot
|
|
|
|
find an explicit solution. Instead we approximate the solution.
|
|
|
|
|
|
|
|
Consider the IVP
|
|
|
|
|
|
|
|
$ y' = 1 / 2 cos(y) + t, y(0) = -1 $
|
|
|
|
|
|
|
|
The righthand side is nice, by @eutheorem, it has a unique solution. We can't
|
2025-01-23 15:28:18 -08:00
|
|
|
find an explicit solution. So use Euler's method.
|
2025-01-23 14:21:33 -08:00
|
|
|
|
|
|
|
= Lecture #datetime(day: 23, month: 1, year: 2025).display()
|
|
|
|
|
|
|
|
Second order linear differential equation.
|
|
|
|
|
|
|
|
$
|
|
|
|
y'' = p(t)y' + q(t)y = g(t)
|
|
|
|
$
|
|
|
|
|
|
|
|
We say it is homogenous if $g(t) = 0$.
|
|
|
|
|
|
|
|
== Initial value problem and uniqueness on 2nd order linear ODEs
|
|
|
|
|
|
|
|
Suppose $p(t)$, $q(t)$, and $g(t)$ are given continuous functions defined on
|
|
|
|
$I$.
|
|
|
|
$
|
|
|
|
y'' = p(t)y' + q(t)y = g(t) \
|
|
|
|
y(t_0) = y_0, y'(t_0) = y'_0
|
|
|
|
$
|
|
|
|
|
|
|
|
has a unique solution $y(t)$ defined on $I$. Same as first order case. Always write in standard form first before identifying.
|
|
|
|
|
|
|
|
#example[
|
|
|
|
What is the largest interval on which the IVP
|
|
|
|
$
|
|
|
|
(t+1)y'' + y = 3, y(0) = 1, y'(0) = 0
|
|
|
|
$
|
|
|
|
is certain to have a solution?
|
|
|
|
|
|
|
|
$
|
|
|
|
y'' + 1 / (t+1) y = 3 / (t+1)
|
|
|
|
$
|
|
|
|
|
|
|
|
So the functions are nice except at -1. Our intervals are
|
|
|
|
|
|
|
|
$
|
|
|
|
(-infinity, -1), (-1, infinity)
|
|
|
|
$
|
|
|
|
|
|
|
|
But we have initial values at 0, so we know for certain that a solution (but not for certain it's the only solution) exists
|
|
|
|
|
|
|
|
$
|
|
|
|
(-1, infinity)
|
|
|
|
$
|
|
|
|
]
|
|
|
|
|
|
|
|
== 2nd order linear homogenous ODEs
|
|
|
|
|
2025-01-23 15:28:18 -08:00
|
|
|
How to find solutions to 2nd order linear ODE? Recall
|
2025-01-23 14:21:33 -08:00
|
|
|
|
2025-01-23 15:28:18 -08:00
|
|
|
$
|
|
|
|
y'' = p(t)y' + q(t)y = 0
|
|
|
|
$
|
|
|
|
|
|
|
|
Consider 2nd order linear homogenous ODEs with constant coefficients $a,b,c, a!= 0$.
|
|
|
|
|
|
|
|
$
|
|
|
|
a y'' + b y' + c y = 0
|
|
|
|
$
|
|
|
|
|
|
|
|
Judging from this equation it seems $y$ should be an exponential since we want
|
|
|
|
a function whose derivatives can cancel each other out (with constants
|
|
|
|
applied).
|
|
|
|
|
|
|
|
Trying $y=e^(r t)$,
|
|
|
|
|
|
|
|
$
|
|
|
|
y' = r e^(r t) \
|
|
|
|
y'' = r^2 e^(r t) \
|
|
|
|
a r^2 e^(r t) + b r e^(r t) + c e^(r t) = 0
|
|
|
|
$
|
|
|
|
|
|
|
|
$e^(r t)$ is never 0 (in $RR$) so we can divide without losing or gaining solutions.
|
|
|
|
|
|
|
|
$
|
|
|
|
e^(r t) (a r^2 + b r + c) = 0
|
|
|
|
$
|
|
|
|
|
|
|
|
Then we simply just need to solve a quadratic for $r$.
|
|
|
|
|
|
|
|
$
|
|
|
|
a r^2 + b r + c = 0
|
|
|
|
$
|
|
|
|
|
|
|
|
We may have two distinct real solutions, one repeated solution, or complex
|
|
|
|
solutions (no solutions in $RR$). For now let us consider the distinct real
|
|
|
|
solutions.
|
|
|
|
|
|
|
|
#fact[
|
|
|
|
We conclude $y(t) = e^(r t)$ is a solution of
|
|
|
|
$
|
|
|
|
a y'' + b y' + c y = 0
|
|
|
|
$
|
|
|
|
provided $r$ satisfies
|
|
|
|
$
|
|
|
|
a r^2 + b r + c = 0
|
|
|
|
$
|
|
|
|
This is the _characteristic equation_.
|
|
|
|
]
|
|
|
|
|
|
|
|
#example[
|
|
|
|
$
|
|
|
|
y'' + 5y' + 6y = 0
|
|
|
|
$
|
|
|
|
It is homogenous, so we find the characteristic equation.
|
|
|
|
|
|
|
|
$
|
|
|
|
r^2 + 5 r + 6 = 0 \
|
|
|
|
r = -2, -3 \
|
|
|
|
y_1 = e^(-2t), y_2 = e^(-3t)
|
|
|
|
$
|
|
|
|
]<particular-solutions>
|
|
|
|
|
|
|
|
#example[
|
|
|
|
$ y'' - 2y' + y = 0 $
|
|
|
|
The characteristic equation is
|
|
|
|
$
|
|
|
|
r^2 - 2r + 1 = 0 \
|
|
|
|
r = 1 \
|
|
|
|
y_1 = e^t
|
|
|
|
$
|
|
|
|
]
|
|
|
|
|
|
|
|
== Superposition principle for 2nd order linear homogenous ODE
|
|
|
|
|
|
|
|
We can find a few particular solutions to our ODE, but how can we find all of the solutions?
|
|
|
|
|
|
|
|
#fact[
|
|
|
|
Suppose $y_1(t), y_2(t)$ are a pair of solutions of
|
|
|
|
$
|
|
|
|
y'' + p(t) y' + q(t) y = 0
|
|
|
|
$
|
|
|
|
Then the linear combination
|
|
|
|
$
|
|
|
|
c_1 y_1(t) + c_2 y_2(t)
|
|
|
|
$
|
|
|
|
is also a solution.
|
|
|
|
]<superposition-principle>
|
|
|
|
|
|
|
|
#proof[
|
|
|
|
$
|
|
|
|
(c_1 y_1(t) + c_2 y_2(t))'' + p(t) (c_1 y_1(t) + c_2 y_2(t))' + q(t)(c_1 y_1(t) + c_2 y_2(t)) \
|
|
|
|
= c_1 y_1'' + c_2 y_2'' + p(t)(c_1 y_1' + c_2 y_2') + g(t)(c_1 y_1 + c_2 y_2) \
|
|
|
|
= c_1 (y''_1 + p(t)y'_1 + q(t) y_1) + c_2 (y''_2 + p(t) y'_2 + q(t) y_2) \
|
|
|
|
= c_1 (0) + c_2(0) = 0
|
|
|
|
$
|
|
|
|
]
|
|
|
|
|
|
|
|
#example[Revisiting @particular-solutions][
|
|
|
|
$
|
|
|
|
y'' + 5y' + 6y = 0
|
|
|
|
$
|
|
|
|
It is homogenous, so we find the characteristic equation.
|
|
|
|
|
|
|
|
$
|
|
|
|
r^2 + 5 r + 6 = 0 \
|
|
|
|
r = -2, -3 \
|
|
|
|
y_1 = e^(-2t), y_2 = e^(-3t)
|
|
|
|
$
|
|
|
|
|
|
|
|
So by @superposition-principle,
|
|
|
|
$
|
|
|
|
y(t) = c_1 e^(-2t) + c_2 e^(-3t)
|
|
|
|
$
|
|
|
|
is a general solution.
|
|
|
|
]
|
|
|
|
|
|
|
|
#example[
|
|
|
|
Find the general solution of
|
|
|
|
$
|
|
|
|
y'' + 2y' - 3y = 0 \
|
|
|
|
y(1) = 1, y'(1) = -1
|
|
|
|
$
|
|
|
|
and then find the solution satisfying the initial conditions
|
|
|
|
$
|
|
|
|
y(1) = 1, y'(1) = -1
|
|
|
|
$
|
|
|
|
General solution is
|
|
|
|
$
|
|
|
|
y(t) &= c_1 e^(-3t) + c_2 e^t \
|
|
|
|
y'(t) &= -3 c_1 e^(-3t) + c_2 e^t
|
|
|
|
$
|
|
|
|
Now we need the particular solution.
|
|
|
|
$
|
|
|
|
1 &= c_1 e^(-3) + c_2 e \
|
|
|
|
-1 &= -3 c_1 e^(-3) + c_2 e \
|
|
|
|
$
|
|
|
|
|
|
|
|
Now we have a system and we can solve it using standard linear algebra
|
|
|
|
techniques.
|
|
|
|
]
|
2025-02-05 01:15:43 -08:00
|
|
|
|
|
|
|
= Principle of superposition, Wronskian complex roots
|
|
|
|
|
|
|
|
== Review
|
|
|
|
|
|
|
|
Recall:
|
|
|
|
|
|
|
|
Second order ODE:
|
|
|
|
|
|
|
|
$
|
|
|
|
y'' = F(t,y,y')
|
|
|
|
$
|
|
|
|
|
|
|
|
Linear:
|
|
|
|
|
|
|
|
$
|
|
|
|
y'' + p(t) y' + q(t) y = g(t)
|
|
|
|
$
|
|
|
|
|
|
|
|
Homogenous:
|
|
|
|
|
|
|
|
$
|
|
|
|
y'' + p(t) y' + q(t) y = 0
|
|
|
|
$
|
|
|
|
|
|
|
|
Constant coefficients: $a y'' + b y' + c y = 0$, with characteristic equation
|
|
|
|
|
|
|
|
$
|
|
|
|
a r^2 + b r + c = 0
|
|
|
|
$
|
|
|
|
|
|
|
|
From this characteristic equation we determine either distinct real roots,
|
|
|
|
complex real roots, or repeated real roots. We already know what to do with
|
|
|
|
distinct real roots.
|
|
|
|
|
|
|
|
$
|
|
|
|
y'' + p(t) y' + q(t) y = 0
|
|
|
|
$
|
|
|
|
|
|
|
|
The linear combination
|
|
|
|
|
|
|
|
$
|
|
|
|
y(t) = c_1 y_1 (t) + c_2 y_2 (t)
|
|
|
|
$
|
|
|
|
|
|
|
|
is a solution for any constants $c_1, c_2$. The solutions from a vector space!
|
|
|
|
Key: equation is linear and homogenous.
|
|
|
|
|
|
|
|
#example[
|
|
|
|
Consider the linear, homogenous equation
|
|
|
|
|
|
|
|
$
|
|
|
|
y'' + 5y' + 6y = 0
|
|
|
|
$
|
|
|
|
|
|
|
|
We have two solutions:
|
|
|
|
|
|
|
|
$
|
|
|
|
y_1 (t) e^(-2t) + c_2 e^(-3t)
|
|
|
|
$
|
|
|
|
|
|
|
|
is a general solution. Are these all the solutions?
|
|
|
|
]
|
|
|
|
|
|
|
|
== The Wronskian
|
|
|
|
|
|
|
|
Given any initial values
|
|
|
|
|
|
|
|
$
|
|
|
|
y(t_0) y_0, y' (t_0) = y'_0
|
|
|
|
$
|
|
|
|
|
|
|
|
Substitute in:
|
|
|
|
|
|
|
|
$
|
|
|
|
c_1 y_1(t_0) + c_2 y_2(t_0) = y_0 \
|
|
|
|
c_1 y'_1 (t_0) + c_2 y'_2 (t_0) = y'_0 \
|
|
|
|
$
|
|
|
|
|
|
|
|
We have a linear system for $c_1, c_2$:
|
|
|
|
|
|
|
|
$
|
|
|
|
mat(c_1 y_1(t_0), c_2 y_2(t_0); c_1 y'_1 (t_0), c_2 y'_2 (t_0)) vec(c_1, c_2) = vec(y_0, y'_0)
|
|
|
|
$
|
|
|
|
|
|
|
|
The linear system has a unique solution provided the determinant of the
|
|
|
|
coefficient matrix is nonzero:
|
|
|
|
|
|
|
|
$
|
|
|
|
mat(y_1(t_0), y_2(t_0); y'_1(t_0), y'_2(t_0)) != 0
|
|
|
|
$
|
|
|
|
|
|
|
|
$ W = y_1(t_0) y'_2(t_0) - y_2(t_0) y'_1(t_0) != 0 $
|
|
|
|
|
|
|
|
#definition[
|
|
|
|
This determinant $W$ is called the *Wronskian* of $y_1(t)$ and $y_2(t)$ at
|
|
|
|
the point $t_0$.
|
|
|
|
]
|
|
|
|
|
|
|
|
#fact[
|
|
|
|
If $W != 0$ at some point $t_0$, then it is nonzero throughout the interval $I$ where the solution is defined.
|
|
|
|
]
|
|
|
|
|
|
|
|
To summarize our description of the solution space, if $y_1(t)$, $y_2(t)$ are two solutions of the linear homogenous ODE
|
|
|
|
|
|
|
|
$
|
|
|
|
y'' + p(t) y' + q(t) y = 0
|
|
|
|
$
|
|
|
|
|
|
|
|
such that $W(y_1, y_2)$, then the constants $c_1$, $c_2$ can be uniquely determined so that
|
|
|
|
|
|
|
|
$
|
|
|
|
y(t) = c_1 y_1(t) + c_2 y_2 (t)
|
|
|
|
$
|
|
|
|
|
|
|
|
satisfies any initial condition
|
|
|
|
|
|
|
|
$
|
|
|
|
y(t_0) = y_0, y'(t_0) = y'_0
|
|
|
|
$
|
|
|
|
|
|
|
|
$y(t)$ is the general solution.
|
|
|
|
|
|
|
|
== Solution space with constant coefficients, distinct real roots
|
|
|
|
|
|
|
|
Consider the 2nd order homogenous linear diffeq with constant coefficients.
|
|
|
|
|
|
|
|
$
|
|
|
|
a y'' + b y ' + c y = 0
|
|
|
|
$
|
|
|
|
|
|
|
|
Suppose the characteristic equation
|
|
|
|
|
|
|
|
$
|
|
|
|
a r^2 + b r + c = 0
|
|
|
|
$
|
|
|
|
|
|
|
|
has a pair of *distinct real roots* $r_1$, $r_2$. Then we have a pair of solutions
|
|
|
|
|
|
|
|
$
|
|
|
|
y_1(t) = e^(r_1 t), y_2(t) = e^(r_2 t)
|
|
|
|
$
|
|
|
|
|
|
|
|
Question: is this a fundamental set of solutions?
|
|
|
|
|
|
|
|
Check Wronskian.
|
|
|
|
|
|
|
|
$
|
|
|
|
W = det mat(y_1(t_0), y_2(t_0); y'_1(t_0), y'_2(t_0)) = det mat(e^(r_1 t_0), e^(r_2 t_0); r_1 e^(r_1 t_0), r_2 e^(r_2 t_0)) = e^(r_1 t_0) e^(r_2 t_0) (r_2 - r_1) != 0
|
|
|
|
$
|
|
|
|
|
|
|
|
since $r_1 != r_2$.
|
|
|
|
|
|
|
|
The Wronskian of our two solutions is $!= 0$ so the general solution is indeed
|
|
|
|
|
|
|
|
$
|
|
|
|
y(t) = c_1 e^(r_1 t) + c_2 e^(r_2 t)
|
|
|
|
$
|
|
|
|
|
|
|
|
== 2nd order linear homogenous ODE, complex roots
|
|
|
|
|
|
|
|
As usual consider
|
|
|
|
$ a y'' + b y' + c y = 0 $
|
|
|
|
|
|
|
|
with characteristic equation
|
|
|
|
|
|
|
|
$
|
|
|
|
a r^2 + b r + c = 0
|
|
|
|
$
|
|
|
|
|
|
|
|
If $b^2 - 4a c < 0$, then solutions are complex numbers:
|
|
|
|
|
|
|
|
$
|
|
|
|
r_1 = lambda + i_mu, r_2 = lambda - i_mu
|
|
|
|
$
|
|
|
|
|
|
|
|
with
|
|
|
|
|
|
|
|
$
|
|
|
|
lambda = -b / (2a), mu = sqrt(4 a c - b^2) / (2a) != 0
|
|
|
|
$
|
|
|
|
|
|
|
|
Complex solutions
|
|
|
|
|
|
|
|
$
|
|
|
|
z_1(t) = e^(r_1 t) = e^((lambda + i_mu) t) = e^(lambda t) e^(i_mu t), z_2(t) = e^(r_2 t)
|
|
|
|
$
|
|
|
|
|
|
|
|
What is $e^(i_mu t)$?
|
|
|
|
|
|
|
|
Euler's formula:
|
|
|
|
|
|
|
|
$
|
|
|
|
e^(i theta) = cos theta + i sin theta
|
|
|
|
$
|
|
|
|
|
|
|
|
Using Euler's formula we can write
|
|
|
|
|
|
|
|
$
|
|
|
|
z_1(t) = e^(r_1 t) = e^((lambda + i_mu) t) = e^(lambda t) e^(i_mu t) = e^(lambda t) [cos mu t + i sin mu t] \
|
|
|
|
z_2(t) = e^(r_2 t) = e^((lambda - i_mu) t) = e^(lambda t) e^(-i_mu t) = e^(lambda t) [cos mu t - i sin mu t]
|
|
|
|
$
|
|
|
|
|
|
|
|
Define
|
|
|
|
|
|
|
|
$
|
|
|
|
y_1(t) = 1 / 2 [z_1(t) + z_2(t)] = e^(lambda t) cos mu t, "real part of" z_1(t) \
|
|
|
|
y_2(t) = 1 / (2i) [z_1(t) - z_2(t)] = e^(lambda t) sin mu t, "imaginary part of" z_1(t) \
|
|
|
|
$
|
|
|
|
|
|
|
|
By the superposition principle, they are solutions. Are they a fundamental set
|
|
|
|
of solutions? Are they a basis for the solution space?
|
|
|
|
|
|
|
|
Check the Wronskian:
|
|
|
|
|
|
|
|
We see that it is nonzero, therefore, when $b^2 - 4 a c < 0$, the equation
|
|
|
|
|
|
|
|
$
|
|
|
|
a y'' + b y' + c y = 0
|
|
|
|
$
|
|
|
|
|
|
|
|
has two real solutions
|
|
|
|
|
|
|
|
$
|
|
|
|
y_1(t) = e^(lambda t) cos mu t, y_2(t) = e^(lambda t) sin mu t
|
|
|
|
$
|
|
|
|
|
|
|
|
where
|
|
|
|
|
|
|
|
$
|
|
|
|
lambda = -b / (2a), mu = sqrt(4a c - b^2) / (2a) != 0
|
|
|
|
$
|
|
|
|
|
|
|
|
The Wronskian of these solutions is nonzero, so $y_1$ and $y_2$ are a fundamental set of solutions. The general solution of the equation is
|
|
|
|
|
|
|
|
$
|
|
|
|
y(t) = c_1 e^(lambda t) cos mu t + c_2 e^(lambda t) sin mu t
|
|
|
|
$
|
|
|
|
|
|
|
|
== Amplitude and phase angle
|
|
|
|
|
|
|
|
Given $c_1 cos(omega_0 t) + c_2 sin(omega_0 t)$, express it as a single cosine
|
|
|
|
function so we can graph it. Recall this formula:
|
|
|
|
|
|
|
|
$
|
|
|
|
cos(alpha - beta) = cos(alpha) cos(beta) + sin(alpha) sin(beta)
|
|
|
|
$
|
|
|
|
|
|
|
|
Write
|
|
|
|
|
|
|
|
$
|
|
|
|
c_1 cos(omega_0 t) + c_2 sin(omega_0 t) \
|
|
|
|
= sqrt(c_1 ^2 + c_2 ^2) cos(omega_0 t - theta) = A cos(omega_0 t - theta)
|
|
|
|
$
|
|
|
|
|
|
|
|
where $A$ is the amplitude, $theta$ is the phase angle with $cos theta = (c_1)/sqrt(c_1^2 + c_2^2)$
|
2025-02-05 01:22:45 -08:00
|
|
|
|
|
|
|
== Some trig review (yuck)
|
|
|
|
|
|
|
|
#fact[
|
|
|
|
The following trig identity is useful
|
|
|
|
|
|
|
|
$
|
|
|
|
A cos(omega t) + B sin(omega t) = C cos(omega t - gamma)
|
|
|
|
$
|
|
|
|
|
|
|
|
where $C = sqrt(A^2 + B^2)$, $sin(gamma) = B/C$, and $cos(gamma) = A/C$.
|
|
|
|
]<sus-identity>
|
|
|
|
|
|
|
|
To find gamma, we can simply use inverse trig functions.
|
|
|
|
|
|
|
|
#example[
|
|
|
|
Write $x(t) = -2cos(5t) - sin(5t)$ using only one cosine function:
|
|
|
|
|
|
|
|
First note that $A = -2$, $B - -1$, $omega = 5$. Then by @sus-identity,
|
|
|
|
|
|
|
|
$
|
|
|
|
x(t) = -2cos(5t) - sin(5t) \
|
|
|
|
= sqrt(5) cos(5t - gamma)
|
|
|
|
$
|
|
|
|
|
|
|
|
Now note that
|
|
|
|
$
|
|
|
|
tan(gamma) &= sin(gamma) / cos(gamma) \
|
|
|
|
&= 1 / 2
|
|
|
|
$
|
|
|
|
|
|
|
|
Therefore we have the following:
|
|
|
|
|
|
|
|
$
|
|
|
|
gamma = arctan(1/2)
|
|
|
|
$
|
|
|
|
|
|
|
|
But this is not exactly right.
|
|
|
|
|
|
|
|
Recall that $arctan$ produces outputs only in $[-pi/2, pi/2]$. Therefore if
|
|
|
|
we want $cos$ and $sin$ to be negative, we need to add an additional $pi$
|
|
|
|
term. So in fact
|
|
|
|
|
|
|
|
$
|
|
|
|
gamma = arctan(1/2) - pi
|
|
|
|
$
|
|
|
|
|
|
|
|
Which makes $cos(5t + pi - arctan(1/2))$ negative.
|
|
|
|
]
|