From cb9e3e2308214760eefaad91e700c7e86159c04f Mon Sep 17 00:00:00 2001 From: eggy Date: Mon, 20 Nov 2023 13:16:09 -0500 Subject: [PATCH] ece205: catch up on last week --- docs/2a/ece205.md | 139 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) diff --git a/docs/2a/ece205.md b/docs/2a/ece205.md index 9d28f2e..4216215 100644 --- a/docs/2a/ece205.md +++ b/docs/2a/ece205.md @@ -308,6 +308,145 @@ Substituting it into the IBVP results in a **separation constant** $-\lambda$. $$\boxed{\frac{T'(t)}{a^2T(t)}=\frac{X''(x)}{X(x)}=-\lambda}$$ +Possible values for the separation constant are known as **eigenvalues**, and their corresponding **eigenfunctions** contain the unknown constant $a_n$: + +$$ +\lambda_n=\left(\frac{n\pi}{L}\right)^2 \\ +X_n(x)=a_n\sin(\frac{n\pi x}{L}) +$$ + +### Wave equation + +A string stretched between two secured points at $x=0$ and $x=L$ can be represented by the following IBVP: + +$$ +u_{tt}=a^2u_{xx},00 \\ +u(0,t)=u(L,t)=0,t>0 \\ +u(x,0)=f(x), 0\leq x\leq L \\ +u_t(x,0)=g(x), 0\leq x\leq L +$$ + +The following conditions must be met: + +$$ +u(x,t)=\sum^\infty_{n=1}\sin(\frac{n\pi x}{L})\left(\alpha_n\cos(\frac{n\pi a}{L}t)+\beta_n\sin(\frac{n\pi a}{L}t)\right) \\ +\boxed{f(x)=\sum^\infty_{n=1}\alpha_n\sin(\frac{n\pi x}{L}),0\leq x\leq L} \\ +\boxed{g(x)=\sum^\infty_{n=1}\frac{n\pi a}{L}\beta_n\sin(\frac{n\pi x}{L}), 0\leq x\leq L} +$$ + +### Fourier symmetry + +To find a Fourier series for functions defined only on $[0, L]$ instead of $[-L, L]$, a **periodic extension** can be used. + +A **half-range sine expansion (HRS)** is used for odd functions: + +$$ +f_o(x)=\begin{cases} +f(x) & x\in(0, L) \\ +-f(-x) & x\in(-L, 0) +\end{cases} +$$ + +A **half-range cosine expansion (HRC)** is used for even functions: + +$$ +f_e(x)=\begin{cases} +f(x) & x\in(0, L) \\ +f(-x) & x\in(-L, 0) +\end{cases} +$$ + +Thus if a Fourier series on $(0,L)$ exists, it can be expressed as either a **Fourier sine series** (via HRS) or a **Fourier cosine series** (via HRC). + +!!! example + For $f(x)=\begin{cases}\frac\pi 2 & [0,\frac\pi 2] \\ x-\frac\pi 2 & (\frac\pi2,\pi]\end{cases}$: + + + \begin{align*} + a_n&=\frac 2 L\int^L_0f(x)\cos(\frac{n\pi x}{L})dx \\ + &=\frac 2\pi \int^{\pi/2}_0\frac\pi 2\cos(\frac{n\pi x}{\pi})dx + \frac 2 \pi\int^\pi_{\pi/2}(x-\frac\pi2)\cos(\frac{n\pi x}{\pi})dx \\ + &=\frac{2}{n^2\pi}[(-1)^n-\cos(\frac{n\pi}{2})+\frac{n\pi}{2}\sin(\frac{n\pi}{2}) \\ + \\ + a_0&=\frac2\pi\int^\pi_0f(x)\cos(0)dx \\ + &=\frac{3\pi}{4} \\ + \\ + \therefore f(x)&=\frac{3\pi}{8}+\sum^\infty_{n=1}\frac{2}{n^2\pi^2}[(-1)^n-\cos(\frac{n\pi}{2})+\frac{n\pi}{2}\sin(\frac{n\pi}{2})]\cos(nx),x\in[0,\pi] + \end{align*} + +!!! example + For: + + $$ + u_t=2u_{xx},00 \\ + u(x,0)=\begin{cases} + \frac\pi 2 & [0,\frac\pi 2] \\ + x-\frac\pi 2 & (\frac\pi 2,\pi] + \end{cases} + $$ + + We have $L=\pi,a=\sqrt 2$. + + \begin{align*} + u(x,t)&=\sum^\infty_{n=1}\alpha_ne^{-left(\frac{n\pi\sqrt 2}{\pi}\right)^2t}\sin(\frac{n\pi x}{\pi}) + &=\sum^\infty_{n=1}\apha_ne^{-2n^2t}\sin(nx) \\ + \alpha_n&=\frac 2 L\int^L_0f(x)\sin(\frac{n\pi x}{L})dx \\ + &=\frac2\pi\int^{\pi/2}_0\frac\pi 2\sin(nx)dx+\frac2\pi\int^\pi_{\pi/2}(x-\frac\pi2\sin(nx)dx \\ + &=\frac 1 n[1+(-1)^{n+1}-\cos(\frac{n\pi}{2})-\frac{2}{n\pi}\sin(\frac{n\pi}{2}] + \end{align*} + +### Convergence of Fourier series + +!!! definition + - $f(x^+)=\lim_{h\to0^+}f(x+h)$ + - $f(x^-=\lim_{h\to0^-}f(x+h)$ + +If $f$ and $f'$ are piecewise continuous on $[-L, L]$ for $x\in(-L,L)$, where $a_n$ and $b_n$ are from the Euler-Fourier formulae: + +$$\frac{a_0}{2}+\sum^\infty_{n=1}a_n\cos(\frac{n\pi x}{L})+b_n\sin(\frac{n\pi x}{L})=\boxed{\frac 1 2[f(x^+)+f(x^-)]}$$ + +At $x=\pm L$, the series converges to $\frac 1 2[f(-L^+)+f(L^-)]$. This implies: + +- A continuous $f$ converges to $f(x)$ +- A discontinuous $f$ has the Fourier series converge to the average of the left and right limits +- Extending $f$ to infinity using periodicity allows it to hold for all $x$ + +!!! example + The square wave function $f(x)=\begin{cases}-1 & -\pi0$, there exists an integer $N_0$ depending on $\epsilon$ such that $|f(x)-[\frac{a_0}{2}+\sum^N_{n=1}a_n\cos(\frac{n\pi x}{L})+b_n\sin(\frac{n\pi x}{L})]|<\epsilon$ for all $N\geq N_0$ and all $x\in(-\infty,\infty)$. + +More intuitively, for a high enough summation of the Fourier series, the value must lie in an **$\epsilon$-corridor** of $f(x)$ such that $f(x)$ is always between $f(x)\pm\epsilon$. + +!!! example + - The Fourier series for the triangle wave function **is** uniformly convergent. + - The Fourier series for the square wave function **is not** uniformly convergent, which means that Gibbs overshoots would not fit in an arbitrarily small $\epsilon$-corridor. + +The **Weierstrass M-test** states that if $|a_n(x)|\leq M_n$ for all $x\in[a,b]$ and if $\sum^\infty_{n=1}M_n$ converges, then $\sum^\infty_{n=1}a_n(x)$ converges uniformly to $f(x)$ on $[a,b]$. + +!!! example + $\sum^\infty_{n=1}\frac{1}{n^2}\cos(nx)$ converges uniformly on any finite closed interval $[a,b]$. + + $|\frac{\cos(nx)}{n^2}|\leq\frac{1}{n^2}$ for all $x$, and $\sum^\infty_{n=1}\frac{1}{n^2}$ also converges. Thus the result follows from the M-test. + +### Differentiating Fourier series + +You can termwise differentiate the Fourier series of $f(x)$ only if: + +- $f(x)$ is continuous on $(-\infty,\infty)$ and 2L-periodic +- $f'(x),f''(x)$ are both piecewise continuous on $[-L,L]$ + +You can termwise integrate the Fourier series of $f(x)$ only if $f(x)$ is piecewise continuous on $[-L,L]$. + +Then, for any $x\in[-L,L]$: + +$$\int^x_{-L}f(t)dt=\int^x_{-L}\frac{a_0}{2}dt+\sum^\infty_{n=1}\int^x_{-L}(a_n\cos(\frac{n\pi t}{L})+b_n\sin(\frac{n\pi t}{L}))dt$$ + + ## Resources - [Laplace Table](/resources/ece/laplace.pdf)