revised fourier and added lec 34

This commit is contained in:
Sasserisop 2023-12-04 23:21:10 -07:00
parent 5f795e0c33
commit 450da746bc
7 changed files with 961 additions and 490 deletions

View File

@ -1,154 +1,177 @@
#fourier
Remember the heat flow equation? We obtained that it's solution could be expressed in the form: 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$$ $$\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. 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) 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 $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, it's a more general form of what we have above: 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)$ $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]$ $x \in [-L,L]$
almost everywhere piecewise continuous (?) It converges to $f(x)$ almost everywhere (convergence will be discussed below)
has a lot of benefits over taylor series. $f(x)$ doesn't have to be infinitely differentiable (analytic) 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 $f(x)$ can even have jump discontinuities
lets assume the equation is true when $x \in [-L,L]$ Let's assume the equation is true when $x \in [-L,L]$
Integrate both sides, it will tell us the DC offset:
$\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 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$ $\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) same for $\int _{-L}^L \sin\left( \frac{n\pi x}{L} \right)\, dx=0$ (it equals 0)
so 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$
$\int _{-L} ^L f(x) \, dx=\int _{-L}^L \frac{a_{0}}{2} \, dx+\int _{-L}^L0 \, dx$ $\int _{-L} ^L f(x) \, dx=a_{0}L$
$a_{0}=\frac{1}{L}\int _{L}^{2?a_{0}L} f(x) \, dx$ $a_{0}=\frac{1}{L}\int _{-L}^{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$ Now let's multiply both sides by $\cos\left( \frac{m\pi x}{L} \right)$ and integrate both sides, this will tell us the $\cos$ components:
$\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 +b_{n}\int _{-L}^L \sin\left( \frac{n\pi x}{L} \right)\cos\left( \frac{m\pi x}{L} \right)\right) \, dx$
use trig identities (will be provided on exam): use trig identities (will be provided on exam):
$\cos(\alpha)\cos(\beta)=\frac{1}{2}(\cos(\alpha-\beta)+\cos(\alpha+\beta))$ $\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)\cos(\beta)=\frac{1}{2}(\sin(\alpha+\beta)+\sin(\alpha-\beta))$
$\sin(\alpha)\sin(\beta)=\frac{1}{2}(\cos(\alpha-\beta)-\cos(\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$ $\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} )+\cancelto{ 0 }{ \cos(\frac{(n+m)\pi x}{L} })\right)dx$
$= \begin{cases}0 & n\ne m \\L & n=m\end{cases}$ $= \begin{cases}0 & n\ne m \\L & n=m\end{cases}$
$\int _{-L}^L \sin \frac{n\pi x}{L}\cos \frac{m\pi x}{L} \, dx=\int _{-L}^L \text{odd}\, dx=0$
$\int _{-L}^L \sin \frac{n\pi x}{L}\cos \frac{m\pi}{L} \, dx=0;$ so:
$\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}$ $\int _{-L} ^L f(x)\cos\left( \frac{m\pi x}{L} \right)\, dx=a_{m}L$
Similarly can be done for when multiplying both sides by $\sin\left( \frac{m\pi x}{L} \right)$ and integrating both sides to find the $\sin$ coefficients:
going back, $\int _{-L}^L f(x)\sin\left( \frac{m\pi x}{L} \right)\, dx=\frac{a_{0}}{2}\cancelto{ 0 }{ \int _{-L}^L \sin\left( \frac{m\pi x}{L} \right) \, dx }+\sum_{n=1}^\infty\left( a_{n}\cancelto{ \text{odd} }{ \int _{-L}^L\cos\left( \frac{n\pi x}{L} \right)\sin\left( \frac{m\pi x}{L} \right) } \, dx +b_{n}\int _{-L}^L \sin\left( \frac{n\pi x}{L} \right)\sin\left( \frac{m\pi x}{L} \right)\right) \, dx$
$\int _{-L} ^L \sin\left( \frac{n\pi x}{L} \right)\sin\left( \frac{m\pi x}{L} \right) \, dx=\frac{1}{2}\int_{-L}^L \cos\left(\frac{(n-m)\pi x}{L} \right)-\cos\left( \frac{(n+m)\pi x}{L} \right)dx$
$=\begin{cases}0, & n\ne m \\L, & n=m\end{cases}$
so:
$\int _{-L} ^L f(x)\sin\left( \frac{m\pi x}{L} \right)\, dx=b_{m}L$
In conclusion:
$$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$$ $$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$$ $$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! Now we know how to compute the coefficients for Fourier series!
properties: properties:
for functions $f$, $g$, If $\int _{-L}^Lf(x)g(x) \, dx=\begin{cases}0 & f\ne g \\L & f=g \end{cases}$ 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 then $f, g$ are orthogonal
the forier expantion is called an ortho normal expansion, taylor is not ortho normal. the Fourier expansion is called an ortho normal expansion, Taylor is not orthonormal.
#end of lec 28 #end of lec 28
#start of lec 29 #start of lec 29
last lecture we derived how to find the coefficients in a fourier series. 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)$ $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]$ $x \in [-L,L]$
### Theorem: ### 1st convergence theorem:
If $f$ and $f'$ are piecewise continuous on $[-L,L]$, then the fourier series converges to: 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)$ $\frac{1}{2}(f(x^-)+f(x^+))$ for all $x \in (-L,L)$
Basically meaning, the fourier series converges. and on $x=\pm L$ the Fourier series converges to $\frac{1}{2}(f(-L^+)+f(L^-))$
At $x=\pm L$ the fourier series converges to $\frac{1}{2}(f(-L^+)+f(L^-))$
![draw](drawings/Drawing-2023-11-22-13.15.26.excalidraw.png) ![draw](drawings/Drawing-2023-11-22-13.15.26.excalidraw.png)
### Theorem: Recall the definition of piecewise continuous: $f(t)$ is piecewise continuous on an interval $I$ if $f(t)$ is continuous on $I$, except possibly at a <u>finite</u> number of points of <u>jump</u> discontinuity (horizontal asymptotes not allowed).
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 ### 2nd Convergence theorem (uniform convergence):
If $f(x)$ is continuous on $(-\infty,\infty)$ and $2L$ periodic and if $f'$ is piecewise continuous on $[-L,L]$, then its Fourier series converges to $f(x)$ everywhere (i.e., the Fourier series converges uniformly).
![draw](drawings/Drawing-2023-11-22-13.14.05.excalidraw.png) ![draw](drawings/Drawing-2023-11-22-13.14.05.excalidraw.png)
#ex lets compute the fourier transform of: #ex #fourier
$f(x)=\begin{cases}1, & -\pi\leq x\leq 0 \\x, & 0<x\leq \pi\end{cases}$ Let's 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}$ Let's 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)$ Use the formula we derived earlier:
using integration by parts for second term: $a_{n}=\frac{1}{\pi}\left( \int _{-\pi}^0 1\cos\left( \frac{n\pi x}{\pi} \right)\, dx +\int _{0}^\pi x\cos(nx)\, dx\right)$
$=\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)$ Using integration by parts (for the second integral):
$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$ $=\frac{1}{\pi}\left( \frac{1}{n}\cancelto{ 0 }{ \sin(nx) |_{-\pi}^0} + \frac{1}{n}x\cancelto{ 0 }{ \sin(nx) |_{0}^\pi}-\frac{1}{n}\int _{0}^\pi \sin(nx) \, dx \right)$
now lets find $b_{n}$ $a_{n}=\frac{1}{n^2\pi}(\cos(nx)|_{0}^\pi)=\frac{1}{n^2\pi}(\underbrace{ \cos(n\pi) }_{ (-1)^n }-1)$
$a_{n}=\frac{1}{n^2\pi}((-1)^n-1)\quad n=1,2,\dots$
Now let's find $b_{n}$
$b_{n}=\frac{1}{\pi}\left( \int _{-\pi}^0\sin(nx) \, dx+\int _{0}^\pi x\sin(nx) \, dx \right)$ $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)$ $=\frac{1}{\pi}[ \frac{-1}{n}\underbrace{ \cos(nx)|_{-\pi}^0 }_{ 1-(-1)^n }-\frac{1}{n}( \underbrace{ x\cos(nx)|_{0}^\pi }_{ \pi(-1)^n-0 }-\underbrace{ \int _{0}^\pi \cos(nx)\, dx }_{ 0 } ) ]$
$b_{n}=\frac{1}{n\pi}((-1)^n-1-\pi(-1)^n)$
$b_{n}=\frac{1}{n\pi}((-1)^n(1-\pi)-1) \quad 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 \qquad n=1,2,3,\dots$$
$$a_{2k-1}=-\frac{2}{n^2\pi} \qquad k=1,2,3\dots$$
we find that
$a_{2n}=0$
$a_{2k-1}=-\frac{2}{n^2\pi}$ for $k=1,2,\dots$
what about when $n=0$? what about when $n=0$?
$a_{0}=\frac{1}{\pi}\left( \int _{-\pi}^0 \, dx+\int _{0}^\pi x \, dx \right)$ $a_{0}=\frac{1}{\pi}\left( \int _{-\pi}^0 \, dx+\int _{0}^\pi x \, dx \right)$
$=\frac{1}{\pi}\left( x|_{-\pi}^0+\frac{x^2}{2}|_{0}^\pi \right)$ $a_{0}=\frac{1}{\pi}\left( x|_{-\pi}^0+\frac{x^2}{2}|_{0}^\pi \right)$
$=\frac{1}{\pi}\left( 0+\pi+\frac{\pi^2}{2} \right)=\frac{\pi}{2}+1$ $a_{0}=\frac{1}{\pi}\left( 0+\pi+\frac{\pi^2}{2} \right)$
$$a_{0}=\frac{\pi}{2}+1$$
#ex lets compute the fourier transform of $f(x)=x$ from $-\pi\leq x\leq \pi$ #ex Let's compute the Fourier transform of:
we have to take a windowed form of $f$ to make this possible, $L=\pi$ $$f(x)=x \qquad -\pi\leq x\leq \pi$$
at the left and right edge of the interval, the fourier series is equal to 0. (from the previous theorem) We have to take a windowed form of $f$ to make this possible, $L=\pi$
find the coefficients: At the left and right edge of the interval, the Fourier series is equal to 0. (1st convergence theorem.)
Find the coefficients:
$a_{n}=\frac{1}{\pi}\int _{-\pi}^\pi x\cos(nx) \, dx=0$ $a_{n}=\frac{1}{\pi}\int _{-\pi}^\pi x\cos(nx) \, dx=0$
Why is it zero? because the integrand is an odd function. (odd times even is odd.) and because we are integrating from $-\pi$ to $\pi$ (symmetric interval) $$a_{n}=0$$
Why is it zero? because the integrand is an odd function. (odd times even is odd.) and because we are integrating from $-\pi$ to $\pi$ (a symmetric interval)
definition of odd: $f(x)=-f(-x)$ definition of odd: $f(x)=-f(-x)$
definition of even: $f(x)=f(-x)$ definition of even: $f(x)=f(-x)$
odd times even is odd. odd times even is odd.
odd times odd is even. odd times odd is even.
even times even is even. even times even is even.
huge exam time saving technique. huge exam time saving technique.
find $b_{n}$ Find $b_{n}$:
$b_{n}=\frac{1}{\pi}\int _{-\pi}^\pi x\sin(nx) \, dx=\frac{2}{\pi}\int _{0}^\pi x\sin(nx) \, dx$ $b_{n}=\frac{1}{\pi}\int _{-\pi}^\pi x\sin(nx) \, dx=\frac{2}{\pi}\int _{0}^\pi x\sin(nx) \, dx$ <- that's even, don't be a silly goose and say it's $0$
using integration by parts: Using integration by parts:
$b_{n}=\frac{2}{n}(-1)^{n+1}$ $b_{n}=\frac{2}{\pi}\left( x\left( -\frac{1}{n}\cos(nx)|_{0}^\pi \right)-\int_{0}^\pi -\frac{1}{n}\cos(nx) \, dx \right)$
another take away: if $f$ is odd, the cos terms are 0 $b_{n}=\frac{2}{\pi}\left( -\frac{\pi}{n}(-1)^n+\frac{1}{n^2}\cancelto{ 0 }{ \sin(nx)|_{0}^\pi } \right)$
if $f$ is even, the sin terms are 0. $$b_{n}=\frac{2}{n}(-1)^{n+1}$$
another take away: if $f$ is odd, the $\cos$ terms are $0$
if $f$ is even, the $\sin$ terms are $0$.
if f is only defined between 0 and L: if $f$ is only defined between $0$ and $L$:
you can create an odd extension: $\bar{f}=\begin{cases}f(x) & 0\leq x\leq L \\-f(-x), & -L\leq x<0 & & \end{cases}$ you can create an odd extension: $\bar{f}(x)=\begin{cases}f(x) & 0\leq x\leq L \\-f(-x), & -L\leq x<0 & & \end{cases}$
this will contain only sin terms this will contain only $\sin$ terms.
you also have a choise to extend it as an even function, symmetrically across the y axis. You also have a choice to extend it as an even function, symmetrically across the $y$ axis.
$\bar{f}=\begin{cases}f(x) & 0\leq x\leq L \\f(-x), & -L\leq x<0 & & \end{cases}$ $\bar{f}(x)=\begin{cases}f(x) & 0\leq x\leq L \\f(-x), & -L\leq x<0 & & \end{cases}$
this will contain only cos terms. This will contain only $\cos$ terms.
#end of lec 29 #end of lec 29
#start of lec 30 #start of lec 30
from last lecture: From last lecture:
$f(x)$ is defined on $[0,L]$ $f(x)$ is defined on $[0,L]$
odd extention: odd extension:
$\bar{f}(x)=\begin{cases}f(x), & 0\leq x\leq L \\-f(-x,) & -L\leq x<0\end{cases}$ $\bar{f}(x)=\begin{cases}f(x), & 0\leq x\leq L \\-f(-x,) & -L\leq x<0\end{cases}$
and the $a$ coeffecients (cos terms) are zero. and the $a$ coefficients ($\cos$ terms) are zero.
not only that, but the b terms are: not only that, but the $b$ coefficients are:
$\sum_{n=1}^\infty b_{n}\sin\left( \frac{n\pi x}{L} \right); \qquad b_{n}=\frac{1}{L}\int _{-L}^L\bar{f}(x) \sin\left( \frac{n\pi x}{L} \right) \, dx$ $b_{n}=\frac{1}{L}\int _{-L}^L\bar{f}(x) \sin\left( \frac{n\pi x}{L} \right) \, dx$
$$b_{n}=\frac{2}{L}\int _{0}^L f(x)\sin\left( \frac{n\pi x}{L} \right)\, dx$$ $$b_{n}=\frac{2}{L}\int _{0}^L f(x)\sin\left( \frac{n\pi x}{L} \right)\, dx$$
"How about that, this is called a foureir sin series." and $\bar{f}(x)$ is:
$$\bar{f}(x)=\sum_{n=1}^\infty b_{n}\sin\left( \frac{n\pi x}{L} \right)$$
"How about that, this is called a Fourier sine series."
For even extension: For even extension:
$\bar{f}(x)=\begin{cases}f(x), & 0\leq x\leq L \\f(-x,) & -L\leq x<0\end{cases}$ $\bar{f}(x)=\begin{cases}f(x), & 0\leq x\leq L \\f(-x,) & -L\leq x<0\end{cases}$
and the $b$ coeffecients (sin terms) are zero. and the $b$ coefficients ($\sin$ terms) are zero.
not only that but the a terms are: not only that but the $a$ coefficients are:
$\frac{a_{0}}{2}+\sum_{n=1}^\infty a_{n}\cos\left( \frac{n\pi x}{L} \right)$ $a_{n}=\frac{1}{L}\int _{-L}^L\bar{f}(x) \cos\left( \frac{n\pi x}{L} \right) \, dx$
$a_{n}=\frac{2}{L}\int _{0}^L f(x)\cos\left( \frac{n\pi x}{L} \right)\, dx$ $$a_{n}=\frac{2}{L}\int _{0}^L f(x)\cos\left( \frac{n\pi x}{L} \right)\, dx$$
and $\bar{f}$ is:
$$\bar{f}(x)=\frac{a_{0}}{2}+\sum_{n=1}^\infty a_{n}\cos\left( \frac{n\pi x}{L} \right)$$
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. It's interesting to note.
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? #ex #fourier Fourier sine series for:
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. $$f(x)=x^2 \qquad 0\leq x\leq \pi$$
Well that means we want the odd extension:
#ex Fourier sine series for $f(x)=x^2$ from $0\leq x\leq \pi$
well that means we want the odd extension:
![draw](drawings/Drawing-2023-11-24-13.15.17.excalidraw.png) ![draw](drawings/Drawing-2023-11-24-13.15.17.excalidraw.png)
the $\cos()$ ($a_{n}$) terms are zero. the $a_{n}$ (cosine) terms are zero.
the b terms are: the $b_{n}$ terms are:
$b_{n}=\frac{2}{\pi}\int _{0}^\pi x^2\sin(nx) \, dx$ $b_{n}=\frac{2}{\pi}\int _{0}^\pi x^2\sin(nx) \, dx$
$=-\frac{2}{\pi n}\left[ x^2\cos(nx)|_{0}^\pi-2\int _{0}^\pi x\cos(nx)\, dx \right]$ $=-\frac{2}{n\pi}\left[ x^2\cos(nx)|_{0}^\pi-2\int _{0}^\pi x\cos(nx)\, dx \right]$
$=-\frac{2}{n\pi}\left[ \pi^2(-1)^n-\frac{2}{n}\left( x\cancelto{ 0 }{ \sin(nx) }|_{0}^\pi-\int _{0}^\pi \sin(nx)\, dx \right) \right]$ $=-\frac{2}{n\pi}\left[ \pi^2(-1)^n-\frac{2}{n}\left( x\cancelto{ 0 }{ \sin(nx) }|_{0}^\pi-\int _{0}^\pi \sin(nx)\, dx \right) \right]$
$b_{n}=-\frac{2}{n\pi}\left[ \pi^2(-1)^n-\frac{2}{n^2}\cos(nx)|_{0}^\pi \right]=\frac{2\pi}{n}(-1)^{n+1}+\frac{4}{n^3\pi}((-1)^n-1)$ $b_{n}=-\frac{2}{n\pi}[ \pi^2(-1)^n-\frac{2}{n^2}\underbrace{ \cos(nx)|_{0}^\pi }_{ (-1)^n-1 }]=\frac{2\pi}{n}(-1)^{n+1}+\frac{4}{n^3\pi}((-1)^n-1)$ for $n=1,2,3,\dots$
for $n=1,2,3,\dots$ note no $n=0$ so no divison by zero problems here. Note no $n=0$ so no division by zero problems here.
#ex fourier cosine series of $f(x)=\sin(x)$ for $0\leq x\leq \pi$ #ex #fourier Fourier cosine series of $f(x)=\sin(x)$ for $0\leq x\leq \pi$
![draw](drawings/Drawing-2023-11-24-13.23.08.excalidraw.png) ![draw](drawings/Drawing-2023-11-24-13.23.08.excalidraw.png)
$a_{n}=\frac{2}{\pi}\int _{0}^\pi \sin(x)\cos(nx)\, dx$ for $n=0,1,2,\dots$ $b_{n}$ (sine) terms are all zero obviously, as it's asking for a Fourier cosine series, i.e., we are doing an even extension.
use trig identity: (by the way the identites will be provided in the exam.) $a_{n}=\frac{2}{\pi}\int _{0}^\pi \sin(x)\cos(nx)\, dx$ for $n=0,1,2,\dots$ <-Odd, but not symmetrical bounds. We can't rule out that it's zero.
>Don't be a silly goose and try changing the bounds by removing that 2 in the front. If you did, you'd also have to change $\sin(x)$ to $\bar{f}$ which is $abs(\sin(x))$ and then you're integrating $a_{n}=\frac{1}{\pi}\int _{-\pi}^\pi |\sin(x)|\cos(nx)\, dx$ which is even$\times$even.
$=\frac{2}{\pi} \frac{1}{2}\int _{0}^\pi (\sin(1-n)x+\sin(n+1)x)\, dx$ Use trig identity: (by the way the identities will be provided in the final exam.)
integrating gives you: $=\frac{2}{\pi} \frac{1}{2}\int _{0}^\pi \left[\sin((1-n)x)+\sin((n+1)x)\right]\, dx$
Integrating gives you:
$\frac{1}{\pi}( \frac{-1}{1-n}\underbrace{ \cos((1-n)x)|_{0}^\pi }_{ (-1)^{n+1}-1 } +\frac{-1}{n+1}\underbrace{ \cos((n+1)x)|_{0}^\pi }_{ (-1)^{n+1}-1 })$
$a_{n}=-\frac{1}{\pi} \frac{1}{n+1}(-1)^{n+1}+\frac{1}{\pi} \frac{1}{n+1}+\frac{1}{\pi} \frac{1}{-(1-n)}(-1)^{n+1}+\frac{1}{\pi} \frac{1}{1-n}$
$a_{n}=-\frac{1}{\pi} \frac{1}{n+1} (-1)^{n+1}+\frac{1}{\pi} \frac{1}{n+1}+\frac{1}{\pi} \frac{1}{n-1}(-1)^{n-1}-\frac{1}{\pi} \frac{1}{n-1}$ $a_{n}=-\frac{1}{\pi} \frac{1}{n+1} (-1)^{n+1}+\frac{1}{\pi} \frac{1}{n+1}+\frac{1}{\pi} \frac{1}{n-1}(-1)^{n-1}-\frac{1}{\pi} \frac{1}{n-1}$
what about when n=0 or n=1? Assuming that $n\ne0,1$. (note: $n=-1$ is a non-issue since negative coefficients are never considered when taking a Fourier transform.)
$a_{0}=\frac{4}{\pi}=\frac{2}{\pi}\int _{0}^\pi \sin(x) \, dx$ So what is $a_{0}, a_{1}$?
$a_{0}=\frac{2}{\pi}\int _{0}^\pi \sin(x) \, dx=\frac{4}{\pi}$
$a_{1}=\frac{2}{\pi}\int _{0}^\pi \sin(x)\cos(x) \, dx=\frac{1}{\pi}\int _{0}^\pi \sin(2x)\, dx=0$ $a_{1}=\frac{2}{\pi}\int _{0}^\pi \sin(x)\cos(x) \, dx=\frac{1}{\pi}\int _{0}^\pi \sin(2x)\, dx=0$
"0 is a very very special number it took humanity many numbers of years to invent 0" referring to when dividing by 0. <i>"zero is a very very special number it took humanity many numbers of years to invent zero"</i> referring to when dividing by 0.
additionally we know that the terms cancel when: Additionally we know that the terms cancel when:
$a_{2k-1}=0$ for $k=1,2,\dots$ $a_{2k-1}=0$ for $k=1,2,\dots$
$a_{2k}=\frac{2}{\pi} \frac{1}{2k+1}+\frac{2}{\pi} \frac{1}{2k-1}$ for $k=1,2,\dots$ $a_{2k}=\frac{2}{\pi} \frac{1}{2k+1}-\frac{2}{\pi} \frac{1}{2k-1}$ for $k=1,2,\dots$
then: then:
$$\bar{f}(x)=\frac{2}{\pi}+\frac{2}{\pi}\sum_{k=1}^\infty\left( \frac{1}{2k+1}+\frac{1}{2k-1} \right)\cos(2kx)$$ $$\bar{f}(x)=\frac{2}{\pi}+\frac{2}{\pi}\sum_{k=1}^\infty\left( \frac{1}{2k+1}-\frac{1}{2k-1} \right)\cos(2k\pi x)$$
Even with 10 terms, we get a pretty good approximation:
![fouriercosineofsin.png](drawings/fouriercosineofsin.png)
We have prepared ourselves now, now we start solving PDE's. He's encouraging us to attend the lectures in these last two weeks. He's making it sound like PDE's are hard. We have prepared ourselves now, now we start solving PDE's. He's encouraging us to attend the lectures in these last two weeks. He's making it sound like PDE's are hard.

