I am looking at the derivation of the Fourier transform here and am stuck at a step.
" $$ \begin{align} \int_{-\pi}^{\pi}{y(t)cos(mt)dt} = a_m \int_{-\pi}^{\pi}cos^{2}(mt)dt \end{align}$$
Solving for this $a_m$, we find that: $$ \begin{align} a_m = \frac{1}{\pi}\int_{-\pi}^{\pi}{y(t) cos(mt)dt} \end{align} $$ "
I tried to split $$ \begin{align} \frac{\int_{-\pi}^{\pi}{y(t)cos(mt)dt}}{\int_{-\pi}^{\pi}cos^{2}(mt)dt } = a_m \end{align} $$
into parts for distinct t (as if the integral was the sum of a discrete series) and matching terms led to
$$ \frac{y(t_1)\cos(mt_1)}{\cos^2(mt_1)} + \frac{y(t_2)\cos(mt_2)}{\cos^2(mt_2)} ... $$
$$ \begin{align} \frac{\int_{-\pi}^{\pi}{y(t)} dt}{\int_{-\pi}^{\pi}cos(mt)dt } = a_m \end{align} $$
but I guess this approach is wrong as can't fit it into the correct equation, and am stuck.
I am not fully sure of what the question is here, is it to find $a_m$? The Fourier coefficient can be simply obtained by explicitly evaluating the integral on the RHS, namely \begin{equation} \int_{-\pi}^{\pi} \cos^2(mt) dt = \int_{-\pi}^{\pi} \cfrac{1}{2} + \cfrac{1}{2} \cos(2mt) dt = \left[\cfrac{t}{2} + \cfrac{1}{4m} \sin(2mt)\right]_{-\pi}^{\pi} = \pi \end{equation} since the contribution from the $\sin$ function is zero for any integer multiple values of $\pi$ and note that $m$ is an integer so $2m$ is also an integer, so $\sin(\pm 2m \pi) = 0$ for integers $m$. Then you have, \begin{equation} a_m \pi = \int_{-\pi}^{\pi} y(t) \cos(mt) dt, \end{equation} yielding the result. Also, one must take greater care when handling the division of integrals. In your attempt to express the integrals as the limit of a Riemannian sum, you just cancelled out a factor of $\cos(mt)$, essentially treating this term as being independent of the integrating variable $t$, which is clearly not the case. Instead, just use the Fundamental Theorem Of Calculus and solve RHS.