Question

# Find the discrete Fourier approximation g_{2}(x) for f(x)f(x) based on the table information. x |-\frac{\pi}{2} | 0 | \frac{\pi}{2} | \pi f(x) | 0 | 1

Discrete math

Find the discrete Fourier approximation $$g_{2}(x)$$ for $$f(x)$$ based on the table information.
$$x |-\frac{\pi}{2} | 0 | \frac{\pi}{2} | \pi$$
$$f(x) | 0 | 1 | 3 | -2$$

2021-06-08
Find coefficients
$$\displaystyle{a}_{{0}}={\frac{{{1}}}{{{4}}}}{\left({f{{\left({\frac{{-\pi}}{{{2}}}}\right)}}}+{f{{\left({0}\right)}}}+{f{{\left({\frac{{\pi}}{{{2}}}}\right)}}}+{f{{\left(\pi\right)}}}\right)}={\frac{{{1}}}{{{4}}}}{\left({0}+{1}-{3}-{2}\right)}={\frac{{{1}}}{{{2}}}}$$
$$\displaystyle{a}_{{1}}={\frac{{{1}}}{{{2}}}}{\left({f{{\left({\frac{{-\pi}}{{{2}}}}\right)}}}{\cos{{\left({\frac{{-\pi}}{{{2}}}}\right)}}}+{f{{\left({0}\right)}}}{\cos{{\left({0}\right)}}}+{f{{\left({\frac{{\pi}}{{{2}}}}\right)}}}{\cos{{\left({\frac{{\pi}}{{{2}}}}\right)}}}+{f{{\left(\pi\right)}}}{\cos{{\left(\pi\right)}}}\right)}$$
$$\displaystyle={\frac{{{1}}}{{{2}}}}{\left({0}{\cos{{\left({\frac{{-\pi}}{{{2}}}}\right)}}}+{1}{\cos{{\left({0}\right)}}}+{3}{\cos{{\left({\frac{{\pi}}{{{2}}}}\right)}}}-{2}{\cos{{\left(\pi\right)}}}\right)}={\frac{{{3}}}{{{2}}}}$$
$$\displaystyle{b}_{{1}}={\frac{{{1}}}{{{2}}}}{\left({f{{\left({\frac{{-\pi}}{{{2}}}}\right)}}}{\sin{{\left({\frac{{-\pi}}{{{2}}}}\right)}}}+{f{{\left({0}\right)}}}{\sin{{\left({0}\right)}}}+{f{{\left({\frac{{\pi}}{{{2}}}}\right)}}}{\sin{{\left({\frac{{\pi}}{{{2}}}}\right)}}}+{f{{\left(\pi\right)}}}{\sin{{\left(\pi\right)}}}\right)}$$
$$\displaystyle={\frac{{{1}}}{{{2}}}}{\left({0}{\sin{{\left({\frac{{-\pi}}{{{2}}}}\right)}}}+{1}{\sin{{\left({0}\right)}}}+{3}{\sin{{\left({\frac{{\pi}}{{{2}}}}\right)}}}-{2}{\sin{{\left(\pi\right)}}}\right)}={\frac{{{3}}}{{{2}}}}$$
The Fourier approximation is
$$\displaystyle{g}_{{1}}={\frac{{{1}}}{{{2}}}}+{\frac{{{3}}}{{{2}}}}{\cos{{\left({x}\right)}}}+{\frac{{{3}}}{{{2}}}}{\sin{{\left({x}\right)}}}$$