# CHEM 1000 - Spring 2022
Ryan Wheat, University of Pittsburgh

## Recitation

For this recitation, we'll focus on:
- Graphical Relations Between Fourier Transforms
- Convolutional Theorem and CNN Application
---

The goal of this recitation network is to expand on the Fourier Transform topic by discussing graphical representations. This will add a visual element to help better understand the mathematics behind these transforms. In addition, discussion will be made on a real-life situation where FFT can be used to aid object classification.

Please follow along with recitation and complete the following questions to gain credit for this assignment.

### Part A: Graphical Interpretation of Fourier Transforms

Remember that the fourier transform and inverse fourier transform essentially move between different spatial representations. In cases where cartesian coordinates are not necessary suitable for describing spectra, for example, we can use fourier transforms to plot the important frequencies. Let's do a few fourier transforms so you get comfortable with the graphical relationships.

##### Fourier Transforms

(1)   $f(x) = cos(x)$

(2)   $f(x) = sin(x)$

(3)   $f(x) = sinc(x)$

##### Inverse Fourier Transforms

(4)   $f(w) = e^{-w^2/2}$

(5)   $f(w) = \sum_{k=-\infty}^{\infty}{\delta(w-2k)}$

#### Run the code in each cell and answer the two questions below to get credit for this recitation.

1. Calculate the Fourier Transform or Inverse Fourier Transform for each function above. This can be done via Wolfram Alpha.
2. For each Fourier Transform pair, describe the graphical relationships between the two.

*HINT: For the second inverse fourier transform, this is a comb function.


```python
from sympy import init_session
init_session()
```


```python
# Write the corresponding functions within this cell and give a brief one sentence description of the relationship.

fourier_1 = 
description = 

fourier_2 = 
description = 

fourier_3 = 
description = 

inverse_fourier_1 = 
description = 

inverse_fourier_2 = 
description = 
```

### Part B: Convolution Theorem

Here, we are going to cover the Convolution Theorem, which states that the pointwise product of two Fourier Transforms is equivalent to the convolution of two Inverse Fourier Transforms. Here, the pointwise product is just a product, but in some algebraic concepts can mean something much more complicated. The convolution on the other hand consideres shape formed from the overlap of two distinct graphs. What the Convolution Theorem does is allow for analyzing graphs that can't be expressed explicitly by a single form.

Using this concept, let's try building a square wave.

#### Run the code in each cell and answer the four questions below to get credit for this recitation.

1. Set $f(x) = e^{-x}$ and $g(x) = \sum_{k=-\infty}^{\infty}{\delta(w-2k)}$. Write the product between both functions. No simplification necessary.
2. Now, take the fourier transformation of the function you found in the previous question. Briefly describe the new function.
3. What two functions could you postulate make up this function? This step is known as convolution because we are working with one function that is actually a combination of two.
4. The last step is to take the inverse fourier transform of the graph that corresponds to the square wave. Which graph is that? Describe it if necessary.


```python
# Calculate the product between f(x) and g(x)

product_function = 
```


```python
# What does the new transformed graph look like?

description = 
```


```python
# What two functions make up the fourier transform graph?

function_1 = 
function_2 = 
```


```python
# Which graph corresponds to the square wave?

square_wave = 
```

8505c8d3abd883ccb33bf00b74b88027c658a476
ipynb
Jupyter Notebook
recitation/12-fourier-transforms.ipynb
ghutchis/chem1000
07a7eac20cc04ee9a1bdb98339fbd5653a02a38d
CC-BY-4.0
2020-06-23T18:44:37.000Z
2022-03-14T10:13:05.000Z
recitation/12-fourier-transforms.ipynb
ghutchis/chem1000
07a7eac20cc04ee9a1bdb98339fbd5653a02a38d
CC-BY-4.0
recitation/12-fourier-transforms.ipynb
ghutchis/chem1000
07a7eac20cc04ee9a1bdb98339fbd5653a02a38d
CC-BY-4.0
2021-07-29T10:45:23.000Z
2021-10-16T09:51:00.000Z
Qwen/Qwen-72B
1. YES
2. YES