16 KiB
ECE 205: Advanced Calculus 1
Laplace transform
The Laplace transform is a wonderful operation to convert a function of \(t\) into a function of \(s\). Where \(s\) is an unknown variable independent of \(t\):
\[ \mathcal L\{f(t)\}=F(s)=\int^\infty_0e^{-st}f(t)dt, s > 0 \]
??? example To solve for \(\mathcal L\{\sin(at)\}\):
\begin{align*}
\mathcal L\{f(t)\}&=\int^\infty_0e^{-st}\sin(at)dt \\
\\
\text{IBP: let $u=\sin(at)$, $dv=e^{-st}dt$:} \\
&=\lim_{B\to\infty} \underbrace{\biggr[
\cancel{-\frac 1 se^{-st}\sin(at)}}_\text{0 when $s=0$ or $s=\infty$}+\frac a s\int e^{-st}\cos(at)dt
\biggr]^B_0 \\
&=\frac a s\lim_{B\to\infty}\left[\int e^{-st}\cos(at)dt \right]^B_0 \\
\text{IBP: let $u=\cos(at)$, $dv=e^{-st}dt$:} \\
&=\frac a s \lim_{B\to\infty}\left[
-\frac 1 s e^{-st}\cos(at)-\frac a s\underbrace{\int e^{-st}\sin(at)dt}_{\mathcal L\{\sin(at)\}}
\right]^B_0 \\
&=\frac{a}{s^2}-\frac{a^2}{s^2}\mathcal L\{\sin(at)\} \\
\mathcal L\{\sin(at)\}\left(1+\frac{a^2}{s^2}\right)&=\frac{a}{s^2} \\
\mathcal L\{\sin(at)\}&=\frac{a}{a^2+s^2}, s > 0
\end{align*}
A piecewise continuous function on \([a,b]\) is continuous on \([a,b]\) except for a possible finite number of finite jump discontinuities.
- This means that any jump discontinuities must have a finite limit on both sides.
- A piecewise continuous function on \([0,\infty)\) must be piecewise continuous \(\forall B>0, [0,B]\).
The exponential order of a function is \(a\) if there exist constants \(K, M\) such that: \[|f(t)|\leq Ke^{at}\text{ when } t\geq M\]
!!! example - \(f(t)=7e^t\sin t\) has an exponential order of 1. - \(f(t)=e^{t^2}\) does not have an exponential order.
Linearity
A piecewise continuous function \(f\) on \([0,\infty)\) of an exponential order \(a\) has a defined Laplace transform for \(s>a\).
Laplace transforms are linear. If there exist LTs for \(f_1, f_2\) for \(s>a_1, a_2\), respectively, for \(s=\text{max}(a_1, a_2)\):
\[\mathcal L\{c_1f_1 + c_2f_2\} = c_1\mathcal L\{f_1\} + c_2\mathcal L\{f_2\}\]
??? example We find the Laplace transform for the following.
$$
f(t)=\begin{cases}
1 & 0\leq t < 1 \\
e^{-t} & t\geq 1
\end{cases}
$$
Clearly $f(t)$ is piecewise ocontinuous on $[0,\infty)$ and has an exponential order of -1 when $t\geq 1$ and 0 when $0\leq t<1$. Thus $\mathcal L\{f(t)\}$ is defined for $s>0$.
\begin{align*}
\mathcal L\{f(t)\}&=\int^1_0 e^{-st}dt + \int^\infty_1e^{-st}e^{-t}dt \\
\tag{$s\neq 0$}&=\left[-\frac 1 s e^{-st}\right]^1_0 + \int^\infty_1e^{t(-s-1)}dt \\
&=-\frac 1 se^{-s}+\frac 1 s + \lim_{B\to\infty}\left[ \frac{1}{-s-1}e^{t(-s-1)} \right]^B_1 \\
\tag{$s\neq 0,s>-1$}&=\frac{-e^{-s}+1}{s} -\frac{e^{-s-1}}{-s-1}
\end{align*}
We solve for the special case $s=0$:
\begin{align*}
\mathcal L\{f(t)\}&=\int^1_0 e^{0}dt + \int^\infty_1e^{-st}e^{-t}dt \\
&=1 -\frac{e^{-s-1}}{-s-1} \\
\end{align*}
$$
\mathcal L\{f(t)\}=
\begin{cases}
\frac{-e^{-s}+1}{s}-\frac{e^{-s-1}}{-s-1} & s\neq 0, s>-1 \\
1-\frac{e^{-s-1}}{-s-1} &s=0
\end{cases}
$$
If there exists a transform for \(s>a\), the original function multiplied by \(e^{-bt}\) exists for \(s>a+b\).
\[\mathcal L\{f(t)\}=F(s), s>a\implies \mathcal L\{e^{-bt}f(t)\}=F(s),s>a+b\]
Inverse transform
The inverse is found by manipulating the equation until you can look it up in the Laplace Table.
The inverse transform is also linear.
Inverse of rational polynomials
If the transformed function can be expressed as a partial fraction decomposition, it is often easier to use linearity to reference the table.
\[\mathcal L^{-1}\left\{\frac{P(s)}{Q(s)}\right\}\]
- \(Q, P\) are polynomials
- \(\text{deg}(P) > \text{deg}(Q)\)
- \(Q\) is factored
??? example \[\begin{align*} \mathcal L^{-1}\left\{\frac{s^2+9s+2}{(s-1)(s^2+2s-3)}\right\} &=\mathcal L^{-1}\left\{\frac{A}{s-1}+\frac{B}{s+3} + \frac{Cs+D}{(s-1)^2}\right\} \\ &\implies A=2,B=3,C=-1 \\ &=2\mathcal L^{-1}\left\{\frac{1}{s-1}\right\} + 3\mathcal L^{-1}\left\{\frac{1}{(s-1)^2}\right\}-\mathcal L^{-1}\left\{\frac{1}{s+3}\right\} \\ &=2e^t+3te^t-e^{-3t} \end{align*}\]
Inverse of differentiable equations
If a function \(f\) is continuous on \([0,\infty)\) and its derivative \(f'\) is piecewise continuous on \([0,\infty)\), for \(s>a\):
\[ \mathcal L\{ f'\}=s\mathcal L\{f\}-f(0) \\ \mathcal L\{ f''\} = s^2\mathcal L\{f\}-s\cdot f(0)-f'(0) \]
Solving IVPs
Applying the Laplace transform to both sides of an IVP is valid to remove any traces of horrifying integration.
!!! example \[\begin{align*} y''-y'-2y=0, y(0)=1, y'(0)=0 \\ \mathcal L\{y''-y'-2y\}&=\mathcal L\{0\} \\ s^2\mathcal L\{y\}-s\cdot y(0)-y'(0) - s\mathcal L\{y\} +y(0) - 2\mathcal L\{y\}&=0 \\ \mathcal L\{y\}(s^2-s-2)-s+1&=0 \\ \mathcal L\{y\}&=\frac{s-1}{(s-2)(s+1)} \\ &= \\ \mathcal L^{-1}\{\mathcal L\{y\}\}&=\mathcal L^{-1}\left\{ \frac 1 3\cdot\frac{1}{s-2} + \frac 2 3\cdot\frac{1}{s+1} \right\} \\ y&=\frac 1 3\mathcal L^{-1}\left\{\frac{1}{s-2}\right\} + \frac 2 3\mathcal L^{-1}\left\{\frac{1}{s+1}\right\} \\ \tag{from Laplace table}&=\frac 1 3 e^{2t} + \frac 2 3 e^{-t} \end{align*}\]
Heaviside / unit step
The Heaviside and unit step functions are identical:
\[ H(t-c)=u(t-c)=u_c(t)=\begin{cases} 0 & t < c \\ 1 & t \geq c \end{cases} \]
Piecewise continuous functions can be manipulated into a single equation via the Heaviside function.
For a Heaviside transform \(\mathcal L\{u_c(t)g(t)\}\), if \(g\) is defined on \([0,\infty)\), \(c\geq 0\), and \(\mathcal L\{g(t+c)\}\) exists for some \(s>s_0\):
\[ \mathcal L\{u_c(t)g(t)\}=e^{-sc}\mathcal L\{g(t+c)\},s>s_0 \]
Likewise, under the same conditions, shifting it twice restores it back to the original.
\[ \mathcal L\{u_c(t)f(t-c)\}=e^{-sc}\mathcal L\{f\} \]
Convolution
Convolution is a weird thingy that does weird things.
\[(f*g)(t)=\int^t_0f(\tau)g(t-\tau)d\tau\]
It is commutative (\(f*g=g*f\)) and is useful in transforms:
\[\mathcal L\{f*g\}=\mathcal L\{f\}\mathcal L\{g\}\]
!!! example To solve \(4y''+y=g(t),y(0)=3, y'(0)=-7\):
\begin{align*}
4\mathcal L\{y''\}+\mathcal L\{y\}&=\mathcal L\{g(t)\} \\
4(s^2\mathcal L\{y\}-s\cdot y(0) - y'(0))+\mathcal L\{y\} &=\mathcal L\{g(t)\} \\
\mathcal L\{y\}(4s^2+1)-12s+28&=\mathcal L\{g(t)\} \\
\mathcal L\{y\}&=\frac{\mathcal L\{g(t)\}}{4s^2+1} + \frac{12s}{4s^2+1} - \frac{28}{4s^2+1} \\
y&=\mathcal L^{-1}\left\{\frac{1}{4s^2+1}\mathcal L\{g(t)\}\right\} + \mathcal L^{-1}\left\{3\frac{s}{s^2+\frac 1 4}\right\}-\mathcal L^{-1}\left\{7\frac{1}{s^2+\frac 1 4}\right\} \\
&= \mathcal L^{-1}\left\{\frac 1 2\mathcal L\left\{\sin\left(\tfrac 1 2 t\right)\right\}\mathcal L\{g(t)\} \right\}+3\cos\left(\tfrac 1 2 t\right)-14\sin\left(\tfrac 1 2t\right) \\
&=\frac 1 2\left(\sin\left(\tfrac 1 2 t\right)*g(t)\right)+3\cos\left(\tfrac 1 2 t\right)-14\sin\left(\tfrac 1 2t\right) \\
&=\frac 1 2\int^t_0\sin(\tfrac 1 2\tau)g(t-\tau)d\tau + 3\cos(\tfrac 1 2 t)-14\sin(\tfrac 1 2 t)
\end{align*}
Impulse
The impulse for duration \(\epsilon\) is defined by the dirac delta function:
\[ \delta_\epsilon(t)=\begin{cases} \frac 1\epsilon & \text{if }0\leq t\leq\epsilon \\ 0 & \text{else} \end{cases} \]
As \(\epsilon\to 0, \delta_\epsilon(t)\to\infty\). Thus: \[ \delta(t-a)=\begin{cases} \infty & \text{if }t=a \\ 0 & \text{else} \end{cases} \\ \boxed{\int^\infty_0\delta(t-a)dt=1} \]
If a function is continuous, multiplying it by the impulse function is equivalent to turning it on at that particular point. For \(a\geq 0\):
\[\boxed{\int^\infty_0\delta(t-a)dt=g(a)}\]
Thus we also have:
\[\mathcal L\{\delta (t-a)\}=e^{-as}\implies\mathcal L^{-1}\{1\}=\delta(t)\]
Heat flow
The temperature of a tube from \(x=0\) to \(x=L\) can be represented by the following DE:
\[\text{temp}=u(x,t)=\boxed{u_t=a^2u_{xx}},0<x<L,y>0\]
Two boundary conditions are requred to solve the problem for all \(t>0\) — that at \(t=0\) and at \(x=0,x=L\).
- \(u(x,0)=f(x),0\leq x\leq L\)
- e.g., \(u(0,t)=u(L,t)=0,t>0\)
Periodicity
The period of a function is an increment that always returns the same value: \(f(x+T)=f(x)\), and its fundamental period of a function is the smallest possible period.
!!! example The fundamental period of \(\sin x\) is \(2\pi\), but any \(2\pi K,k\in\mathbb N\) is a period.
The fundamental periods of $\sin \omega x$ and $\cos\omega x$ are both $\frac{2\pi}{\omega}$.
If functions \(f\) and \(g\) have a period \(T\), then both \(af+bg\) and \(fg\) also must have period \(T\).
Manipulating polarity
even: \(\int^L_{-L}f(x)dx=2\int^L_0f(x)dx\)
odd: \(\int^L_{-L}f(x)dx=0\)
even × even = even
odd × odd = even
even × odd = odd
Orthogonality
\[\int^L_{-L}\cos(\frac{m\pi x}{L})\sin(\frac{n\pi x}{L})dx=0\]
\[ \int^L_{-L}\cos(\frac{m\pi x}{L})(\frac{n\pi x}{L})dx=\begin{cases} 2L & \text{if }m=n=0 \\ L & \text{if }m=n\neq 0 \\ 0 & \text{if }m\neq n \end{cases} \]
\[ \int^L_{-L}\sin(\frac{m\pi x}{L}\sin(\frac{n\pi x}{L})dx=\begin{cases} L & \text{if }m=n \\ 0 & \text{if }m\neq n \end{cases} \]
Functions are orthogonal on an interval when the integral of their product is zero, and a set of functions is mutually orthogonal if all functions in the set are orthogonal to each other.
If a Fourier series converges to \(f(x)\):
\[f(x)=\frac{a_0}{2} + \sum^\infty_{n=1}\left(a_n\cos(\frac{n\pi x}{L})+b_n\sin(\frac{n\pi x}{L})\right)\]
The Euler-Fourier formulae must apply: \[ \boxed{a_n=\frac 1 L\int^L_{-L}f(x)\cos(\frac{n\pi x}{L})dx} \\ \\ \boxed{b_n=\frac 1 L\int^L_{-L}f(x)\sin(\frac{n\pi x}{L})dx} \]
!!! example The Fourier series for the square wave function: \(f(x)=\begin{cases}-1 & -\pi < x < 0 \\ 1 & 0 < x < \pi\end{cases}\)
The period is clearly $2\pi\implies L=\pi$. $f(x)$ is also odd, by inspection.
\begin{align*}
a_n&=\frac 1\pi\int^\pi_{-\pi}\underbrace{f(x)\cos(\frac{n\pi x}{\pi})}_\text{odd × even = odd}dx=0=a_0 \\
b_n&=\frac 1 \pi\int^\pi_{-\pi}f(x)\sin(\frac{n\pi x}{\pi})dx \\
\tag{even}&=\frac 2\pi\int^\pi_0f(x)\sin(nx)dx \\
\tag{$f(x)>1$ when $x>0$}&=\frac 2\pi\int^\pi_0\sin(nx)dx \\
&=\frac 2\pi\left[\frac{-\cos nx}{n}\right]^\pi_0 \\
&=\begin{cases}
\frac{4}{\pi n} & \text{if $n$ is odd} \\
0 & \text{else}
\end{cases}
\therefore f(x)&=\sum^\infty_{n=1}\frac 2\pi\left(\frac{1-(-1)^n}{n}\sin(nx)\right) \\
\tag{only odd $n$s are non-zero}&=\frac4\pi\sum^\infty_{n=1}\frac{1}{2n-1}\sin[(2n-1)x]
\end{align*}
Thus the Fourier series is $$.
Separation of variables
To solve IBVPs, where \(X(x)\) and \(T(t)\) are exclusively functions of their respective variables:
\[u(x,t)=X(x)T(t)\]
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},0<x<L,t>0 \\ 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},0<x<\pi,t:0 \\
u(0,t)=u(\pi,t)=0,t>0 \\
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 & -\pi<x<0 \\ 1 & 0<x<\pi\end{cases},f(x+2\pi)=f(x)\):
$f$ and $f'$ are piecewise continuous, but the function is discontinuous at $k\pi,k\in\mathbb Z$. Thus at $x=\pm\pi$, the series converges to $\frac 1 2(-1+1)=0$. At $x=0$, the series converges to $\frac 1 2(1+(-1))=0$.
If \(f\) is 2L-periodic and continuous on \(-\infty,\infty\), and \(f'\) is piecewise continuous on \([-L,L]\), the Fourier series converges uniformly to \(f\) on \([-L,L]\) and thus any interval.
More formally, for every \(\epsilon>0\), 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\]