View File

@ -231,9 +231,74 @@ you complaining that your exams are hard theyre not hard. I'm talking about 40 y
now we consider a guitar string: now we consider a guitar string:
![draw](drawings/Drawing-2023-12-01-13.49.58.excalidraw.png) ![draw](drawings/Drawing-2023-12-01-13.49.58.excalidraw.png)
assuming the thickness of the string is much smaller than the length of the string, which is true. assuming the thickness of the string is much smaller than the length of the string, which is true.
$\frac{ \partial u^2 }{ \partial t^2 }=\alpha^2 \frac{ \partial^2 u }{ \partial x^2 } \quad 0\leq x\leq L, t>0$ $\frac{ \partial u^2 }{ \partial t^2 }=\alpha^2 \frac{ \partial^2 u }{ \partial x^2 } \quad 0\leq x\leq L,\quad t>0$
^ Reminds me of the wave equation from phys 130. ^ Reminds me of the wave equation from Phys 130.
Since the string is tied down on the ends we have the following initial conditions:
$u(t,0)=u(t,L)=0 \qquad t>0$ $u(t,0)=u(t,L)=0 \qquad t>0$
$u(0,x)=f(x)$ $0\leq x\leq L$ $u(0,x)=f(x)$ $0\leq x\leq L$
$\frac{ \partial u }{ \partial t }(0,x)=g(x)$ $0\leq x\leq L$ $\frac{ \partial u }{ \partial t }(0,x)=g(x)$ $0\leq x\leq L$
#end of lec 33 ^IBVP of the system.
#end of lec 33
#start of lec 34
The wave equation follows many phenomena in electrical engineering.
separation of variables:
$u(t,x)=X(x)T(t)$
plug in to equation:
$T''X=\alpha^2TX''$
$\frac{T''}{\alpha^2T}=\frac{X''}{X}=-\lambda$
^ #evp !
consider the $X$ side:
$X''+\lambda X=0, \quad X(0)=X(L)=0$
We've solved this before.
the only non-trivial solutions for that Eigen value problem is:
$\lambda_{n}=(\frac{n\pi}{L})^2$
$X_{n}(x)=\sin\left( \frac{n\pi x}{L} \right)$ for $n=1,2,3,\dots$
$\frac{T''}{\alpha^2T}=-\left( \frac{n\pi}{L} \right)^2$
$T_{n}''+\left( \frac{\alpha n\pi}{L} \right)^2T_{n}=0$
characteristic equation:
$r^2+\left( \frac{\alpha n\pi}{L} \right)^2=0$
$r_{1,2}=\pm i \frac{\alpha n\pi}{L}$
"Don't memorize the steps. If you try to memorize you will mess up the final for sure. Ask yourself, why am I doing this here?"
$T_{n}(t)=b_{n}\cos\left( \frac{\alpha n\pi}{L}t \right)+a_{n}\sin\left( \frac{\alpha n\pi}{L}t \right)$
$u_{n}(t,x)=\left( b_{n}\cos\left( \frac{\alpha n\pi}{L} \right)+a_{n}\sin\left( \frac{\alpha n\pi}{L}t \right) \right)\sin\left( \frac{n\pi x}{L} \right)$
if you sum all these <u>modes</u>, you get the solution:
$$u_{n}(t,x)=\sum_{n=1}^\infty\left( b_{n}\cos\left( \frac{\alpha n\pi}{L} \right)+a_{n}\sin\left( \frac{\alpha n\pi}{L}t \right) \right)\sin\left( \frac{n\pi x}{L} \right)$$
"mathematics and reality do align very well, if the speed of the string is different the solution differs aswell."
$u(0,x)=f(x)=\sum_{n=1}^\infty b_{n}\sin\left( \frac{n\pi x}{L} \right)$
^ that's starting to look familiar.
$\implies b_{n}=\frac{2}{L}\int _{0}^L f(x)\sin\left( \frac{n\pi x}{L} \right) \, dx$
where does it converge? well $f(x)$ and $f'(x)$ are both continuous, so it converges everywhere.
$\frac{ \partial u }{ \partial t }(0,x)=g(x)=\sum_{n=1}^\infty\underbrace{ a_{n} \frac{\alpha n\pi}{L} }_{ }\sin\left( \frac{\alpha n\pi}{L} \right)$
$a_{n} \frac{\alpha n\pi}{L}$ are the Fourier $\sin$ coefficients of $g(x)$
$a_{n}=\frac{2}{\alpha n\pi}\int _{0}^L g(x)\sin\left( \frac{n\pi x}{L} \right)\, dx$
$\alpha^2$ is the Hooke modulus of the string btw.
remember the heat equation, the amplitude is exponentionally decreasing,
here the amplitude is oscillatory and doesnt increae in time. boi-oi-oi-oing
to make it more releasitic we have to add a term for resistance, and we end up with a b in the characteristic equation for T.
btw this equation models the electromagnetic feild, to some approximation.
the lowest mode is called the fundemental mode, the following terms after are called harmonics.
If two instruments play the same note (same fundemental frequency), they still sound different! and that's because of the difference in harmonics.
The modes are standing waves in the string.
"my claim is that any object, including social objects ,can be described by waves. Everything is a wave."
you can model elementary particle behaviours with solitons (non linear waves.)
in life in the real world, all waves have finite speed.
So thats why its important to learn the wave equation. its the prototype to waves.
"waves are the fundamental object. [...]. So that's why it's important, these are the fundamental objects of nature here."
$f(x)=\begin{cases}x, & 0\leq x\leq \frac{\pi}{2}\\ \ \pi-x, & \frac{\pi}{2}<x\leq \pi\end{cases}$
$\alpha^2=1$
$g(x)=\sin(x)$
$b_{n}=\frac{2}{\pi}\left( \int _{0} ^\frac{\pi}{2} x\sin(nx) \, dx +\int _{\frac{\pi}{2}} ^\pi (\pi-x)\sin(nx) \, dx\right)$
$b_{n}=\frac{4}{n^2\pi}\sin\left( \frac{n\pi}{2} \right)$
$b_{2k}=0$
half of the b coefficients are 0.
$b_{2k-1}=\frac{4}{(2k-1)^2\pi}(-1)^{k+1}$
plug in g(x) to get a_n terms
however theres a short cut here. from definition of g(x) earlier:
$g(x)=a_{1}\sin(x)+2a_{2}\sin(2x)+3a_{3}\sin(3x)+\dots$
but g(x) is sin x.
so $a_{1}=1$ and every other term is 0
plug this in to get solution:
$$u(t,x)=\left( \frac{4}{\pi}\cos t+\sin t \right)\sin(x)+\sum_{k=1}^\infty \frac{4(-1)^{k+1}}{\pi(2k+1)^2}\cos((2k+1)t)\sin((2k+1)x)$$
typo in his notes, not 2k-1 its 2k+1
#end of lec 34

