Exacting the Sine Wave

53 Views Asked by At

I have a sine wave plotted with points but I am having trouble making an equation that actually fits the points. I have made the sine wave as close as I could come to correct but I don't know the math to fix my issue. I was hoping someone knew how to get this sine wave right. All the information/data is in this desmos link: https://www.desmos.com/calculator/9fhqzipwfk

1

There are 1 best solutions below

0
On

Any periodic function can be approximated by a Fourier series. In this case, the function is $f(x)=\frac{2}{\cos x}$. Note that this is even function so it can be represented as a cosine series:
$f(x)=\frac{a_0}{2}+\sum\limits_{n=1}^{\infty} a_n \cos(4nx)$ where $a_0=\frac{16}{\pi}\int\limits_0^{\frac{\pi}{4}} \frac{1}{\cos x}dx=\frac{8}{\pi}\log(3+2\sqrt{2}), a_n=\frac{16}{\pi}\int\limits_0^{\frac{\pi}{4}} \frac{ \cos 4nx}{\cos x}dx=a_0+\frac{16\sqrt 2}{\pi}\sum\limits_{i=0}^{n-1} (-1)^{n}\left(\frac{1}{4n+3}-\frac{1}{4n+1}\right)$.

If you are interested in how the integrals can be evaluated, please see this