MATH201/content/Second order linear equatio...

188 lines
9.1 KiB
Markdown

most of these "models" in EE are based on these DE. You'll see how important DE are in chemical, electrical, mechanical, engphys, civil (very important for civil!), (mining? idk what's in mining :D -prof)
*DE are important* -prof
## Second order linear equations
Second order equations arise from very simple problems many engineers face, for instance a pendulum can be described by a second order equation.
#second_order
### $$a_{2}(t)y''+a_{1}(t)y'+a_{0}(t)y=f(t)$$
To motivate our interest: #fix
![[Drawing 2023-09-15 13.32.48.excalidraw]]
$ma=my''=-by'-ky$
Look how a second order equation describes the motion of a mass-spring system!
> Circuits that contains resistors, capacitors and inductors also behaves with this equation as well if you ignore the external magnetic fields around the circuit.
The equation $my''+by'+ky=0$ is a homogenous second order equation. (in this case, it's full name is homogenous second order linear equation with constant coefficients.)
>Similar pattern with the electrical circuit analogy. This DE ignores external forces on the mass-spring system, it only considers the friction and the spring. If we push the mass then there would be an external force.
It's called second order because we have second derivative in the equation.
#ex #second_order
### $$y''-4y'+3y=0$$
(This is obviously homogenous as stated by prof, although I don't understand why that is.)
Imagine there's no y' (meaning no friction) you kind want the derivates to equal itself, an exponential!
We guess the solution is of the form $y(t)=e^{rt}$
$y(t)=e^{rt}$
$y'=re^{rt}$
$y''=r^2e^{rt}$
$r^2e^{rt}-4re^{rt}+3e^{rt}=0$ <- Our guess worked!
$r^2-4r+3=0$
$ar^2+br+c=0$
$r_{1,2}=\frac{{-b\pm \sqrt{ b^2-4ac }}}{2a}$
so $r_{1,2}=1,3$
so two possibilities of the equation:
$y_{1}(t)=e^t$ or $y_{2}(t)=e^{3t}$
so the general solution is the sum of the two possibilities (But why? See principle of super position below.)
$$y(t)=c_{1}e^{t}+c_{2}e^{3t}$$
and we're done.
---
#end of lec 5 #start of lec 6
#ex #IVP #second_order Same equation from last lecture, but now an IVP:
$$y(t)=c_{1}e^{t}+c_{2}e^{3t} \quad c_{1},c_{2}\in\mathbb{R} \quad\text{let } y(0)=0,\ y'(0)=4\quad \text{ What is } c_{1}, c_{2}?$$
> Lemma: $y'(t)=c_{1}y_{1}+c_{2}y_{2}$
> proof: let $y_{1}=e^{r_{1}t}\qquad y_{2}=e^{r_{2}t}$
> $y(t)=c_{1}e^t+c_{2}e^{3t}$
> $y'(t)=c_{1}r_{1}e^{r_{1}t}+r_{2}c_{2}e^{r_{2}t}$
> $y'(t)=c_{1}r_{1}e^{r_{1}t}+c_{2}r_{2}e^{r_{2}t}$
> since $c_{1}r_{1}$ is just a product of two arbitrary constants, we can replace them with a new constant.
> $y'(t)=c_{1}e^{r_{1}t}+c_{2}e^{r_{2}t}$
> $y'(t)=c_{1}y_{1}+c_{2}y_{2} \quad \Box$
We are given $y(0)=0$
$c_{1}e^0+c_{2}e^{3*0}=0$
$c_{1}+c_{2}=0$
We are also given $y'(0)=4$
$c_{1}+3c_{2}=4$
Solving the linear system of equations gives: $c_{1}=-2,\ c_{2}=2$ which gives the solution:
$$y'(t)=-2e^t+2e^{3t}$$
---
Remember from the example above where I said the "general solution is the sum of the two possibilities"? Let's explore and see why that is:
Recap: suppose we have an equation of the form $ay''+by'+cy=0$
$y(t)=e^{rt}$
then $ar^2+br+c=0$
case i) $r_{1},r_{2}=\frac{{-b\pm \sqrt{ b^2-4ac }}}{2a}, {r_{1}}\ne r_{2}$
$y_{1}(t)=e^{r_{1}t}\qquad y_{2}(t)=e^{r_{2}t}$
$y(t)=c_{1}e^{r_{1}t}+c_{2}e^{r_{2}t}$ is also a solution. But why? Principle of super position.
## Principle of super position:
If $y_{1}(t)$ solves $ay''+by'+cy=f_{1}(t)$
and $y_{2}(t)$ solves $ay''+by'+cy=f_{2}(t)$ on an interval $I$.
Then the following function that is a combination: $y(t)=c_{1}y_{1}(t)+c_{2}y_{2}(t)$
solves $ay''+by'+cy=c_{1}f_{1}(t)+c_{2}f_{2}(t)$
Now we prove it:
Plugging in $y=c_{1}y_{1}(t)+c_{2}y_{2}(t)$ into $ay''+by'+cy=c_{1}f_{1}(t)+c_{2}f_{2}(t)$ gives us:
$a(c_1y_{1}''+c_{2}y_{2}'')+b(c_1y_{1}'+c_{2}y_{2}')+c(c_1y_{1}+c_{2}y_{2})=c_{1}f_{1}(t)+c_{2}f_{2}(t)$
moving terms gives us: $c_{1}(ay_{1}''+by_{1}'+cy_{1})+c_{2}(ay_{2}''+by_{2}'+cy_{2})=c_{1}f_{1}(t)+c_{2}f_{2}(t) \quad \Box$
Okay but none of that makes sense, how do we use the proof?
Let the following:
$y_{1}(t)=e^{r_{1}t}$ solves $ay''+by'+cy=0$
$y_2(t)=e^{r_{2}t}$ solves $ay''+by'+cy=0$
$f_{1}(t)=f_{2}(t)=0$
This following can be concluded:
$y(t)=c_{1}e^{r_{1}t}+c_{2}e^{r_{2}t}$ must solve $ay''+by'+cy=0$ by principle of super position.
> Yay! Note this is only true when $f_{1}(t)=f_{2}(t)=0$ aka your RHS in the second order equation must be 0.
case ii) $r_{1}=r_{2}=\frac{-b}{2a}$ if $b^2-4ac=0$
if we assume $y_{1}=e^{r_{1}t}, y_{2}=e^{r_{1}t}$ like before then we get:
$y(t)=c_{1}e^{r_{1}t}+c_{2}e^{r_{1}t}=ce^{r_{1}t}$ <- this doesn't seem like it works! We need two integration constants for a second order equation.
$y_{1}(t)=e^{-bt/2a}, y_{2}(t)=te^{-bt/2a}$ for time being we take this as true, we can prove it later.
$y(t)=c_{1}e^{-\frac{bt}{2a}}+c_{2}te^{-\frac{bt}{2a}}$
we can check later at home, but also, how was the idea for this found? He will tell us later.
### linear algebra 101: linear independence makes unit vectors, which forms a basis.
definition: if $y_{1}, y_{2}$ are solutions to $a(t)y''+b(t)y+c(t)=0$ on some interval $I_{1}$
then they are called linearly independent if none of them is a constant multiple of the other.
Theorem: If $y_{1}(t), y_{2}(t)$ are linearly independent solutions to $ay''+by'+cy=0$ then any other solution can be written as $y(t)=c_{1}y_{1}(t)+c_{2}y_{2}(t)$
how do we know the two solutions are linearly independent? Test for linear independence:
$y_{1}, y_{2}$ are solutions to $a(t)y''+b(t)y+c(t)y=0$ on some interval $I_{1}$
then they are called linearly independent iff
$W(y_{1},y_{2})(t)=\det \begin{pmatrix}y_{1} & y_{2} \\y_{1}' & y_{2}'\end{pmatrix}\ne 0$
(i) $b^2-4ac>0 \Rightarrow r_{1}\ne r_{2}$
$y_{1}=e^{r_{1}t}, y_{2}=e^{r_{2}}t$
$W(y_{1},y_{2})=\det\begin{pmatrix}e^{r_{1}t} & e^{r_{2}t} \\r_{1}e^{r_{1}t} & r_{2}e^{r_{2}t}\end{pmatrix}$
$=e^{t(r_{1}+r_{2})}(r_{2}-r_{1})\ne 0$
(ii) $b^2-4ac=0\Rightarrow$
$r_{1}=r_{2}=-\frac{b}{2a}=r$
$y_{1}(t)=e^{rt}, y_{2}(t)=te^{rt}$
$W(y_{1},y_{2})=\det\begin{pmatrix}e^{rt} & te^{rt} \\re^{rt} & e^{rt}(1+rt)\end{pmatrix}$
$=e^{2rt}(1+rt)-rte^{rt}e^{2rt}$
$=e^{2rt}\ne 0$
#ex #IVP #second_order
$$y''-2y'+y=0, y(0)=1, y'(0)=0$$
$e^{rt}(\underset{ = }{ r^2-2r+1 })=0$
$(r-1)^2=0\Rightarrow r_{1}=r_{2}=1$
$y(t)=c_{1}e^t+c_{2}te^t$
$y(0)=c_{1}=1$
$y(t)=e^t+c_{2}te^t$
$y'(0)=0=1+c_{2}\Rightarrow c_{2}=1$
$$y(t)=e^t-te^t$$
Wow, that was a lot today, my notes look like a mess. I'll have to clean this up and understand what's going on later.
#end of lecture 6
#start of lecture 7 (sept 20)
from last class: if $r_{1}=r_{2}=-\frac{b}{2a}=r$
$y_{1}=e^{rt}, \quad y_{2}=te^{rt}$
general solution:
$$y(t)=c_{1}y_{1}(t)+c_{2}y_{2}(t)$$
however there's a third option:
$b^2-4ac<0$
then we have complex roots
$r_{1,2}=-\frac{b}{2a}\pm\frac{i\sqrt{ 4ac-b^2 }}{2a}=\alpha+i\beta$ <- Complex conjugates. And due to fundamental theorem of algebra, there are only 2 roots.
$e^{r_{1}t}=e^{(\alpha+i\beta)t}=e^{\alpha t}+e^{i\beta t}$
side note: there are no numbers that are more than two components that are "useful", even quaternions
$e^{i\beta t}=e^{i\theta}$
expand into power series:
$=1+\frac{i\theta}{1!}+\frac{{(i\theta)^2}}{2!}=\frac{{(i\theta)^3}}{3!}\dots$
$=1+\frac{i\theta}{1!}-\frac{\theta^2}{2!}-\frac{i\theta^3}{3!}+\frac{\theta^4}{4!}+\frac{i\theta^5}{5!}+\dots$
$=\left( 1-\frac{\theta^2}{2!}+\frac{\theta^4}{4!}-\dots \right)+i\left( \frac{\theta}{1!}-\frac{\theta^3}{2!}+\frac{\theta^5}{3!}\dots\right)$
$e^{i\theta}=\cos(\theta)+i\sin(\theta) \quad \Box$ We have proven the Euler formula
$y(t)=e^{rt}=e^{\alpha t}(\cos \beta t+i\sin \beta t)$
Lemma: If $u(t)+iv(t)$ solves $ay''+by'+cy=0$ then $u(t),\ v(t)$ are also solutions.
Proof:
$a(u+iv)''+b(u+iv)'+c(u+iv)=0$
$\underbrace{ { (au''+bu'+cu) } }_{ =0 }+i\underbrace{ (av''+bv'+cv) }_{ =0 }=0$
$y_{1}(t)=e^{\alpha t}\cos(\beta t),\ y_{2}(t)=e^{\alpha t}\sin(\beta t)$
$\alpha=-\frac{b}{2a},\quad \beta={\frac{\sqrt{ 4ac-b^2 }}{2a}}$
$y(t)=c_{1}y_{1}+c_{2}y_{2}$
now we have to test the two solutions are linearly independent
$W[y_{1},y_{2}]=\det\begin{pmatrix}y_{1} & y_{2} \\ y_{1}' & y_{2}'\end{pmatrix}\ne0$ <- remember to do/show this at home
#ex #IVP
$$y''-2y'+5y=0 \quad y(0)=0 \quad y'(0)=2$$
$r^2-2r+5=0$<-characteristic equation
$r_{1,2}={1\pm \frac{\sqrt{ -4b }}{2}}=1\pm2i$
$y_{1}=e^t\cos(2t)$ $y_{2}=e^t\sin(2t)$
general solution: $y(t)=e^{\alpha t}(c_{1}\cancel{ \cos 2 t }+c_{2}\sin 2 t)$
$y(0)=0=c_{1}$
$y'(0)=c_{2}(e^t)$
*I missed stuff here that he erased*
general solution is:
$$y(t)=e^t\sin(2t)$$
it has a nice graph, where if it was a circuit it would blow up
or if it was a bridge it would collapse
## Something more difficult now:
$ay''+by'+cy=f(t)$ Again, a mass-spring system without any external force.
if f(t)=0 we can find the solution easily and use superposition to get the general solution
$ay''+by'+cy=0$
-> general solution is $y(t)=c_{1}y_{1}(t)+c_{2}y_{2}(t)$
If we can find just one solution in $ay''+by'+cy=f(t)$
let it be $y_{p}(t)$
then the sum of the solutions
$y(t)=c_{1}y_{1}(t)+c_{2}y_{2}(t)+y_{p}(t)$ must solve $ay''+by'+cy=f(t)$
Theorem: If $a(t),\ b(t),\ c(t)$ are continuous on $I$ , then IVP: $a(t)y''+b(t)y'+c(t)y=f(t)$ ; $y(t_{o})=y_{o}$ \ , $y'(t_{o})=y_{1}$ has a unique solution.
we will do the proofs next class.
#end of lecture 7