1. Sine and Cosine decomposition.
Suppose you are given a function on an interval, $f(x): [0, 1] \to \R$. Such function $f(x)$ can be expressed as a sum of 'sine waves' and cosine waves and constant
$$ f(x) = a_0 + \sum_{n=1}^\infty a_n \cos(2n \pi x) + b_n \sin(2n \pi x). $$
Can you figure out a way to determine the coefficients $a_n$ and $b_n$?
Test out your method for the following function $$ f(x) = \begin{cases} 1 & 0 < x < 1/2 \cr 0 & 1/2 \leq x \leq 1 \end{cases} $$
find $a_0, a_1, b_1$ and plot the truncated Fourier series $$ a_0 + a_1 \cos(2 \pi x) + b_1 \sin(2 \pi x). $$ How does this resemble your original given function?
2. Consider the following equation, for $t>0$, $$ f'(t) + f(t) = 0 $$ And suppose $f(0) = 1$. Can you solve $f(t)$ for $t > 0$?
3. Consider the following equation, for $t>0$, $$ (d/dt + 1) (d/dt + 2) f(t) = 0 $$ And suppose $f(0) = 1, f'(0)=0$. Can you solve $f(t)$ for $t > 0$?
4. Consider the following equation, for $t>0$, $$ [(d/dt)^2 + 1] f(t) = 0 $$ And suppose $f(0) = 1, f'(0)=0$. Can you solve $f(t)$ for $t > 0$?
5 (bonus, optional). Consider the following equation, for $t>0$, $$ (d/dt + 1) (d/dt + 1) f(t) = 0 $$ And suppose $f(0) = 1, f'(0)=0$. Can you solve $f(t)$ for $t > 0$?
So far, we have learned many transformations and inverse transformation. Conceptually, we are just trying to decompose a given function $f(x)$ as a linear combination of $e^{ax}$ for various $a$. Because it is an eigenfunction of $(d/dx)$: $$ (d/dx) e^{ax} = a e^{ax}$$
Decomposition of a standing wave with Dirichlet condition. When we pluck a string on a violin, the string vibrate with the endpoints fixed.
Suppose the string's length is $L$, and you took a snapshot of the string and obtained the vertical displacement as a function $f: [0,L] \to \R$ (yes, it is $\R$ valued, not $\C$ valued).
Design a way to do Fourier decomposition of $f$.
If you like, pick $L = 2$ and $$ f(x) = 1 - |x-1|. $$ (just a linear peak).
Damped oscillation, reverse engineering.
Suppose you observe some damped oscillation that goes like $$ f(t) = A e^{-a t} sin(b t), \quad t > 0 $$ Can you find the second order equation that $f(t)$ satisfies? Namely, for what constant $A,B$ does $f(t)$ satisfies the equation?
$$ f“(t) + A f'(t) + B f(t) = 0. $$
If you like, pick $a=1, b= 2$.
Tuning the friction.
Consider the pure oscillation equation: $$ f”(t) + \omega^2 f(t) = 0 $$ it has solution like $f(t) = a \sin(\omega t) + b \cos(\omega t). $
What happens if we add some friction term? $$ f“(t) + a f'(t) + \omega^2 f(t) = 0 $$
Make a guess first. Then solve it explicitly, for $\omega = 1$, and try various $a$.
Hint: Is there a 'planewave' that solves the equation, i.e. somethign like $e^{ct}$ for some $c$?
You received the following a periodic sequence of numbers,
Use discrete Fourier transformation to analyse it.
$$ f(x) = \sum_{p=0}^8 F(p) e^{2\pi i (xp/9)} $$ Can you find $F(p)$?
If you have done the above exercise, try this one
(Due next Wednesday)
We will use the Boas convention for Fourier transformation (or see Friday's note).
1. Discrete Fourier Transformation for $N=3$. Suppose $f(x)$ is given by $$ f(x) = \delta_{x,0} $$ where $\delta_{i,j} = 0$ is $i\neq j$ and $=1$ if $i=j$.
Find the Fourier transformation $F(p)$. (You discovered that 'peak function' in $x$ space is sent to 'planewave' in $p$ space. )
What function $f(x)$ will have Fourier transformation $F(p) = \delta_{p,0}$?
2. Recall that if $f(x) = 1/(1+x^2)$, then its Fourier transformation is $F(p) = (1/2) e^{-|p|}$. Can you verify Parseval's Equality in this case?
3. Let $f(x) = 1$ for $x \in [0,1]$. Compute the convolution $(f\star f)(x)$. Can you plot it? What's the Fourier transformation of $f$ and $f \star f$? (The one for $f$ is already done in HW6).
Parseval Equality says, Fourier transformation, as a linear map from one function space (function on x), to another function space (function on p), preserves 'norm'. Norm is just a fancy way of saying 'length of a vector'.
What do we mean by the length of a function?
Continuous Fourier transformation (OK, I switched to Boas convention) $$ f(x) = \int_\R F(p) e^{ipx} dp. $$ $$ F(p) = (1/2\pi) \int_\R f(x) e^{-ipx} dx. $$
Discrete Fourier transformation
Fix a positive integer $N$. $x,p$ are valued in the 'discretized circle' $$ \Z / N\Z \cong \{0,1,\cdots, N-1\}.$$
$$ f(x) = \sum_{p \in \Z / N\Z} F(p) e^{2\pi i \cdot px/N}. $$ $$ F(p) = (1/N) \sum_{x \in \Z / N\Z} f(x) e^{-2\pi i \cdot px/N}. $$
Let $f(x)$ be a complex valued function on $x \in \R$, we define $$ \| f\|_x^2 := (1/2\pi) \int_\R |f(x)|^2 dx $$
Let $F(p)$ be a complex valued function on $p \in \R$, we define $$ \| F\|_p^2 := \int_\R |F(p)|^2 dp $$
$$ \| f\|_x^2 := (1/N) \sum_{x=0}^{N-1} |f(x)|^2 $$
Let $F(p)$ be a complex valued function on $p \in \R$, we define $$ \| F\|_p^2 := \sum_{p=0}^{N-1} |F(p)|^2 $$
If $F(p)$ is the Fourier transformation of $f(x)$, then $\|F\|^2_p = \|f\|^2_x. $ We proved in class the discrete case. The continuous case is similar in spirit, but harder to prove.
Consider two people, call them Alice and Bob, they each say an integer number, call it a and b. Suppose $a$ and $b$ both have equal probability of taking value within $\{1,2,\cdots, 6\}$, we can ask what is the probabity distribution of $a+b$?
We know $P(a=i) = 1/6$, $P(b=i) = 1/6$ for any $i=1,\cdots, 6$, otherwise the probabilit is 0. Then $$ P(a+b = k) = \sum_{i+j=k} P(a=i) P(b=j). $$
This is an instance of convolution.
Convolution is usually denoted as $\star$.
If $f$ and $g$ are functions on the $x$ space, then we define $$ (f \star g)(x) = \int_{x_1} f(x_1) g(x-x_1) dx_1 $$ If $F$ and $G$ are functions on the $p$ space, then we define $$ (F \star G)(p) = \int_{p_1} F(p_1) G(p-p_1) dp_1 $$
Fourier transformation sends convolution of functions on one side to simply multiplication on the other side. $$ (1/2\pi) FT(f \star g) = F \cdot G. $$ $$ FT(f \cdot g) = F \star G. $$
Given a function $f(t)$ on the positive real line $t>0$, we can define the following function of $p$: $$ F(p) = \int_{t=0}^\infty f(t) e^{-pt} dt. $$ Again, we require the function $f(t)$ to have moderate growth at $t \to \infty$ for the integral to be well-defined.
That was about function with (linear) exponential decay or growth at infinty
How about Gaussian?
$$ F(p) = \int_0^\infty e^{-t^2} e^{-pt} dt = \int_0^\infty e^{-(t+p/2)^2 + p^2/4} dt = e^{p^2/4} \int_{p/2}^\infty e^{-t^2} dt. $$ OK, that's not nice, you can express the result using Gaussian error function, which is about $\int_0^a e^{-t^2} dt$, but let's not worry about it.
How about rational function?
Suppose we know the Laplace transform of $f(t)$, let's denote $F = LT(f)$ (note we just write the name of the function $f$, not including its input variables t). What can we say about $LT(f')$?
We can do integration by part $$ LT(f') = \int_0^\infty e^{-pt} \frac{df}{dt} dt = \int_{t=0}^{t=\infty} e^{-pt} df = \int_{t=0}^{t=\infty} d[e^{-pt} f] - d[e^{-pt}] f= e^{-pt} f(t)|_0^\infty + \int_0^\infty p e^{-pt} f(t) dt = -f(0) + pF(p). $$
$$ f(t) = \frac{1}{2\pi i} \int_{c - i\infty}^{c+i \infty} e^{pt} F(p) dp. \quad c \gg 0$$ We want to take $c$ large enough so that there is no singularity of $F(p)$ for $Re(p) > c$.
For example, if $F(p) = 1/p$, or $1/(p-a)$, we can get $f(t) = 1$ and $f(t)=e^{at}$ respectively.
If you have a differential equation about $f(t)$ on some domain $t > 0$, and you know the initial conditions, say $f(t=0)$ etc, then you can use it to compute the Laplace transform of $f$. We have
Example $$ f'(t) + f(t) = 3, \quad f(0) = 1 $$ We apply Laplace transform to the equation, we get $$ pF(p) - f(0) + F(p) = 3 / p. $$ Then, we get $$ F(p) (p+1) = (3/p + 1) \Rightarrow F(p) = \frac{3+p} {p (p+1)} $$
Then, we may apply the inverse Laplace transformation, to get $$ f(t) = Res_{p=0} (e^{pt} \frac{3+p} {p (p+1)}) + Res_{p=-1} (e^{pt} \frac{3+p} {p (p+1)}) = \frac{e^{0t} (3+0)}{0+1} + e^{1t} \frac{3-1} {-1} = -2 e^{-t} + 3. $$ Double check $$ f'(t) + f(t) = 2 e^{-t} + (-2 e^{-t} + 3)=3, \quad f(0) = 1. $$ yeah.