Where could I find the reference for the statement of Euler finding out the coefficients of Fourier series?

I am reading Carlslaw's "Introduction to the Theory of Fourier's Series and Integrals", first chapter on the history of Fourier series, page 3. The author asserts that Clairaut and Euler did derive in parts the coefficients of Fourier series. He said Euler wrote:

$$f(x)=a_0+2a_1\cos(x)+2a_2\cos(2x)+...2a_n(\cos(n)$$

Euler multipled both sides $$\cos(nx)$$ and integrated the series from $$0$$ to $$\pi$$ term by term to obtain:

$$a_n=\int_{0}^{\pi}f(x)\cos(nx)dx$$

His reference is Petrop.N.Acta, 11, 1793(1798), page 94 (May 1777).

I checked it and find "Methodus facilis inveniendi series per sinus sosinusve angulorum multiplorum procedentes, quarum usus in universa theoria astronomiae est amplissimus". I think this is the correct paper, but I cannot find the reference that the author made.

In that article, I only see on page 101, this:

$$S=1+\cos(x)+\cos(2x)+\cos(3x)+...$$

Multiply by $$2\sin(\frac{x}{2})$$

One get:

$$2\sin(\frac{x}{2})S=2\sin(\frac{x}{2})+2\sin(\frac{x}{2})\cos(x)+2\sin(\frac{x}{2})\cos(2x)+2\sin(\frac{x}{2})\cos(3x)+...$$

$$2\sin(\frac{x}{2})S=2\sin(\frac{x}{2})+\sin(\frac{3}{2}x)-\sin(\frac{3}{2}x)+\sin(\frac{5}{2}x)-\sin(\frac{5}{2}x)...+\sin(n+\frac{1}{2}x)-\sin(n-\frac{1}{2}x)$$

This is on page 101.

I couldn't find the reference for this integral, can you help me to find it?