I noticed that the shape of a cubic graph of the equation $y=ax^3+0x^2+cx+0$ is similar to the shape of the graph of 1 period of $-\sin(x)$. Is there a cubic equation that exactly matches the graph of $-\sin(x)$ from $-\pi\le x \le\pi$?
I came fairly close simply through trial and error. The equation $y=.155x^3-x$ gets me a close match from $-\pi/2 < x < \pi/2$.
The $-\sin(x)$ has these 4 points. ${(-\pi,0),(-\pi/2, 1),(0,0),(\pi/2,-1),(\pi,0)}$
I calculated the values for a cubic equation containing all 4 of those points. The equation is $y=\frac{8}{3\pi ^3}x^3-\frac{8}{3\pi }x$. However, the equation is not as close as the one I manually found. While it does have all 4 points, the points of $(-\pi/2,1)$ and $(\pi/2,-1)$ are not relative maximum and minimums of the cubic function.
So is it even possible to match the two graphs exactly?
My graphs can be seen at https://www.desmos.com/calculator/aqux4jrvix
Thanks.
You can never find a polynomial that would match $\sin x$ on an open interval. The naïve reasoning would be to say that in the contrary case noone would talk about $\sin$, we would be talking about that polynomial.
THe correct way to prove that is to consider the derivatives. After a ceratin order $N$ all derivatives of a polynomial are identically zero. Yet the $N$-th derivative of $\sin x$ can not be identically zero for obvious reasons. Therefore, there is no polynomials that match $\sin x$ exactly.
Yet there is still hope. The first point is that $\sin x$ is an analytical function, and hence it can be approximated by its Taylor polynomial, wikipedia would be a good start. $$\sin x = x - \frac{x^3}{6}+\dots.$$ The second point would be to fix an interval, say, $[-\pi, pi]$, fix a degree $N$ and then try to find a polynomial $P$ of degree $N$ such that sup-norm of difference is minimised: $$\sup_{|x|\le \pi} |\sin x - P(x)|$$ This is what you essentially were trying to do.
The third one would be to fix $N$ of points $x_i$ where you want $P(x_i)=\sin x_i$. Such a polynomial exists, you can even prove that its degree can be chosen to be at most $N-1$.
There are many other approaches to finding a polynomial that "approximates" a trigonometric function, the choice of definition of the word "approximates" is completely up to you.