diff --git a/content/Convolution (lec 19-20).md b/content/Convolution (lec 19-20).md index bb8897d..cfbedaa 100644 --- a/content/Convolution (lec 19-20).md +++ b/content/Convolution (lec 19-20).md @@ -24,11 +24,13 @@ This is a very useful fact. We will see how it helps us solve differential equat ex: $$\mathcal{L}^{-1}\left\{ \frac{1}{s^2+1}\frac{1}{s^2+1} \right\}$$ -we know the inverse of 1/s^2+1 is sin(t): -then: -$=(\sin*\sin)(t)$ -$=\int _{0}^t \sin(t-v)\sin(v)\, dv$ -use identity: $\sin \alpha \sin \beta=\frac{1}{2}(\cos(\alpha-\beta)-\cos(\beta-\alpha)$ DOUBLE CHECK! +we know the inverse LT of $\frac{1}{s^2+1}$ is $\sin(t)$: +then, using property 5: $\mathcal{L}\{f*g\}=F(s)G(s)$ +$f*g=\mathcal{L}^{-1}\{F(s)G(s)\}=(\sin*\sin)(t)$ +$\mathcal{L}^{-1}\{\frac{1}{s^2+1} \frac{1}{s^2+1}\}=(\sin*\sin)(t)$ +using the definition of convolution: +$\mathcal{L}^{-1}\left\{ \frac{1}{s^2+1} \frac{1}{s^2+1} \right\}=\int _{0}^t \sin(t-v)\sin(v)\, dv$ +use trig identity: $\sin \alpha \sin \beta=\frac{1}{2}(\cos(\alpha-\beta)-\cos(\beta+\alpha)$ $=\frac{1}{2}\int _{0} ^t (\cos(t-2v)-\cos(t))\, dv$ $=\frac{1}{2}\left( -\frac{1}{2}\sin(t-2v)|^t_{0}-t\cos t \right)=\frac{1}{2}\left( \frac{1}{2}\sin(t)+\frac{1}{2}\sin(t)-t\cos t \right)$ $$=\frac{1}{2}(\sin t-t\cos t)$$ diff --git a/content/Fourier Series (lec 28-29).md b/content/Fourier Series (lec 28-29).md new file mode 100644 index 0000000..652dc49 --- /dev/null +++ b/content/Fourier Series (lec 28-29).md @@ -0,0 +1,153 @@ + +Remember the heat flow equation? We obtained that it's solution could be expressed in the form: +$$\sum_{n=1}^\infty c_{n}\sin\left( \frac{n\pi x}{L} \right)\quad\text{for}\quad0\leq x\leq L$$ +But what is $c_{n}$? They are the coefficients of a fourier transform. We want to develop a way to compute them. +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: +$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 (?) +has a lot of benefits over taylor series. $f(x)$ doesn't have to be infinitely differentiable (analytic) +f(x) can even have jump discontinuities +lets assume the equation is true when $x \in [-L,L]$ +$\int _{-L} ^L f(x) \, dx=\int _{-L}^L \frac{a_{0}}{2} \, dx+\int _{-L}^L (\text{put summation here}) \, dx$ +$\int _{-L}^L \cos\left( \frac{n\pi x}{L} \right) \, dx=\frac{L}{n\pi}\sin\left( \frac{n\pi x}{L} \right)|_{-L}^L=0$ +same for $\int _{-L}^L \sin\left( \frac{n\pi x}{L} \right)\, dx=0$ (it equals 0) +so +$\int _{-L} ^L f(x) \, dx=\int _{-L}^L \frac{a_{0}}{2} \, dx+\int _{-L}^L0 \, dx$ +$\int _{-L} ^L f(x) \, dx=\int _{-L}^L \frac{a_{0}}{2} \, dx+\int _{-L}^L0 \, dx$ +$a_{0}=\frac{1}{L}\int _{L}^{2?a_{0}L} f(x) \, dx$ +$\int _{-L}^L f(x)\cos\left( \frac{m\pi x}{L} \right)\, dx=\frac{a_{0}}{2}\cancelto{ 0 }{ \int _{-L}^L \cos\left( \frac{m\pi x}{L} \right) \, dx }+\sum_{n=1}^\infty\left( a_{n}\int _{-L}^L\cos\left( \frac{n\pi x}{L} \right)\cos\left( \frac{m\pi x}{L} \right) \, dx \right)+b_{n}\int _{-L}^L \sin\left( \frac{n\pi x}{L} \right)\cos\left( \frac{m\pi x}{L} \right) \, dx$ +use trig identities (will be provided on exam): +$\cos(\alpha)\cos(\beta)=\frac{1}{2}(\cos(\alpha-\beta)+\cos(\alpha+\beta))$ +$\sin(\alpha)\cos(\beta)=\frac{1}{2}(\sin(\alpha+\beta)+\sin(\alpha-\beta))$ +$\sin(\alpha)\sin(\beta)=\frac{1}{2}(\cos(\alpha-\beta)-\cos(\alpha+\beta))$ +$\int _{-L}^L \cos \frac{n\pi x}{L}\cos \frac{m\pi x}{L}\, dx=\frac{1}{2}(\int _{-L}^L \left( \cos \frac{(n-m)\pi x}{L} \right) \, dx+\cancelto{ 0 }{ \frac{\cos(n+m)\pi x}{L} }dx$ +$= \begin{cases}0 & n\ne m \\L & n=m\end{cases}$ + +$\int _{-L}^L \sin \frac{n\pi x}{L}\cos \frac{m\pi}{L} \, dx=0;$ +$\int _{-L}^L \sin \frac{n\pi x}{L}\cos \frac{m\pi}{L} \, dx=\begin{cases}0 & n\ne m \\L & n=m\end{cases}$ + +going back, +$$a_{m}=\frac{1}{L}\int _{-L}^L f(x)\cos \frac{m\pi x}{L} \, dx \quad\text{valid for all }m=0,1,2,\dots$$ +$$b_{m}=\frac{1}{L}\int _{-L}^L f(x)\sin \frac{m\pi x}{L} \, dx=b_{m} \quad m=1,2,\dots$$ +now we know how to compute the coefficients for Fourier series! + +properties: +for functions $f$, $g$, If $\int _{-L}^Lf(x)g(x) \, dx=\begin{cases}0 & f\ne g \\L & f=g \end{cases}$ +then $f, g$ are orthogonal +the forier expantion is called an ortho normal expansion, taylor is not ortho normal. +#end of lec 28 +#start of lec 29 +last lecture we derived how to find the coefficients in a fourier series. +$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]$ +### Theorem: +If $f$ and $f'$ are piecewise continuous on $[-L,L]$, then the fourier series converges to: +$\frac{1}{2}(f(x^-)+f(x^+))$ for all $x \in (-L,L)$ +Basically meaning, the fourier series converges. +At $x=\pm L$ the fourier series converges to $\frac{1}{2}(f(-L^+)+f(L^-))$ +![[Partial differential equations (lec 26-27) 2023-11-22 13.15.26.excalidraw]] +### Theorem: +If f(x) is continuous on $(-\infty,\infty)$ and $2L$ periodic and if $f'$ is continuous, then the taylor series converges to $f(x)$ everywhere +![[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, & 00$ +$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}"\[...\]. Very interesting problem." -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 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." -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 \ No newline at end of file diff --git a/content/Partial differential equations (lec 26-27).md b/content/Separation of variables & Eigen value problems (lec 26-28).md similarity index 78% rename from content/Partial differential equations (lec 26-27).md rename to content/Separation of variables & Eigen value problems (lec 26-28).md index d9ef3e4..069973b 100644 --- a/content/Partial differential equations (lec 26-27).md +++ b/content/Separation of variables & Eigen value problems (lec 26-28).md @@ -2,7 +2,7 @@ #start of lec 26 We start with some thermodynamics # Heat equation -Heat equation not only describes thermodynamics but it can also model the diffusion of gasses. +Heat equation not only describes thermodynamics but it can also model the diffusion of gasses. It is a partial differential equation. Strikingly, it can also model option prices in the stock market. However, using it as a strategy to make money is not so simple, because if it worked then everyone would try to use it to make money, which would cause the overall strategy to be less effective as the option prices start to get priced to accommodate for the prediction (🤯). ![[Drawing 2023-11-08 13.07.19.excalidraw.png]] >I'm sorry the image doesn't display properly :( I'm trying to get images to work on my notes. For now you can see the relevant .png files in the github repo under content/drawings/ @@ -10,7 +10,7 @@ Strikingly, it can also model option prices in the stock market. However, using We assume that the tube is perfectly insulating along its surface, this helps reduce the problem into a one dimensional problem. Heat can only travel inside and along the x axis. Fourier figured out that: $\text{Heat flux} = -k(x)a\frac{\partial u}{\partial x}(t,x) \Delta t$ -heat flux is in the positive x direction +heat flux is in the positive $x$ direction where du/dx is the opposite sign of the flux (because hot flows to cold.) where $u(t,x)$ is a function that describes the temperature in the tube. $-k(x+\Delta x)a\frac{\partial u}{\partial x}(t,x+\Delta x) \Delta t$ @@ -109,4 +109,38 @@ done with class! more history time: why is this important? in 1979 a team of engineers and mathematicians from a company philips they discovered, or practically implemented: that an audio signal has billions of datapoints over time if you represent it as a fourier seriers, and truncate some of the coeffecients we can represent many signals really well. which condenses down the data to just a handful of coefficients this is how EQ's are made too to filter out noise, just set the c_n of the frequencies you dont want to 0 so philips used math, math that is simillar to what we are discussing in the lecture, to make a digital record, the first digital cd. Not only that but fourier series are used for image and video compression as well, although they often use a sum of wavelets instead of a sum of trigonometric functions. -#end of lec 27 \ No newline at end of file +#end of lec 27 +reading week +#start of lec 28 (Nov 20) +$y''-2y'+\lambda y=0 \qquad y(0)=0, \quad y'(\pi)+y(\pi)=0$ +eigen value problem, find $\lambda$ such that the initial conditions are true. +find the characteristic polynomial. +$r^2-2r+\lambda=0$ + +$r_{1,2}=\frac{2\pm \sqrt{ 4-4\lambda }}{2}=1\pm \sqrt{ 1-\lambda }$ +case 1: $1-\lambda>0$ +$y(x)=c_{1}e^{(1+\sqrt{ 1-\lambda })x}+c_{2}e^{ (1-\sqrt{ 1-\lambda })x }$ +$y(0)=0=c_{1}+c_{2}$ +$c_{1}(1+\sqrt{ 1-\lambda })e^{(1+\sqrt{ 1-\lambda })\pi}+c_{2}(1-\sqrt{ 1-\lambda })e^{ (1-\sqrt{ 1-\lambda })\pi }+c_{1}e^{(1+\sqrt{ 1-\lambda })\pi}+c_{2}e^{ (1-\sqrt{ 1-\lambda })\pi }=0$ +$-c_{2}(1+\sqrt{ 1-\lambda })e^{(1+\sqrt{ 1-\lambda })\pi}+c_{2}(1-\sqrt{ 1-\lambda })e^{ (1-\sqrt{ 1-\lambda })\pi }-c_{2}e^{(1+\sqrt{ 1-\lambda })\pi}+c_{2}e^{ (1-\sqrt{ 1-\lambda })\pi }=0$ +$c_{2}=0=c_{1}$ boring solution :( (also called a trivial solution) + +case 2: $1-\lambda=0$ +$y(x)=c_{1}e^x+c_{2}xe^x$ +$y(0)=0=c_{1}$ +$y'(\pi)+y(\pi)=c_{2}(\pi e^\pi+e^\pi+\pi e^\pi)=0 \implies c_{2}=0$ +(same trivial solution.) + +case 3: $1-\lambda<0$ +$r_{1,2}=1\pm i\sqrt{\lambda-1}$ + +$y(x)=e^x(c_{1}\cos(\sqrt{ \lambda-1 }x)+c_{2}\sin(\sqrt{ \lambda-1 }x))$ +$y(0)=0=c_{1}$ +$y(x)=c_{2}e^x\sin \sqrt{ \lambda-1 }x$ +$y'(\pi)+y(\pi)=0=c_{2}(e^\pi \sin \sqrt{ \lambda-1 }\pi+e^\pi \cos( \sqrt{ x-1 }\pi)\sqrt{ \lambda-1 })+c_{2}e^\pi \sin \sqrt{ \lambda-1 }\pi$ +$$2\sin(\sqrt{ \lambda-1 }\pi)-\sqrt{ \lambda-1 }\cos(\sqrt{ \lambda-1 }\pi)=0$$ +This is a transcendental equation, non algebraic, cannot be solved explicitly. +Only option we have is to approximate the eigen values. there are an infinite number of them. +We have to use software in order to obtain a finite number of approximations. I like software, software is good, as long as your being mindful of how you're using it. +"engineers over design things." first they use software and add a 50%, sometimes 300% margin on it. But if your using that big of a margin I can just tell you how far you need to build your house away from the river. -Prof +We are done. \ No newline at end of file diff --git a/content/_index.md b/content/_index.md index a8f147d..584d334 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,6 +1,7 @@ # This is the main index +These are notes for the [University of Alberta MATH 201 - Differential Equations](https://apps.ualberta.ca/catalogue/course/math/201) course. I have written these notes for myself, I thought it would be cool to share them. These notes may be inaccurate, incomplete, or incoherent. No warranty is expressed or implied. Reader assumes all risk and liabilities. -$$\text{Happy reading week! <3\quad - Nov 10 2023}$$ +
[Separable equations (lec 1)](separable-equations-lec-1.html) [Homogenous equations (lec 2)](homogenous-equations-lec-2.html) [Linear equations (lec 2-3)](linear-equations-lec-2-3.html) @@ -21,7 +22,9 @@ $$\text{Happy reading week! <3\quad - Nov 10 2023}$$ [Convolution (lec 19-20)](convolution-lec-19-20.html) (raw notes, not reviewed or revised yet.) [Dirak δ-function (lec 21)](dirak-δ-function-lec-21.html) (raw notes, not reviewed or revised yet.) [Power series (lec 22-25)](power-series-lec-22-25.html) (raw notes, not reviewed or revised yet.) -[Partial differential equations (lec 26-27)](partial-differential-equations-lec-26-27.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.)
[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)