<s>[INST] Bhaskara approximation of cos(x) In my knowledge the best aproximation of $\sin$ and $\cos$ is Bhaskara approximation which is :
$$\sin(x) \simeq \frac{16 (\pi -x) x}{5 \pi ^2-4 (\pi -x) x}\qquad (0\leq x\leq\pi)$$
and
$$\cos(x) \simeq\frac{\pi ^2-4x^2}{\pi ^2+x^2}\qquad (-\frac \pi 2 \leq x\leq\frac \pi 2)$$
what is the best approximation of $\cos(x)$ for $ -\pi\leq x\leq 0$ (by a regular function ) ?
 [/INST] In terms of approximation, you can do a lot of things depending on how many terms you want to include in the expression. Most of the time, this is done using Padé approximants.
For example, for your question, using the simple $[3,2]$  Padé approximant built around $x=-\frac \pi 2$, we get
$$\cos(x)=\left(x+\frac{\pi }{2}\right)\frac {1-\frac{7}{60} \left(x+\frac{\pi
   }{2}\right)^2 } {1+\frac{1}{20}\left(x+\frac{\pi
   }{2}\right)^2  }$$ which leads to an absolute error of $0.0042$ at the bounds.
For sure, you could go further and use the $[5,4]$  Padé approximant
$$\cos(x)=\left(x+\frac{\pi }{2}\right)\frac {1-\frac{53}{396} \left(x+\frac{\pi
   }{2}\right)^2+\frac{551 }{166320}\left(x+\frac{\pi
   }{2}\right)^4 } {1+\frac{13}{396} \left(x+\frac{\pi }{2}\right)^2+\frac{5 }{11088}\left(x+\frac{\pi
   }{2}\right)^4 }$$ which leads to an absolute error of $3.0\times 10^{-6}$ at the bounds. This is equivalent to the Taylor series to $O\left(\left(x+\frac{\pi   }{2}\right)^{11}\right)$.
To give you an idea of the possible improvements; consider that $P_n$ is the $[2n+1,2n]$ Padé approximant of $\cos(x)$ built around $x=-\frac{\pi
   }{2}$ and compute the norm
$$\Phi_n=\int_{-\pi}^0 \big[\cos(x)-P_n\big]^2\,dx$$
$$\left(
\begin{array}{cc}
 n & \Phi_n \\
 1 & 3.92 \times 10^{-6} \\
 2 & 1.26 \times 10^{-12}\\
 3 & 2.23 \times 10^{-20}
\end{array}
\right)$$
All of these have been done only based on the information (function and derivative values) at  $x=-\frac{\pi}{2}$.
But we can try to cover the whole range and consider for example
$$\cos(x) \sim \left(x+\frac{\pi }{2}\right)\frac {1+a \left(x+\frac{\pi
   }{2}\right)^2+b\left(x+\frac{\pi
   }{2}\right)^4 } {1+c \left(x+\frac{\pi }{2}\right)^2+d\left(x+\frac{\pi
   }{2}\right)^4 }$$ and obtain
$$a=\frac{-1952+672 \pi -192 \pi ^2+56 \pi ^3}{\pi ^3(\pi ^2-10)}$$
$$b=\frac{-3456+1056 \pi +768 \pi ^2-240 \pi ^3 } {\pi ^5 \left(\pi ^2-10\right) }$$
$$c=\frac{-192+72 \pi -104 \pi ^2+32 \pi ^3 } {\pi ^2 \left(\pi ^2-10\right) } $$
$$d=\frac{-4704+1504 \pi +400 \pi ^2-128 \pi ^3} {\pi ^4 \left(\pi ^2-10\right) }$$ which gives a maximum absolute error equal to $5.96\times 10^{-8}$  and a norm equal to $2.73\times 10^{-15}$ (which is $461$ times smaller than $\Phi_2$).
You could notice that the coefficients are extremely close to those of $P_2$ but these minor changes make a lot of difference.
All these approximations have been built for answering your question.
</s>