1

If we have $s$ circle with the diameter $AB$ (with length $1$) and the center $O$, then we can approximate $\operatorname{chord} AC$ where $x$ represents the value of the $\angle AOC$ in degrees, and $t=90-\frac{x}{2}$.So formula is $1-\frac{2\left(\frac{{\pi}}{360}t\right)^{2}}{\left(\dfrac{\left(\frac{\pi}{360}\right)}{\sin\left(\frac{\pi}{360}\right)} +3.21916469998\cdot 10^{-11}\cdot \left(t^{2}+\frac{t^4}{90^2\cdot23.89}\right)\right)^{\,2t^{2}}}$

For example, if $x=60(t=60)$, we will get $0.500000092\ldots$,or $x=120,(t=30)$ we will get $0.866025407\dots$.So if $x<360$ then the value of the error cannot be greater than $4.52\cdot 10^{-7}$

Is there formula with a more precise approximate value for $\sin\frac{{\pi}}{360}x$ than mine?

and another question whether it can be simplified?

Srbin
  • 29
  • 1
    Are you sure it's not cosine, rather than sine? The graph looks like cosine to me ... – Matti P. Aug 26 '21 at 08:02
  • 2
    Anyway, what an expression! I think it would be easier just to use a Taylor polynomial ... – Matti P. Aug 26 '21 at 08:03
  • 2
    Where the coefficients are coming from ? Why don't you write the formal equation ? If you add it, please, use radians. – Claude Leibovici Aug 26 '21 at 09:43
  • 1
    With the Taylor approximation $$ \sin x \approx \sum\limits_{k = 0}^8 {( - 1)^k \frac{{x^{2k + 1} }}{{(2k + 1)!}}} $$ you can achive this accuracy for $-\pi \leq x \leq \pi$. – Gary Aug 26 '21 at 10:10
  • Ah, yes, with your strange (i.e. wrong) conception that $1$ degree is $\pi/360$. I forgot about that in the formula. Nevertheless, the formula is not as good near $0$ and near $360$. At zero it's -0.000164803 (instead of 0). – Jean-Claude Arbaut Aug 26 '21 at 12:06
  • All in all, the approximation is not too bad, but 1/ you can do much better with polynomials or rational fractions (e.g. equioscillation approximation or Padé approximant) 2/ considering you need to compute an exponential and a log, it's not really interesting. – Jean-Claude Arbaut Aug 26 '21 at 12:13
  • For instance, with a minimax approximation with a quotient of two polynomials of degree $7$, I get max error $10^{-9}$. Or with a single polynomial of degree $11$, max error is $9.5\cdot10^{-8}$, still better, with only $11$ multiplications and $11$ additions. – Jean-Claude Arbaut Aug 26 '21 at 12:28

1 Answers1

3

If you look at this question of mine, you will see that I tried to approximate the sine function (in radians) as $$f_p(x)=\sum_{n=1}^p a_n\big[(\pi-x)x\big]^n$$ the coefficients being computed minimizing

$$S_p=\int_0^\pi\big[\sin(x)-f_p(x)\big]^2\,dx$$ $f_4(x)$ satisfies the requirement and the coefficients are $$a_1=\frac{55440 \left(-8910720+1038960 \pi ^2-14196 \pi ^4+41 \pi ^6\right)}{\pi ^{11}}\sim\frac{3185}{10006}$$ $$a_2=-\frac{720720 \left(-15079680+1754640 \pi ^2-23616 \pi ^4+65 \pi ^6\right)}{\pi ^{13}}\sim\frac{301}{9332}$$ $$a_3=\frac{2882880 \left(-24504480+2847240 \pi ^2-37920 \pi ^4+101 \pi ^6\right)}{\pi ^{15}}\sim \frac{13}{11238}$$ $$a_4=-\frac{24504480 \left(-5765760+669240 \pi ^2-8844 \pi ^4+23 \pi ^6\right)}{\pi ^{17}}\sim\frac{1}{43158}$$ and the maximum error is $7.81\times 10^{-8}$. For these values, $S_4=3.83\times 10^{-15}$.