Problem Set 13

ENGR 12, Spring 2026.

Due Date TBD
Turn in link Gradescope
URL emadmasroor.github.io/E12-S26/Homework/HW13

Points Distribution

Please note that each of the following grade items is a single rubric item. Each rubric item is scored on a four-level scale of 3-2-1-0. You may wish to take this into account when deciding how to allocate your efforts to each problem.

Problem % Weightage
Problem 1 25
Problem 2 25
Problem 3 25
Problem 4 25

1 Even and odd functions

Sketch (or plot) the following functions and determine whether they are even, odd, or neither. Use radians instead of degrees, if relevant.

  1. \(\sin x\)
  2. \(\cos x\)
  3. \(\tan x\)
  4. \(\tan^{-1} x\)
  5. \(\cos^{-1} x - \pi/2\) over the domain \((-1, +1)\)
  6. \(\sin^{-1} x\)
  7. \(x^2\)
  8. \(x^3\)
  9. \((x-2)^2\)
  10. \(e^x\)

2 Some Rules about even and odd functions

Complete the following statements and give an example in each case. Use the words even, odd, or neither to fill in each blank.

Statement
An even function times an even function is even
An even function plus an even function is ?
An even function times an odd function is ?
An even function plus an odd function is ?
An odd function multipled by an odd function is ?
An odd function plus an odd function is ?

By using candidate functions like \(\sin x\), \(\cos x\), \(x^2\), and \(x\), illustrate each of the above statements with an example by checking for yourself whether the result is even, odd, or neither even nor odd. Your example should consist of a plot or sketch showing clearly which two functions were multiplied or added to each other.

3 FFT in MATLAB

Download the following data file, which contains sampled measurements of some signal that was measured every \(0.02\) seconds. We suspect that the data was produced from some noisy signal containing only three discrete frequencies, which we will extract from this noisy data using MATLAB’s fft function.

Get data file

Get MATLAB file

The data looks like this when plotted against time:

Identify a function of the kind \[f_1(n_1 t) + f_2(n_2 t) + f_3(n_3 t) + \mathrm{noise} \tag{1}\] that best represents this data, where \(n_1\), \(n_2\) and \(n_3\) are three integers that MATLAB will help you identify. \(f_1\), \(f_2\) and \(f_3\) are either \(\sin\) or \(\cos\). The ‘noise’ term is not a real mathematical thing, but just a recognition that this data is not purely a sum of sines and cosines. Give your answer as a mathematical expression, and include a copy of the resulting MATLAB figure showing the correct expression in sub-plot 3. The first two sub-plots should not be changed.

Note

Note that there is no multiplicate factor in Equation 1, i.e., each sin or cos function is multiplied by 1. In other words, you do not need to look for ‘magnitudes’ for each Fourier mode.

Tip

If you don’t know where to start, run FFT_question.m and look for peaks that are close to integers. Then, think about what function — made up of up to three sines or cosines — could best represent the given data.

4 Triangle Wave

Consider the triangle wave shown below. It is periodic with period \(2\pi\) and is even about the vertical axis.

Figure 1: Triangle Wave

The triangle wave shown above can be defined using the following mathematical expression

\[ \begin{aligned} f(t) &= \begin{cases} 2 + \displaystyle \frac{t - \pi}{\pi} & -\pi < t < 0 \\ \displaystyle \frac{\pi - t}{\pi} & 0 < t < +\pi \\ \end{cases},\\ f(t+2\pi) &= f(t) \end{aligned} \]

Show by using piecewise integration of the Euler Formulas that

  1. \(\displaystyle a_n =\frac{4}{n^2 \pi^2}\) for odd values of \(n>0\),
  2. \(a_n = 0\) for even values of \(n\)
  3. \(a_0 = 1/2\).
  4. \(b_n=0\) for all values of \(n\)

and therefore, that the infinite Fourier series for this function is

\[f(t) = \frac{1}{2} + \frac{4}{\pi^2} \left( \cos t + \frac{\cos 3t}{9} + \frac{\cos 5t}{25} + ...\right) \tag{2}\]