Preprint
Article

A Series of New Formulas To Approximate the Sine and Cosine Functions

Altmetrics

Downloads

458

Views

1494

Comments

0

This version is not peer-reviewed

Submitted:

07 March 2023

Posted:

08 March 2023

You are already at the latest version

Alerts
Abstract
We approximate the trigonometric function sine and cosine on the interval . This analysis provides two formulas to approximate sine and cosine. At first, we try to derive the formula which involves a square root, and then we derive another formula that does not require any use of a square root. Nevertheless, after deriving the procedure which requires no square root, we further try to increase its accuracy and then derive another formula that approximates trigonometric functions more accurately on the interval [0, pi/2]. So, this analysis provides mainly two types of procedures. One uses square roots, whereas the other does not. We also focus on ensuring the accuracy of these trigonometric functions in the interval [0,pi/2]. This accuracy analysis is portrayed using the graph. This graph shows the difference between the values generated by the functions defined here and the actual value of these functions. So, these graphs also indicate the error of these functions on that interval. Finally, we compare our approximation with the approximation formula of the 7th-century Indian Mathematician Bhaskara I.
Keywords: 
Subject: Computer Science and Mathematics  -   Algebra and Number Theory

1. Introduction

Trigonometry is a branch of mathematics that works on the relationship between the side lengths and angles of triangles. It is quite helpful in various contexts, including surveying, navigation, etc. There are six fundamental functions in trigonometry. These functions mainly relate an angle of a right-angled triangle to ratios of two side lengths. The most widely used of these functions are sine, cosine, and tangent. The cosecant, secant, and cotangent are their reciprocals, respectively. This article mainly discusses sine and cosine functions. The sine function means the ratio of the length of the opposite side to that of the hypotenuse in a right-angled triangle. The cosine function means the ratio between the leg adjacent to the angle of the hypotenuse, and the tangent function means the ratio of sine and cosine. As the length of the hypotenuse is always greater than any other side in any right-angled triangle, the value of both sine and cosine is always a real number between 0 and 1, but the value of the tangent function can be any positive or negative real number. Moreover, sine, cosine, and tan are periodic functions. The period of both sine and cosine functions is 2π. Whether the value would be positive or negative depends on the quadrant. If we can calculate the values in one quadrant successfully, then we can quickly get the values in any quadrant. So, this paper shows a different approach to approximate sine and cosine on the interval 0 ,   π 2 . Throughout the history of the development of trigonometry, many ways have been developed to calculate these functions accurately. In computers, the Taylor series is used to calculate sine [1].
Preprints 69530 i001

2. Derivation and Accuracy