View File

@ -21,7 +21,8 @@ $\Delta u=u(t+\Delta t,x)-u(t,x)$
Amount of heat to change temperature over $\Delta t$ with $\Delta u$ is $\underbrace{ C(x) }_{ \text{specific heat capacity } }\underbrace{ \rho(x) }_{ \text{density} }\Delta u\underbrace{ a\Delta x }_{ \text{volume} }$ Amount of heat to change temperature over $\Delta t$ with $\Delta u$ is $\underbrace{ C(x) }_{ \text{specific heat capacity } }\underbrace{ \rho(x) }_{ \text{density} }\Delta u\underbrace{ a\Delta x }_{ \text{volume} }$
$C(x)\rho(x)a\Delta x(u(t+\Delta t,x)-u(t,x))=a\Delta t(k(x+\Delta x) \frac{\partial u}{\partial x}(t,x+\Delta x)-k(x) \frac{\partial u}{\partial x}(t,x))+Q(t,x)\Delta xa\Delta t$ $C(x)\rho(x)a\Delta x(u(t+\Delta t,x)-u(t,x))=a\Delta t(k(x+\Delta x) \frac{\partial u}{\partial x}(t,x+\Delta x)-k(x) \frac{\partial u}{\partial x}(t,x))+Q(t,x)\Delta xa\Delta t$
>I'm gonna be honest, I'm lost in this derivation already. What is $Q(t,x)$? $Q(t,x)$ is a source term, a term to model internally produced heat.
>I'm gonna be honest, I'm lost in this derivation already.
divide by $a\Delta x\Delta t$ divide by $a\Delta x\Delta t$
$C(x)\rho(x)\frac{(u(t+\Delta t,x)-u(t,x))}{\Delta t}=\frac{ k(x+\Delta x) \frac{\partial u}{\partial x}(t,x+\Delta x)-k(x) \frac{\partial u}{\partial x}(t,x)}{\nabla x}+Q(t,x)$ $C(x)\rho(x)\frac{(u(t+\Delta t,x)-u(t,x))}{\Delta t}=\frac{ k(x+\Delta x) \frac{\partial u}{\partial x}(t,x+\Delta x)-k(x) \frac{\partial u}{\partial x}(t,x)}{\nabla x}+Q(t,x)$
@ -32,7 +33,7 @@ thermodynamics can be very important for electrical engineers, for instance the
## Separation of variables & Eigen value problems ## Separation of variables & Eigen value problems
#ex #SoV #evp #ex #SoV #evp
(This is more of a case study than an example.) (This is more of a case study than an example.)
Rewrite the equation we derived by grouping the constant terms into one constant $D$ Rewrite the equation we derived by grouping the constant terms into one constant $D$ and assume for this problem that the internally generated heat is $0$ (i.e., $Q(x,t)=0$)
$\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 t }=D \frac{ \partial^2 u }{ \partial x^2 }, \quad 0\leq x\leq L, \quad t>0$
boundary conditions: boundary conditions:
$u(t,0)=u(t,L)=0 , \quad t>0$ (simple case) $u(t,0)=u(t,L)=0 , \quad t>0$ (simple case)
@ -116,7 +117,7 @@ lets go back to the problem and focus on $T$:
$\frac{T'}{DT}=\frac{X''}{X}=-\lambda$ $\frac{T'}{DT}=\frac{X''}{X}=-\lambda$
$\frac{T'}{T}=-\left( \frac{n\pi}{L} \right)^2D$ $\frac{T'}{T}=-\left( \frac{n\pi}{L} \right)^2D$
this is a separable equation. this is a separable equation.
We can treat the function T as a variable: We can treat the function $T$ as a variable:
$\frac{dT}{dt} \frac{1}{T}=-\left( \frac{n\pi}{L} \right)^2D$ $\frac{dT}{dt} \frac{1}{T}=-\left( \frac{n\pi}{L} \right)^2D$
$\int{dT} \frac{1}{T}=\int-\left( \frac{n\pi}{L} \right)^2Ddt$ $\int{dT} \frac{1}{T}=\int-\left( \frac{n\pi}{L} \right)^2Ddt$
$\ln(T)=-\left( \frac{n\pi}{L} \right)Dt+c_{n}$ $\ln(T)=-\left( \frac{n\pi}{L} \right)Dt+c_{n}$

View File

@ -24,8 +24,8 @@ I have written these notes for myself, I thought it would be cool to share them.
[Systems of linear equations (lec 21-22)](systems-of-linear-equations-lec-21-22.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) [Power series (lec 22-25)](power-series-lec-22-25.html)
[Separation of variables & Eigen value problems (lec 26-28)](separation-of-variables-eigen-value-problems-lec-26-28.html) [Separation of variables & Eigen value problems (lec 26-28)](separation-of-variables-eigen-value-problems-lec-26-28.html)
[Fourier series (lec 28-29)](fourier-series-lec-28-29.html) (raw notes, not reviewed or revised yet.) [Fourier series (lec 28-29)](fourier-series-lec-28-29.html)
[Partial differential equations (lec 30-33)](partial-differential-equations-lec-30-33.html) (raw notes, not reviewed or revised yet.) [Partial differential equations (lec 30-34)](partial-differential-equations-lec-30-34.html) (raw notes, not reviewed or revised yet.)
</br> </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.) [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) [Big LT table (.png)](drawings/bigLTtable.png)

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB