revised dirak, systems of linear equations and added lec 32

This commit is contained in:
Sasserisop 2023-11-30 10:41:13 -07:00
parent 1d7f312a86
commit 21619cacd9
8 changed files with 1198 additions and 1429 deletions

View File

@ -95,6 +95,6 @@ $H(s)=\frac{Y(s)}{G(s)}$
$\mathcal{L}^{-1}\{H\}=h(t)$ called the impulse response function. We will see why its called that later.
$y_{*}(t)=(h*g)(t)$ (the first * only denotes a name, it doesn't mean convolution)
$y(t)=(h*g)(t)+c_{1}y_{1}+c_{2}y_{2}$
What does this mean? It means the particular solution for a linear second order equation is composed of the convolution between $g(t)$, which is the force applied to the system, and the impulse response function. But don't know what this means physically yet.
What does this mean? It means the particular solution for a linear second order equation is composed of the convolution between $g(t)$, which is the force applied to the system, and the impulse response function. But I don't know what this means physically yet.
He's finished 8 minutes early, lets go!
#end of lec 20

View File

@ -1,14 +1,16 @@
#start of lec 21
From $ma=F$
From newton's second law: $ma=F$
$m\frac{dv}{dt}=f(t)$
integrate both sides:
$m\int_{t_{0}} ^{t_{1}} \frac{dv}{dt}dt =\int _{{t_{0}}} ^{t_{1}}f(t) \, dt$
$mv(t_{1})-mv(t_{0})=\int _{t_{0}}^{t_{1}}f(t) \, dt$
that is, change in momentum on the LHS equates to an impulse on the RHS.
(picture shown, you can have the same impulse, the same area under the graph if you squish down f(t) to be narrower, as long as you make it taller. If we take it to the extreme we get the Dirak delta function.)
(picture shown, you can have the same impulse, the same area under the graph if you squish down $f(t)$ to be narrower, as long as you make it taller. If we take it to the extreme we get the Dirak delta function.)
The definition of the Dirak delta function:
# Dirak delta function
#dirak_delta
The definition of the Dirak delta function is:
$\delta(t-a)=\begin{cases}0, & t\ne a \\''\infty'', & t=a\end{cases}$
however, a more useful definition is:
$\int _{-\infty} ^{\infty} \delta(t-a)f(t)\, dt=f(a)$
@ -16,128 +18,33 @@ $\int _{-\infty} ^{\infty} \delta(t-a)f(t)\, dt=f(a)$
properties:
$\int_{{-\infty}}^{\infty} \delta(t-a)\, dt=1$
![[Drawing 2023-10-25 13.16.20.excalidraw]]
$\int _{\infty} ^t \delta(x-a)\, dx=\begin{cases}0, & t<a \\ 1, & a\leq t\end{cases}=u(t-a)$
$\int _{-\infty} ^t \delta(t-a)\, dt=\begin{cases}0, & t<a \\ 1, & t\geq a\end{cases}=u(t-a)$
$u'(t-a)=\delta(t-a)$
What is $\mathcal{L}\{\delta(t-a)\}$?
$\mathcal{L}\{\delta(t-a)\}=\int _{0} ^\infty \delta(t-a)e^{-st} \, dt$ for $a>0$
$=\int _{-\infty} ^{\infty} e^{-st} \delta(t-a) \, dt=e^{-as}$ using the definition earlier
#ex
Using the definition earlier:
$$\mathcal{L}\{\delta(t-a)\}=\int _{-\infty} ^{\infty} e^{-st} \delta(t-a) \, dt=e^{-as}$$
## Examples of DE's with Dirak
#ex #second_order_nonhomogenous #dirak_delta #IVP
Solve for $w(t)$:
$$w''+6w'+5w=e^t\delta(t-1) \qquad w(0)=0 \qquad w'(0)=4$$
solving this using something like #voparam would be very difficult, using LT should be very easy!
$s^2W-sw(0)-w'(0)+6sW+5W=\int _{0} ^\infty e^{-st}e^t\delta(t-1)\, dt$
$=s^2-4+6sW+5W=\int _{-\infty} ^\infty e^{-st}e^t\delta(t-1)\, dt$
(we can extend the range of the integral as the integrand is 0 for t<1)
this allows us to use the earlier definition of the delta function ie:
$=e^{-(-s-1)}$ using definition of delta function earlier.
Solving this using something like #voparam would be very difficult, using LT should be very easy!
Hit it with the LT!
$s^2W-\cancel{ sw(0) }-\cancelto{ 4 }{ w'(0) }+6sW-\cancel{ 6w(0) }+5W=\int _{0} ^\infty e^{-st}e^t\delta(t-1)\, dt$
Now we try to isolate for $W$
$=s^2W-4+6sW+5W=\int _{-\infty} ^\infty e^{-st}e^t\delta(t-1)\, dt$
(we can extend the range of the integral as the integrand is 0 for all t<1)
this allows us to use the definition of Dirak on the RHS, namely: $\int _{-\infty} ^{\infty} \delta(t-a)f(t)\, dt=f(a)$
> Alternatively, you could have taken the laplace of the RHS by using properties 2 and 14 from the [big LT table](drawings/bigLTtable.png).
$W(s^2+6s+5)=4+ee^{-s}$
$W(s)=\frac{4}{(s+1)(s+5)}+\frac{ee^{-s}}{(s+1)(s+5)}$
$w(t)=\frac{1}{4}\mathcal{L}^{-1}\left\{ \frac{1}{s+1} - \frac{1}{s+5} \right\}+e\mathcal{L}^{-1}\{e^{-s}\left( \frac{1}{s+1} - \frac{1}{s+5} \right)\}$
$=\underbrace{ \frac{1}{4}(e^{-t}-e^{ -5t }) }_{ \text{this came from initial conditions} }+\dots$
Using partial fractions:
$w(t)=\mathcal{L}^{-1}\left\{ \frac{1}{s+1} - \frac{1}{s+5} \right\}+\frac{e}{4}\mathcal{L}^{-1}\left\{ e^{-s}\left( \frac{1}{s+1} - \frac{1}{s+5} \right) \right\}$
$=\underbrace{(e^{-t}-e^{ -5t }) }_{ \text{this came from initial conditions} }+\frac{e}{4}\mathcal{L}^{-1}\{\dots\}$
for second term use property:
$\mathcal{L}^{-1}\{e^{as}F(s)\}=f(t-a)u(t-a)$
$$y(t)= \frac{1}{4}(e^{-t}-e^{ -5t }) +\frac{e}{4}u(t-1)(e^{ -(t-1) }-e^{ -5(t-1) })$$
$$y(t)= (e^{-t}-e^{ -5t }) +\frac{e}{4}u(t-1)(e^{ -(t-1) }-e^{ -5(t-1) })$$
notice that the right most term came from the impulse and the effect it had on the system.
side note: delta functions are useful for quantum physics.
Lets start modelling some electric circuits again:
![[Drawing 2023-10-25 13.43.26.excalidraw]]
the circuit is starts switched on and is then switched off at $t=1$
Applying KVL:
$0.2I_{1}+0.1I_{3}'+2I_{1}=g(t) \qquad \text{where } g(t)=\begin{cases}6, & 0\leq t\leq 1 \\0, & 1<t\end{cases}$
$-I_{2}+0.1I_{3}'=0$
$I_{1}=I_{2}+I_{3}$
voila, a system of three equations.
#end of lec 21
#start of lec 22
The prof shared some really cool story of George Green and how he lived on his father's grain mill and derived Green's Theorem and how this theorem eventually came to Stokes desk and Stoke decided to put this new, never before seen theorem on his exam and how it's really not like nowadays where everything is Mcdonalds style, Mcdonalds style education.
Another cool story of Ramanujan, he was very poor, but he managed to enter a school, an accomplishment in and of it self. His teacher saw his magical ability and told him to write to Hardy, a British mathematician. Hardy was impressed and he flew Ramanujan there and worked with him and he saw they things Ramanujan showed and it was inhuman, but he had few mathematical skills so he taught him how to make proofs and now Hardy said that if we were to rate all the mathematicians in the world he would give:
myself 20/100
Hilbert 40/100
Ramanujan 80/100
OKAY get back to the lecture, that's 6 minutes worth of stories. (I really live for Petar's stories. Idk why but they just feel like jewels and I love saving them. I hope he's okay with me doing that.)
We continue on the last lecture problem:
$0.2I_{1}+0.1I_{3}'+2I_{1}=g(t) \qquad \text{where } g(t)=\begin{cases}6, & 0\leq t\leq 1 \\0, & 1<t\end{cases}$
$-I_{2}+0.1I_{3}'=0$
$I_{1}=I_{2}+I_{3}$
two differential equations, one algebraic equation.
express g in terms of unit step funtion:
$g(t)=6-6u(t-1)$
applying this on the second equation:
$-I_{1}+I_{3}+0.1I_{3}'=0$
now we have two equations:
$0.2I_{1}+0.1I_{3}'+2I_{1}=6-6u(t-1)$
$-I_{1}+I_{3}+0.1I_{3}'=0$
where $I_1(0)=I_{2}(0)=I_{3}=0$
multiply eqations by 10:
$2I_{1}+1I_{3}'+20I_{1}=60(1-u(t-1))$
$-10I_{1}+10I_{3}+I_{3}'=0$
hit it with the LT!
$J_{1}=\mathcal{L}\{I_{1}(t)\}(s)$
$J_3=\mathcal{L}\{I_{3}\}$
$2sJ_{1}+sJ_{3}+20J_{1}=\mathcal{L}\{g(t)\}$
$2(s+10)J_{1}+sJ_{3}=\dots$
$-10J_{1}+(s+10)J_{3}=0$
where $\dots$ is:
using:
$\mathcal{L}\{f(t-a)u(t-a)\}=e^{-as}F(s)$
$\mathcal{L}^{-1}\{e^{-as}F(s)\}=f(t-a)u(t-a)$
so:
$2(s+10)J_{1}+sJ_{3}=60 \frac{1-e^{-s}}{s}$
multiply 2 by s+10
multiply 1 by s:
$J_{1}(s)=30 \frac{s+10}{s(s+5)(s+20)}(1-e^{-s})$
use partial fraction:
$30 \frac{s+10}{s(s+5)(s+20)}=\frac{A}{s}+\frac{B}{s+5}+\frac{C}{s+20}$
$=\frac{{A(s+5)(s+20)+B(s^2+20s)+C(s^2+5s)}}{s(s+5)(s+20)}$
then: $A+B+C=0$
$25A+20B+5C=30$
$100A=300 \implies A=3$
$\implies B=-2 \qquad C=-1$
$J_{1}(s)=\left( \frac{3}{s}-\frac{2}{s+5}- \frac{1}{s+20} \right)(1-e^{-s})$
invert the LT: (use $\mathcal{L}^{-1}\{e^{-as}F(s)\}=f(t-a)u(t-a)$)
$I_{1}=3-2e^{-5t}-e^{-20t}-u(t-1)(3-2e^{-5(t-1)}-e^{-20(t-1)})$
whats $I_{3}$? use: $-10I_{1}+10I_{3}+I_{3}'=0$ (i think)
$J_{3}=\frac{10}{s+10}J_{1}$
$J_{3}=300 \frac{1}{s(s+5)(s+20)}(1-e^{ -s })$
partial fraction it so we can eventually take the inverse LT:
skip some steps:
$J_{3}=\left( \frac{3}{s}-\frac{4}{s+5}+\frac{1}{s+20} \right)(1-e^{ -s })$
$I_{3}=3-4e^{ -5t }+e^{ -20t }-(3-4e^{ -5(t-1) }+e^{ -20(t-1) })u(t-1)$
$I_{2}=I_{1}-I_{3}$
$ay''+by'+cy=f$
$y'=z$
$\begin{cases}y'-z=0 \\az'+bz+cy=f\end{cases}$
last example of the chapter:
#ex
$x'+y=0, \qquad x(0)=0$
$x+y'=1-u(t-z) \qquad y(0)=0$
this is review problem in chapter 7 of the textbook.
hit equation 1 and 2 with the LT:
$sX+Y=0$
$X+sY=\frac{{1-e^{ -2s }}}{s}$
multiply equation 1 by s:
$-(s^2-1)X=\frac{{1-e^{ -2s }}}{2}$
$X(s)=e^{=2s} \frac{1}{s(s-1)(s+1)}-\frac{1}{s(s-1)(s+1)}$
use partial fractions:
$\frac{A}{s}+\frac{B}{s-1}+\frac{C}{s+1}=\frac{1}{s(s-1)(s+1)}$
$A(s^2-1)+B(s^2+s)+C(s^2-s)=1$
$A+B+C=0$
$B-C=0$
$-A=1\implies A=-1$
$\implies B=\frac{1}{2} \qquad C=\frac{1}{2}$
$X(s)=\left( -\frac{1}{s}+\frac{1}{2} \frac{1}{s-1}+\frac{1}{2} \frac{1}{s+1} \right)(e^{ -2s }-1)$
inverse laplace:
$x(t)=1-\frac{1}{2}e^t-\frac{1}{2}e^{-t}-u(t-2)\left( 1-\frac{1}{2}e^{t-2} -\frac{1}{2}e^{-(t-2)}\right)$
$Y=-sX=-s (\frac{-1}{s(s-1)(s+1)}+ \frac{e^{ -2s }}{s(s-1)(s+1)})$
$=\frac{1}{(s-1)(s+1)}- \frac{e^{-2s}}{(s-1)(s+1)}$
$=\frac{1}{2}(1-e^{-2s})\left( \frac{1}{s-1}-\frac{1}{s+1} \right)$
$\implies y(t)=\frac{1}{2}(e^t-e^{-t})-\frac{1}{2}u(t-2)(e^{t-2}-e^{-(t-2)})$
we are done
#end of lec 22
side note: delta functions are useful for quantum physics.

View File

@ -5,7 +5,7 @@ But what is $c_{n}$? They are the coefficients of a fourier transform. We want t
Let's derive how to compute the coefficients of a fourier transform. (feel free to skip to the end)
$f(x)=\sum_{n=1}^\infty b_{n}\sin\left( \frac{n\pi x}{L} \right)$ where L is length of the rod
This is a Fourier series:
This is a Fourier series, it's a more general form of what we have above:
$f(x)=\frac{a_{0}}{2}+\sum_{n=1}^\infty\left( a_{n}\cos\left( \frac{n\pi x}{L} \right) + b_{n}\sin\left( \frac{n\pi x}{L}\right) \right)$
$x \in [-L,L]$
almost everywhere piecewise continuous (?)
@ -55,16 +55,18 @@ If f(x) is continuous on $(-\infty,\infty)$ and $2L$ periodic and if $f'$ is con
![[Partial differential equations (lec 26-27) 2023-11-22 13.14.05.excalidraw]]
#ex lets compute the fourier transform of:
$f(x)=\begin{cases}1, & -\pi\leq x\leq 0 \\x, & 0<x\leq \pi\end{cases}$
L here is $\pi$ clearly.
$L$ here is $\pi$ clearly.
lets find the coefficients $a_{n}$ and $b_{n}$
$a_{n}=\frac{1}{\pi}\left( \int _{-\pi}^0 \cos\left( \frac{n\pi x}{\pi} \right)\, dx +\int _{0}^\pi x\cos(nx)\, dx\right)$
using integration by parts for second term:
$=\frac{1}{\pi}\left( \frac{1}{n}\cancelto{ 0 }{ \sin(nx) }|_{-\pi}^0 +\frac{1}{n}\left( x\cancelto{ 0 }{ \sin(nx) }|_{0}^\pi-\int _{0}^\pi \sin(nx) \, dx \right)\right)$
$a_{n}=\frac{1}{n^2\pi}(\cos(nx)|_{0}^\pi)=\frac{1}{n^2\pi}((-1)^n-1)$ $n=0,1,2,\dots$
$a_{n}=\frac{1}{n^2\pi}(\cos(nx)|_{0}^\pi)=\frac{1}{n^2\pi}((-1)^n-1) \quad n=0,1,2,\dots$
now lets find $b_{n}$
$b_{n}=\frac{1}{\pi}\left( \int _{-\pi}^0\sin(nx) \, dx+\int _{0}^\pi x\sin(nx) \, dx \right)$
$=\frac{1}{\pi}\left( \frac{-1}{n}\cos(nx)|_{-\pi}^0-\frac{1}{n}\left( x\cos(nx)|_{0}^\pi-\int _{0}^\pi \cos(nx)\, dx \right) \right)$
$b_{n}=\frac{1}{n\pi}((-1)^n(1-\pi)-1)$ $n=1,2,\dots$
$b_{n}=\frac{1}{n\pi}((-1)^n(1-\pi)-1) \quad n=1,2,\dots$
we find that
$a_{2n}=0$
@ -117,8 +119,7 @@ not only that but the a terms are:
$\frac{a_{0}}{2}+\sum_{n=1}^\infty a_{n}\cos\left( \frac{n\pi x}{L} \right)$
$a_{n}=\frac{2}{L}\int _{0}^L f(x)\cos\left( \frac{n\pi x}{L} \right)\, dx$
remember that $\sum_{n=1}^\infty b_{n}\sin\left( \frac{n\pi x}{L} \right)$
was the expansion of the eigen value function from the heat equation?
remember that $\sum_{n=1}^\infty b_{n}\sin\left( \frac{n\pi x}{L} \right)$ was the expansion of the eigen value function from the heat equation?
then $\frac{a_{0}}{2}+\sum_{n=1}^\infty a_{n}\cos\left( \frac{n\pi x}{L} \right)$ is also an expansion of some related eigen value function.
#ex Fourier sine series for $f(x)=x^2$ from $0\leq x\leq \pi$

View File

@ -1,28 +0,0 @@
Let's revisit the heat equation:
The first time the heat equation was introduced, we figured out that it's solution was of the form $u(t,x)=\sum_{n=1}^\infty c_{n}e^{-(n\pi/L)^2Dt}\sin\left( \frac{n\pi x}{L} \right)$
Now that we learned about fourier series and eigen value problems, we can finally solve it! (for a given specific case.)
IBVP of heat eq:
$\frac{ \partial u }{ \partial t }=D\frac{ \partial^{2} u }{ \partial x^{2} }$ for $0\leq x\leq L$ for $t>0$
$u(t,0)=u(t,L)=0, \quad t>0$
$u(0,x)=f(x), \quad 0\leq x\leq L$
lets choose $L=\pi$
$f(x)=\begin{cases}-x & 0\leq x\leq \frac{\pi}{2} \\1-x & \frac{\pi}{2}<x\leq \pi\end{cases}$
![[Lec 30 2023-11-24 13.42.29.excalidraw]]
So we have a non-uniformly heated rod with both ends insulated. What happens to the temperature inside the rod over time? <i>"\[...\]. Very interesting problem."</i> -Prof (I agree.)
If we made this a series, where would it converge? Well it's continuous from 0 to pi and its windowed form when repeated will be convergent everywhere, this is good news for us.
Separation of variables: $u(t,x)=T(t)X(x)$
theres a theorem that this will give a unique solution.
$T'X=DTX''$
$\frac{T'}{DT}=\frac{X''}{X}$
LHS is a function of t only , RHS is function of x only.
<i>"I don't know what is time, I know space, I can take a step and see the step I take, but can you see time? Can you see the future? Some can but I can't."</i> -prof. Very philosophical.
$X''+\lambda X=0$ where $X(0)=X(L=\pi)=0$
$u(t,0)=T(t)X(0)=0$
case 1) $\lambda<0$, $r_{1,2}=\pm \sqrt{ -\lambda }$
$X(x)=c_{1}e^{ \sqrt{ -\lambda }x }+c_{2}e^{ -\sqrt{ -\lambda }x }$
$X(0)=c_{1}+c_{2}=0$
$X(\pi)=c_{1}e^{ \sqrt{ -\lambda }\pi }+c_{2}e^{ -\sqrt{-\lambda }\pi }=0$
$c_{1}=c_{2}=0$
we will continue the problem in the next lecture.
#end of lec 30

View File

@ -0,0 +1,155 @@
Let's revisit the heat equation:
The first time the heat equation was introduced, we figured out that it's solution was of the form $u(t,x)=\sum_{n=1}^\infty c_{n}e^{-(n\pi/L)^2Dt}\sin\left( \frac{n\pi x}{L} \right)$
Now that we learned about fourier series and eigen value problems, we can finally solve it! (for a given specific case.)
IBVP of heat eq:
$\frac{ \partial u }{ \partial t }=D\frac{ \partial^{2} u }{ \partial x^{2} }$ for $0\leq x\leq L$ for $t>0$
$u(t,0)=u(t,L)=0, \quad t>0$
$u(0,x)=f(x), \quad 0\leq x\leq L$
lets choose $L=\pi$
$f(x)=\begin{cases}-x & 0\leq x\leq \frac{\pi}{2} \\1-x & \frac{\pi}{2}<x\leq \pi\end{cases}$
![[Lec 30 2023-11-24 13.42.29.excalidraw]]
So we have a non-uniformly heated rod with both ends insulated. What happens to the temperature inside the rod over time? <i>"\[...\]. Very interesting problem."</i> -Prof (I agree.)
If we made this a series, where would it converge? Well it's continuous from 0 to pi and its windowed form when repeated will be convergent everywhere, this is good news for us.
Separation of variables: $u(t,x)=T(t)X(x)$
theres a theorem that this will give a unique solution.
$T'X=DTX''$
$\frac{T'}{DT}=\frac{X''}{X}$
LHS is a function of t only , RHS is function of x only.
<i>"I don't know what is time, I know space, I can take a step and see the step I take, but can you see time? Can you see the future? Some can but I can't."</i> -prof. Very philosophical.
$X''+\lambda X=0$ where $X(0)=X(L=\pi)=0$
$u(t,0)=T(t)X(0)=0$
case 1) $\lambda<0$, $r_{1,2}=\pm \sqrt{ -\lambda }$
$X(x)=c_{1}e^{ \sqrt{ -\lambda }x }+c_{2}e^{ -\sqrt{ -\lambda }x }$
$X(0)=c_{1}+c_{2}=0$
$X(\pi)=c_{1}e^{ \sqrt{ -\lambda }\pi }+c_{2}e^{ -\sqrt{-\lambda }\pi }=0$
$c_{1}=c_{2}=0$
we will continue the problem in the next lecture.
#end of lec 30
#start of lec 31
"Can we skip the assignment?"
Petar replies:
You have a choice, not just in math but in life,
confusions says there's three things you cant take back
opportunity to do something, time, and your word
so do your last assignment and don't pass up the opportunity!
recall last lec:
$\frac{ \partial u }{ \partial t }=\frac{ \partial u^2 }{ \partial x^2 }, 0\leq x\leq \pi, t>0$
$u(t,0)=u(t,\pi)=0, t>0$ <- Dirichlet (french mathematician) IVP.
$u(0,x)=f(x), \quad 0\leq x<\pi$
$f(x)=\begin{cases}-x, & 0\leq x\leq \frac{\pi}{2} \\x-\pi, & \frac{\pi}{2}{\leq x\leq \pi}\end{cases}$
graph of tube when t=0. here.
$u(t,x)=T(t)X(x)$
$=X+\lambda X=0, \quad X(0)=X(\pi)=0$
case 1) $\lambda<0 \implies$ $X(x)=0$
case 2) $\lambda=0 \implies X(x)==0$
$X(0)=0=c_{2}$
$X(\pi)=0=c_{1}\pi$
case 3) $\lambda>0$
$X(x)=c_{1}\cos(\sqrt{ \lambda }x)+c_{2}\sin(\sqrt{ \lambda }x)$
$X(0)=c_{1}=0$
$X(\pi)=0=c_{2}\sin(\sqrt{ \lambda }\pi)\implies \sqrt{ \lambda }\pi=n\pi\quad n=1,2,\dots$
$\lambda_{n}=n^2$ a countable infinitely many lambdas (taggable with an index)
real numbers are uncountable
"what is a point? a point on a screen on a peice of paper?" (We have lost our minds)
$X_{n}(x)=c_{2}\sin(nx)$
but obviously, we don't need the multiples of an eigen value so we set $c_{2}=1$ (or any arbitrary non zero constant)
$X_{n}(x)=\sin(nx)$
$u(t,x)=T(t)X(x)$
$\frac{T'}{T}=-n^2$
integrate both sides:
$T_{n}(t)=b_{n}e^{-n^2t}$
$u_{n}(t,x)=b_{n}e^{-n^2t}\sin(nx), n=1,2,\dots$
$u(t,x)=\sum_{n=1}^\infty b_{n}e^{-n^2t}\sin(nx)$
$u(0,x)=f(x)=\sum_{n=1}^\infty b_{n}\sin(nx)$
$b_{n}=\frac{2}{\pi}\int _{0}^\pi f(x)\, dx$
$b_{n}=\frac{2}{\pi}[-\int _{0} ^\frac{\pi}{2} x\sin(nx) \, dx+\int _{\frac{\pi}{2}} ^\pi x\sin(nx) \, dx-\pi \int _{\frac{\pi}{2}} ^\pi \sin(nx)\, dx]$
$\int x\sin(nx) \, dx=-\frac{1}{n}\left( x\cos(nx)-\int \cos(nx) \, dx \right)$
$=-\frac{1}{n}\left( x\cos(nx)-\frac{1}{n}\sin(nx) \right)=\frac{1}{n^2}\sin(nx)-\frac{1}{n}x\cos(nx)$
bla bla bla, we get that $b_{n}$ is:
$b_{n}=\frac{2}{\pi}\left[ \frac{\pi}{2n}\cos \frac{n\pi}{2}-\frac{1}{n^2}\sin \frac{n\pi}{2}-\frac{1}{n^2}\sin \frac{n\pi}{2}-\frac{\pi}{n}(-1)^n +\frac{\pi}{2n}\cos \frac{n\pi}{2}+\frac{\pi}{n}(-1)^n-\frac{\pi}{n}\cos \frac{n\pi}{2} \right]$
$b_{n}=-\frac{4}{n^2\pi}\sin \frac{n\pi}{2}, \quad n=1,2,\dots$
$n=2k\implies b_{2k}=0, \quad k=1,2,\dots$
$n=2k-1\implies b_{2k-1}=-\frac{4}{(2k+1)^2\pi}(-1)^{k+1}, \quad k=1,2,\dots$
$b_{2k-1}=\frac{4}{(2k+1)^2\pi}(-1)^{k}$
$$u(t,x)=\sum_{n=1}^\infty \frac{(-1)^k}{(2k-1)^2}e^{-(2k-1)^2t}\sin((2k-1)x)$$
notice that the limit of the sum as $t\to \infty$ is $0$
graph time! But oh no! He forgot the plot from the last lecture, i went to grab it for him.
While I was gone, I heard he shared stories about his family. Unfortunately I missed it.
if you imagine the plot was showing conc. of co2 in a room, it follows a similar curve as time goes on as the gas diffuses.
(5 more lectures, left)
$k\frac{ \partial u }{ \partial x }=0$
where $k$ is the thermal conductivity,
$\frac{ \partial u }{ \partial x }=0|_{0<x<L}$
this gives a new equation type: Neumann type.
$\frac{ \partial u }{ \partial t }=D\frac{ \partial^2 u }{ \partial x^2 }, \quad 0\leq x\leq L, \quad t>0$
$\frac{ \partial u }{ \partial x }(t,0)=\frac{ \partial u }{ \partial x }(t,L)=0, \quad t>0$
$u(0,x)=f(x) \quad 0\leq x\leq \pi$
#end of lec 31
#start of lec 32
back to the heat problem
we do the Neumann problem, start with separation of variables.
assume we can seperate the variable into two different functions:
$u(t,x)=T(t)X(x)$
plug into: $\frac{ \partial u }{ \partial t }=D\frac{ \partial^2 u }{ \partial x^2 }$
$T'X=DTX''$
$\frac{T'}{DT}=\frac{X''}{X}=-\lambda$
$X''+\lambda X=-\lambda$ second order DE.
$u(t,x)=T(t)X(x) \implies$ $T'(0)\cancel{ T(t) }=0$ divide out $T$
then the boundary conditions are
$X''+\lambda X=0 \quad X'(0)=0 \quad X'(L)=0$ reminisient of dirchett problem conditions. the two edges are insulated here.
</br>
case 1) $\lambda<0 \implies X(x)=c_{1}e^{\sqrt{ -\lambda }x}+c_{2}e^{-\sqrt{ -\lambda }x}$
$X'(0)=0+c_{1}\sqrt{ -\lambda }-c_{2}\sqrt{ -\lambda }=0$
$X'(L)=0$ $c_{1}\sqrt{ -\lambda }e^{\sqrt{ -\lambda }L}-c_{2}\sqrt{ -\lambda }e^{-\sqrt{ -\lambda }L}$
$\implies c_{1}=c_{2}$
</br>
case 2) $\lambda=0$
$X(x)=c_{1}x+c_{2}$
$X'(0)=c_{1}=0$
$X'(L)=c_{1}=0$
$\implies X_{0}(x)=1$ the rest are constant multiples, we could pick any non zero constant.
</br>
case 3) $\lambda>0$
$X(x)=c_{1}\cos(\sqrt{ \lambda }x)+c_{2}\sin(\sqrt{ \lambda }x)$
$X'(0)=-c_{1}\sqrt{ \lambda }\sin(0)+c_{2}\sqrt{ \lambda }\cos(\sqrt{ \lambda }0)=0 \implies c_{2}=0$
$X'(L)=-c_{1} \sqrt{ \lambda }\sin(\sqrt{ \lambda }L)=0 \implies c_{1}\sin(\sqrt{ \lambda }L)=0$
$$\implies \lambda_{n}=\left( \frac{n\pi}{L} \right)^2 \qquad n=1,2,\dots$$
$$X_{n}(x)=\cancel{ c_{1} }\cos\left( \frac{n\pi x}{L} \right)$$
Any constant multiple of an eigen function is an eigen function so we get rid of the $c_{1}$.
This is a different result than what we got last time, good to note.
</br>
$\frac{T_{n}'}{DT_{n}}=-(\frac{n\pi}{L})^2$ for $n=0,1,2,\dots$
$T_{n}(t)=c_{n}e^{-D(n\pi/L)^2t}$
$u(t,x)=\frac{a_{0}}{2}+\sum_{n=1}^\infty a_{n}e^{-D(n\pi/L)^2t}\cos\left( \frac{n\pi x}{L} \right)$
$a_{0}=2c_{0}$
$a_{n}=c_{n}$
$u(0,x)=\frac{a_{0}}{2}+\sum_{n=1}^\infty a_{n }\cos\left( \frac{n\pi x}{L} \right)=f(x)$
this is a fourier cos series, last time we had a fourier sin series.
$a_{0}=\frac{2}{L}\int _{0}^Lf(x) \, dx$
$a_{n}=\frac{2}{L}\int _{0}^L f(x)\cos\left( \frac{n\pi x}{L} \right)\, dx$
plug these into the solution
kaboom we have a solution to the problem in the form of a fourier series.
$u(t,x)=\frac{a_{0}}{2}+\sum_{n=1}^\infty a_{n}e^{-D(n\pi/L)^2t}\cos\left( \frac{n\pi x}{L} \right)$ and this is called a formal solution.
do you remember the two rules for convergance for fourier series?
theorems are not rules they are not axioms. a rule is given, you dont prove it, theorems are what you prove.
$D=1, L=\pi, f(x)=\begin{cases}1, & 0\leq x\leq \frac{\pi}{2} \\0, & \frac{\pi}{2}<x\leq \pi\end{cases}$
this gives a similar solution:
$u(t,x)=\frac{a_{0}}{2}+\sum_{n=1}^\infty a_{n}e^{-n^2t}\cos\left({n x} \right)$
$u(0,x)=\frac{a_{0}}{2}+\sum_{n=1}^ \infty a_{n}\cos\left( \frac{n\pi x}{L} \right)=f(x)$
$a_{0}=\frac{2}{\pi}\int _{0} ^{\pi/2} \, dx=1$
$a_{n}=\frac{2}{\pi}\int _{0} ^{\pi/2} \cos(nx) \, dx=\frac{2}{n\pi}\sin(nx)|_{0} ^\frac{\pi}{2}=\frac{2}{n\pi}\sin\left( \frac{n\pi}{2} \right) \quad n=1,2,\dots$
$u(t,x)=\frac{1}{2}+\frac{2}{\pi}\sum_{k=1}^\infty \frac{(-1)^{k+1}}{2k-1}e^{-(2k-1)^2t}\cos((2k-1)x)$
we are done, and we didn't need to take out the zero terms but if you want to be diligent, then there you go.
"Can we just memorize the formula and plug in the values"
His reply was something along the lines of:
No! Please don't, you'll put in some arbitrary values with the wrong boundary conditions and arive with some crap result. You would need to redo the calculations and get completely new eigen values and eigen functions. I know how much you guys love formulas. But you need to understand what's happening, I don't know who thought it would be a good idea to make people memorize formulas, certainly not my idea. I want to be confident in the future engineers and the bridges that are built.
...
Reminds me of what he said when he was talking about George Green, and how nowadays everything is McDonalds style, even our education. Maybe this is what he is referring to.
#end of lec 32

View File

@ -0,0 +1,109 @@
#ex #SoLE
Lets start modelling some electric circuits again:
![[Drawing 2023-10-25 13.43.26.excalidraw]]
The circuit is switched on (battery in series) at $t=0$ and is then switched off (battery is bypassed) at $t=1$
Applying KVL:
$0.2I_{1}'+0.1I_{3}'+2I_{1}=g(t) \qquad \text{where } g(t)=\begin{cases}6, & 0\leq t\leq 1 \\0, & 1<t\end{cases}$
$-I_{2}+0.1I_{3}'=0$
$I_{1}=I_{2}+I_{3}$
Voila, a system of three linear equations.
#end of lec 21
#start of lec 22
eq 1) $0.2I_{1}'+0.1I_{3}'+2I_{1}=g(t) \qquad \text{where } g(t)=\begin{cases}6, & 0\leq t\leq 1 \\0, & 1<t\end{cases}$
eq 2) $-I_{2}+0.1I_{3}'=0$
eq 3) $I_{1}=I_{2}+I_{3}$
Two differential equations, one algebraic equation. Our goal is to solve for $I_{1}\ I_{2}$ and $I_{3}$
express g in terms of unit step function:
$g(t)=6-6u(t-1)$
combine equations 2 and 3:
$-I_{1}+I_{3}+0.1I_{3}'=0$
now we have just two equations:
eq 1) $0.2I_{1}'+0.1I_{3}'+2I_{1}=6-6u(t-1)$
eq 2) $-I_{1}+I_{3}+0.1I_{3}'=0$
where $I_1(0)=I_{2}(0)=I_{3}(0)=0$ (the battery is just connected at $t=0$)
multiply both equations by 10:
$2I_{1}'+1I_{3}'+20I_{1}=60(1-u(t-1))$
$-10I_{1}+10I_{3}+I_{3}'=0$
hit it with the LT!
let:
$J_{1}=\mathcal{L}\{I_{1}(t)\}(s)$
$J_3=\mathcal{L}\{I_{3}\}$
then:
$2sJ_{1}-\cancel{ 2I_{1}(0) }+sJ_{3}-\cancel{ I_{3}(0) }+20J_{1}=\mathcal{L}\{60(1-u(t-1))\}$
$2(s+10)J_{1}+sJ_{3}=60\left( \frac{1}{s}-\frac{e^{-s}}{s} \right)$
$=2(s+10)J_{1}+sJ_{3}=60 \frac{1-e^{-s}}{s}$
Now for the second eq, hitting it with the LT yields:
$-10J_{1}+(s+10)J_{3}=0$
Let's isolate $J_{1}$:
$\begin{align} 2(s+10)J_{1}+sJ_{3}&=60 \frac{1-e^{-s}}{s}&\times(s+10) \\ -\quad-10J_{1}+(s+10)J_{3}&=0&\times s \\ \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_&\_\_\_\_\_\_\_\_\_\_\_\_\_\end{align}$
$=\quad2(s+10)(s+10)J_{1}+\cancel{ sJ_{3}(s+10) }+10sJ_{1}-\cancel{ s(s+10)J_{3} }=(s+10)60 \frac{1-e^{-s}}{s}$
$=2(s^2+20s+100+5s)J_{1}=(s+10)60 \frac{1-e^{-s}}{s}$
$(s+5)(s+20)J_{1}=(s+10)30 \frac{1-e^{-s}}{s}$
$J_{1}(s)=30 \frac{s+10}{s(s+5)(s+20)}(1-e^{-s})$
use partial fractions:
$30 \frac{s+10}{s(s+5)(s+20)}=\frac{A}{s}+\frac{B}{s+5}+\frac{C}{s+20}$
$=\frac{{A(s+5)(s+20)+B(s^2+20s)+C(s^2+5s)}}{s(s+5)(s+20)}$
Solve the system of equations:
$A+B+C=0$
$25A+20B+5C=30$
$100A=300 \implies A=3$
$\implies B=-2 \qquad C=-1$
$J_{1}(s)=\left( \frac{3}{s}-\frac{2}{s+5}- \frac{1}{s+20} \right)(1-e^{-s})$
invert the LT: (use $\mathcal{L}^{-1}\{e^{-as}F(s)\}=f(t-a)u(t-a)$)
$I_{1}=3-2e^{-5t}-e^{-20t}-u(t-1)(3-2e^{-5(t-1)}-e^{-20(t-1)})$
Nice! Now we solve for $I_{3}$. Let's use: $-10J_{1}+(s+10)J_{3}=0$
$J_{3}=\frac{10}{s+10}J_{1}$
$J_{3}=300 \frac{1}{s(s+5)(s+20)}(1-e^{ -s })$
partial fraction it so we can eventually take the inverse LT:
skip some steps:
$J_{3}=\left( \frac{3}{s}-\frac{4}{s+5}+\frac{1}{s+20} \right)(1-e^{ -s })$
$I_{3}=3-4e^{ -5t }+e^{ -20t }-(3-4e^{ -5(t-1) }+e^{ -20(t-1) })u(t-1)$
Finally, $I_{2}$ is simply:
$I_{2}=I_{1}-I_{3}$
Our final answer is:
$$\begin{matrix}I_{1}=3-2e^{-5t}-e^{-20t}-u(t-1)(3-2e^{-5(t-1)}-e^{-20(t-1)}) \\I_{3}=3-4e^{ -5t }+e^{ -20t }-(3-4e^{ -5(t-1) }+e^{ -20(t-1) })u(t-1) \\I_{2}=I_{1}-I_{3}\end{matrix}$$
Every 2nd order linear equation can be written as a system of 2 1st order linear equations:
$ay''+by'+cy=f$
$y'=z$
$\begin{cases}y'-z=0 \\az'+bz+cy=f\end{cases}$
last example of the chapter:
#ex
$x'+y=0, \qquad x(0)=0$
$x+y'=1-u(t-2) \qquad y(0)=0$
This is a review problem in chapter 7 of the textbook.
Hit equation 1 and 2 with the LT:
$sX+Y=0$
$X+sY=\frac{{1-e^{ -2s }}}{s}$
Let's isolate $X$
multiply equation 1 by $s$
and subtract eq 1 from eq 2:
$-(s^2-1)X=\frac{{1-e^{ -2s }}}{2}$
$X(s)=e^{-2s} \frac{1}{s(s-1)(s+1)}-\frac{1}{s(s-1)(s+1)}$
use partial fractions:
$\frac{A}{s}+\frac{B}{s-1}+\frac{C}{s+1}=\frac{1}{s(s-1)(s+1)}$
$A(s^2-1)+B(s^2+s)+C(s^2-s)=1$
$A+B+C=0$
$B-C=0$
$-A=1\implies A=-1$
$\implies B=\frac{1}{2} \qquad C=\frac{1}{2}$
$X(s)=\left( -\frac{1}{s}+\frac{1}{2} \frac{1}{s-1}+\frac{1}{2} \frac{1}{s+1} \right)(e^{ -2s }-1)$
inverse laplace:
$$x(t)=1-\frac{1}{2}e^t-\frac{1}{2}e^{-t}-u(t-2)\left( 1-\frac{1}{2}e^{t-2} -\frac{1}{2}e^{-(t-2)}\right)$$
Now solve for $y(t)$ too:
$Y=-sX=-s (\frac{-1}{s(s-1)(s+1)}+ \frac{e^{ -2s }}{s(s-1)(s+1)})$
$=\frac{1}{(s-1)(s+1)}- \frac{e^{-2s}}{(s-1)(s+1)}$
partial 'frac it:
$\frac{1}{(s-1)(s+1)}=\frac{A}{s-1}+\frac{B}{s+1}$
$A(s+1)+B(s-1)=1$
$A+B=0$
$A-B=1$
$\implies A=\frac{1}{2} \quad B=-\frac{1}{2}$
$=\frac{1}{2}(1-e^{-2s})\left( \frac{1}{s-1}-\frac{1}{s+1} \right)$
$$\implies y(t)=\frac{1}{2}(e^t-e^{-t})-\frac{1}{2}u(t-2)(e^{t-2}-e^{-(t-2)})$$
we are done
#end of lec 22

View File

@ -20,11 +20,12 @@ I have written these notes for myself, I thought it would be cool to share them.
[(Heaviside) Unit step function (lec 18)](heaviside-unit-step-function-lec-18.html)
[Periodic functions (lec 19)](periodic-functions-lec-19.html)
[Convolution (lec 19-20)](convolution-lec-19-20.html)
[Dirak δ-function (lec 21)](dirak-δ-function-lec-21.html) (raw notes, not reviewed or revised yet.)
[Dirak δ-function (lec 21)](dirak-δ-function-lec-21.html)
[Systems of linear equations (lec 21-22)](systems-of-linear-equations-lec-21-22.html)
[Power series (lec 22-25)](power-series-lec-22-25.html) (raw notes, not reviewed or revised yet.)
[Separation of variables & Eigen value problems (lec 26-28)](separation-of-variables-eigen-value-problems-lec-26-28.html) (raw notes, not reviewed or revised yet.)
[Fourier series (lec 28-29)](fourier-series-lec-28-29.html) (raw notes, not reviewed or revised yet.)
[Partial differential equations (lec 30)](partial-differential-equations-lec-30.html) (raw notes, not reviewed or revised yet.)
[Partial differential equations (lec 30-32)](partial-differential-equations-lec-30-32.html) (raw notes, not reviewed or revised yet.)
</br>
[How to solve any DE, a flow chart](Solve-any-DE.png) (Last updated Oct 1st, needs revision. But it gives a nice overview.)
[Big LT table (.png)](drawings/bigLTtable.png)

File diff suppressed because it is too large Load Diff