Figure 2. Geometrical structure and isosceles triangle.
Figure 2. Geometrical structure and isosceles triangle.
Preprints 69530 g002
Here, ABC is an isosceles triangle; AQBGH is a circle, and AC and BC are its radii. Let AC=BC=a and AD is perpendicular to BC which means AD is the height of this triangle. Let <ACB=x radian, the chord AB=k, the arc AQB=s, and AD=h. So, the length of the arc AQB= ax [2]. Now, s= ax.
If we apply the cosine law [3], AB= A C 2 + B C 2 2 A C B C c o s x
AB = a 2 + a 2 2 a a cos x AB = a 2 1 cos x .
Let s k = f ⇨ k =   s f ⇨ k =   a x f . Here, PC is perpendicular to AB, and as it is an isosceles, AP=BP and applying the Pythagorean theorem [4], BP= B C 2 C P 2 ⇨ BP= a 2 C P 2 .
Now, AB=AP+ BP ⇨AB=BP+ BP ⇨AB=2BP ⇨2BP=AB
2 a 2 C P 2 = AB   4 ( a 2 C P 2 ) = A B 2 4 a 2 4 C P 2 = k 2 [as chord AB=k] CP = 4 a 2 k 2 2 .
Area of the isosceles ABC= 1 2 A B . C P = 1 2 k 4 a 2 k 2 2 = k 4 a 2 k 2 4 = a x 4 a 2 a 2 x 2 f 2 4 f   a s k = a x f .
Also, the area of isosceles ABC is ( B C ) ( A D ) 2 or a h 2 [5].
So, a x 4 a 2 a 2 x 2 f 2 4 f = a h 2 x 4 a 2 a 2 x 2 f 2 4 f = h 2 x 4 a 2 f 2 a 2 x 2 4 f 2 = h 2 a x 4 f 2 x 2 4 f 2 = h 2 2 x 4 f 2 x 2 4 f 2 = h a x 4 f 2 x 2 2 f 2 = sin x a c c o r d i n g   t o   F i g u r e 2 , h a = A D A C = sin x Thus, sin x = x 4 f 2 x 2 2 f 2 .
Now, as f =   s k ⇨f =   a x a 2 ( 1 cos x ) ⇨ f =   x 2 ( 1 cos x ) . ..……………………………….…………….. (1)
.
In Figure 3(a), the part of the graph where x is between 0 and π 2 radian can be considered as a part of a parabola [6]. The equation of that parabola would be like: ( x 0 ) 2 = m ( y 1 ) x 2 = m y m ⇨ y= x 2 + m m ...…... (2)
Where, m is a constant. Now, it can assume that when x is between 0 and π 2   radian, f x 2 + m m   because this parabola approximates the function of f on the interval [0, π 2 ]. Hence,
sin x   x 4 x 2 + m m 2 x 2 2 x 2 + m m 2 ……………… (3)
For m=23, it can be noted from Figure 3(b) that Equation (3) provides a relatively good estimate when the angle is between 0 and π 2 radian.
Figure 3. (c): Comparison of f =   x 2 ( 1 cos x ) and y =   x 2 + 23 23 on the interval 0 ,   π 2 .
Figure 3. (c): Comparison of f =   x 2 ( 1 cos x ) and y =   x 2 + 23 23 on the interval 0 ,   π 2 .
Preprints 69530 g005
From Figure 3(c), f x 2 + 23 23 . Let q x = x 4 x 2 + 23 23 2 x 2 2 x 2 + 23 23 2 . Replacing x with π 2 x ,
q π 2 x = 23 π 2 x 4 ( π 2 x 2 + 23 ) 2 529 π 2 x 2 2 π 2 x 2 + 23 2
Preprints 69530 i002
From Figures 4(a), 4(b), 4(c), and 4(d), it is examined that the error is very negligible on the interval [0, π 2 ].
So, q(x) sin x , and q π 2 x cos x   . Hence,
sin x     23 x 4 x 2 + 23 2 529 x 2 2 x 2 + 23 2 ……………… (4)   cos x     23 π 2 x 4 ( π 2 x 2 + 23 ) 2 529 π 2 x 2 2 π 2 x 2 + 23 2 ……………… (5)
Now, f   x 2 + 23 23    x 2 ( 1 cos x )   S i n c e f = x 2 ( 1 cos x ) x 2 + 23 23      x 2 ( 1 cos x ) ( x 2 + 23 ) 2 529     x 2 2 ( 1 cos x ) ⇨ 1 – cos x    529 x 2 2 ( x 2 + 23 ) 2 cos x   1 – 529 x 2 2 ( x 2 + 23 ) 2 .
Thus   cos x 1     529 x 2 2 ( x 2 + 23 ) 2 ……………… (6) Replacing x with π 2 x gives   sin x   1 - 529 π 2 x 2 2 π 2 x 2 + 23 2 ……………… (7)
Preprints 69530 i003
In Figure 5(a), when x is between 0 and π 4 radian, Equation (6) provides better approximation value. So, in order to approximate sine and cosine more accurately, we can use this formula: cos x = 2 ( cos x 2 ) 2 1   [ 7 ] . This formula is helpful because π 4 = 1 2 . π 2 . So, replacing x with x 2 , cos x 2    ≈ 1- 529 x 2 2 2 x 2 2 + 23 2 . Since  cos x = 2 ( cos x 2 ) 2 1 , we get the following expression
cos x   2 1 1058 x 2 x 2 + 92 2 2 1   = n(x) …………….……….………………… (8)
Preprints 69530 i004
Replacing x with π 2 x , sin x 2 1 1058 π 2 x 2 π 2 x 2 + 92 2 2 1   = W(x) …………….……….………………… (9)
Preprints 69530 i005
All these formulas approximate well when x is between 0 and π 2 radian.

3. Comparing with Bhaskara I’s formula to approximate Sine

There is a formula of 7th century Indian Mathematician Bhaskara (c.600 – c.680) to approximate sine [8]. That formula is sin x   16 x ( π x ) 5 π 2 4 x ( π x ) , and Equation (4) is sin x     23 x 4 x 2 + 23 2 529 x 2 2 x 2 + 23 2 . Let v(x) = 16 x ( π x ) 5 π 2 4 x ( π x ) .
Preprints 69530 i006
Figures 7(a) and 7(c) show that Equations (4) and (9) approximate Sine better than Bhaskara I’s formula in many points, respectively.
Preprints 69530 i007

4. Comparing with Bhaskara I’s formula to approximate Cosine

The cosine approximation of Mathematician Bhaskara I [8] is cos x   π 2 4 x 2 π 2 + x 2 and Equation (5) is cos x   23 π 2 x 4 ( π 2 x 2 + 23 ) 2 529 π 2 x 2 2 π 2 x 2 + 23 2 . Let c(x) = π 2 4 x 2 π 2 + x 2 .
Preprints 69530 i008
According to Figures 8(a) and 8(c), the cosine is more closely approximated by Equations (5) and (8) than by Bhaskara I’s formula in many instances.
Preprints 69530 i009

5. Conclusion

In this paper, we have derived two types of formula to approximate sine and cosine. One type involves square root and another type does not require any use of square root. The formulas are
1.  sin x   23 x 4 x 2 + 23 2 529 x 2 2 x 2 + 23 2 .
2.  cos x   23 π 2 x 4 ( π 2 x 2 + 23 ) 2 529 π 2 x 2 2 π 2 x 2 + 23 2 .
3.  cos x ≈ 1 – 529 x 2 2 ( x 2 + 23 ) 2 .
4.  sin x ≈ 1 – 529 π 2 x 2 2 π 2 x 2 + 23 2 .
5.  cos x   2 1 1058 x 2 x 2 + 92 2 2 1 .
6.  sin x 2 1 1058 π 2 x 2 π 2 x 2 + 92 2 2 1 .
All of these formulas approximate well when x is between 0 and π 2 radian. As sine and cosine are periodic functions, their value keeps getting the same after a certain angle, which is 2 π radian. The value of both sine and cosine is positive when x is between 0 and π 2 radian, which means the first quadrant. Moreover, the value of sine and cosine is also positive when x is in the second and fourth quadrants, respectively. So, the value of sine is negative when x is in the third or fourth quadrant. On the other hand, the value of cosine is negative when x is in the second or third quadrant. But as both are positive in the first quadrant, these approximations achieved in this paper can be considered as the approximation of their absolute value. So, if we use these formulas to approximate their absolute value and then consider the quadrant, we can get a proper approximation for any value of x by deciding whether it is negative or positive. Thus, we can use these formulas to approximate sine and cosine in any quadrant. Moreover, these formulas provide a more accurate value than Bhaskara I’s formula in most of the cases on the interval 0 , π 2 . Thus, these formulas can be used as a better substitution for the Mathematician Bhaskara I’s formula.

Acknowledgments

The author M. Kamrujjaman acknowledged to the University Grant Commission and the University of Dhaka.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Introduction to Trigonometry. https://en.wikipedia.org/wiki/Trigonometry.
  2. Length of an arc. https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.mathcentre.ac.uk/resources/uploaded/mc-ty-radians-2009-1.pdf&ved=2ahUKEwjP37HH1-n7AhWfVmwGHZiyAlo4KBAWegQIBBAB&usg=AOvVaw17NfJOZgHCXOgjj6rjxJHk.
  3. Cosine Law. https://www.google.com/url?sa=t&source=web&rct=j&url=https://personal.math.ubc.ca/~feldman/m100/trigId.pdf&ved=2ahUKEwjM-ouZyun7AhVMcGwGHV8WBxc4WhAWegQIBxAB&usg=AOvVaw348WZ_cZr9eKC7czlEX6zp.
  4. Pythagorean Theorem. https://www.google.com/url?sa=t&source=web&rct=j&url=https://scholarworks.boisestate.edu/cgi/viewcontent.cgi%3Farticle%3D1009%26context%3Dmath_undergraduate_theses&ved=2ahUKEwjH4dTFy-n7AhWQT2wGHSTNAMU4FBAWegQIAhAB&usg=AOvVaw3KNEjTwu_V9qY5uYnjEcjU.
  5. Area of a Triangle. http://www2.clarku.edu/faculty/djoyce/trig/area.html#:~:text=There%20are%20several%20ways%20to,the%20base%20times%20the%20height.
  6. Parabola. https://www.cbsd.org/cms/lib/PA01916442/Centricity/Domain/2780/333202_1002_735-743.pdf.
  7. Shavana Gonzalez. DOUBLE-ANGLE AND HALF-ANGLE IDENTITIES. https://www.alamo.edu/contentassets/35e1aad11a064ee2ae161ba2ae3b2559/analytic/math2412-double-angle-power-reducing-half-angle-identities.pdf.
  8. Karel Stroethoff. Bhaskara’s approximation for the Sine. The Mathematics Enthusiast, 11(3), 2014. https://www.google.com/url?sa=t&source=web&rct=j&url=https://scholarworks.umt.edu/cgi/viewcontent.cgi%3Farticle%3D1313%26context%3Dtme&ved=2ahUKEwjGu5Wu1-v7AhW8cGwGHWMSCs4QFnoECBoQAQ&usg=AOvVaw2GG3cyPh2tCLlPjThsv2Lk https://en.wikipedia.org/wiki/Bhaskara_I%27s_sine_approximation_formula.
Figure 3. (a): Graphical presentation of f = x 2 ( 1 cos x )
Figure 3. (a): Graphical presentation of f = x 2 ( 1 cos x )
Preprints 69530 g003
Figure 3. (b): Modular difference between exact sin x and Equation (3) for different values of m.
Figure 3. (b): Modular difference between exact sin x and Equation (3) for different values of m.
Preprints 69530 g004
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2024 MDPI (Basel, Switzerland) unless otherwise stated