ContributeCreate accountLog in

Sine and cosine

From OpenWiki, the free encyclopedia
This is an old revision of this page, as edited by Wikipedia import at 23:38, 5 September 2026. It may differ significantly from the current revision.
{\textrm{hypotenuse}} \\[8pt]

&\cos(\theta) = \frac {\textrm{adjacent}} {\textrm{hypotenuse}} \\[8pt] \end{align}</math> | fields_of_application= Trigonometry, Fourier series, Mathematical analysis. | domain = real number <math> \mathbb{R} </math> | range = <math> [-1,1] </math> }}

In mathematics, sine and cosine are trigonometric functions of an angle. The sine and cosine of an acute angle are defined in the context of a right triangle: for the specified angle, its sine is the ratio of the length of the side opposite that angle to the length of the longest side of the triangle (the hypotenuse), and the cosine is the ratio of the length of the adjacent leg to that of the hypotenuse. For an angle <math>\theta</math>, the sine and cosine functions are denoted as <math>\sin(\theta)</math> and <math>\cos(\theta)</math>.

The definitions of sine and cosine have been extended to any real value in terms of the lengths of certain line segments in a unit circle. More modern definitions express the sine and cosine as infinite series, or as the solutions of certain differential equations, allowing their extension to arbitrary positive and negative values and even to complex numbers.

The sine and cosine functions are commonly used to model periodic phenomena such as sound and light waves, the position and velocity of harmonic oscillators, sunlight intensity and day length, and average temperature variations throughout the year. They can be traced to the and functions used in Indian astronomy during the Gupta period.

Elementary descriptions

[edit]

Right-angled triangle definition

[edit]

To define the sine and cosine of an acute angle <math> \alpha </math>, start with a right triangle that contains an angle of measure <math> \alpha </math>; in the accompanying figure, angle <math> \alpha </math> in a right triangle <math> ABC </math> is the angle of interest. The three sides of the triangle are named as follows:

  • The opposite side is the side opposite to the angle of interest; in this case, it is <math> a </math>.
  • The hypotenuse is the side opposite the right angle; in this case, it is <math> h </math>. The hypotenuse is always the longest side of a right-angled triangle.
  • The adjacent side is the remaining side; in this case, it is <math> b </math>. It forms a side of (and is adjacent to) both the angle of interest and the right angle.

Once such a triangle is chosen, the sine of the angle is equal to the length of the opposite side divided by the length of the hypotenuse, and the cosine of the angle is equal to the length of the adjacent side divided by the length of the hypotenuse: <math display="block">

\sin(\alpha) = \frac{\text{opposite}}{\text{hypotenuse}}, \qquad
\cos(\alpha) = \frac{\text{adjacent}}{\text{hypotenuse}}.

</math>

The other trigonometric functions of the angle can be defined similarly; for example, the tangent is the ratio between the opposite and adjacent sides or equivalently the ratio between the sine and cosine functions. The reciprocal of sine is cosecant, which gives the ratio of the hypotenuse length to the length of the opposite side. Similarly, the reciprocal of cosine is secant, which gives the ratio of the hypotenuse length to that of the adjacent side. The cotangent function is the ratio between the adjacent and opposite sides, a reciprocal of a tangent function. These functions can be formulated as: <math display="block"> \begin{align}

\tan(\theta) &= \frac{\sin (\theta)}{\cos (\theta)} = \frac{\text{opposite}}{\text{adjacent}}, \\
\cot(\theta) &= \frac{1}{\tan (\theta)} = \frac{\text{adjacent}}{\text{opposite}}, \\
\csc(\theta) &= \frac{1}{\sin (\theta)} = \frac {\text{hypotenuse}}{\text{opposite}}, \\
\sec(\theta) &= \frac{1}{\cos (\theta)} = \frac {\textrm{hypotenuse}} {\textrm{adjacent}}.

\end{align} </math>

Special angle measures

[edit]

As stated, the values <math>\sin(\alpha)</math> and <math>\cos(\alpha)</math> appear to depend on the choice of a right triangle containing an angle of measure <math> \alpha </math>. However, this is not the case as all such triangles are similar, and so the ratios are the same for each of them. For example, each leg of the 45-45-90 right triangle is 1 unit, and its hypotenuse is <math> \sqrt{2} </math>; therefore, <math display="inline"> \sin 45^\circ = \cos 45^\circ = \frac{\sqrt{2}}{2} </math>. The following table shows the special value of each input for both sine and cosine with the domain between <math display="inline"> 0 \le x \le \frac{\pi}{2} </math>. The input in this table provides various unit systems such as degree, radian, and so on. The angles other than those five can be obtained by using a calculator.

Angle,
DegreesRadiansGradiansTurnsExactDecimalExactDecimal
0<math>0^g</math>00011
30°<math>\frac {1}{6} \pi</math><math>33\frac{1}{3}^g</math><math>\frac {1}{12}</math><math>\frac {1}{2}</math>0.5<math>\frac{\sqrt{3}}{2}</math>≈ 0.866
45°<math>\frac{1}{4} \pi</math><math>50^g</math><math>\frac {1}{8}</math><math>\frac{\sqrt{2}}{2}</math>≈ 0.707<math>\frac{\sqrt{2}}{2}</math>≈ 0.707
60°<math>\frac {1}{3} \pi</math><math>66 \frac {2}{3}^g</math><math>\frac {1}{6}</math><math>\frac{\sqrt{3}}{2}</math>≈ 0.866<math>\frac {1}{2}</math>0.5
90°<math>\frac {1}{2}\pi</math><math>100^g</math><math>\frac {1}{4}</math>1100

Laws

[edit]
Main article: Law of sines and Law of cosines

The law of sines is useful for computing the lengths of the unknown sides in a triangle if two angles and one side are known. Given a triangle <math> ABC </math> with sides <math> a </math>, <math> b </math>, and <math> c</math>, and angles opposite those sides <math> \alpha </math>, <math> \beta </math>, and <math> \gamma </math>, the law states, <math display="block"> \frac{\sin \alpha}{a} = \frac{\sin \beta}{b} = \frac{\sin \gamma}{c}.</math> This is equivalent to the equality of the first three expressions below: <math display="block">\frac{a}{\sin \alpha} = \frac{b}{\sin \beta} = \frac{c}{\sin \gamma} = 2R,</math> where <math> R </math> is the triangle's circumradius.

The law of cosines is useful for computing the length of an unknown side if two other sides and an angle are known. The law states, <math display="block"> a^2 + b^2 - 2ab\cos(\gamma) = c^2</math> In the case where <math>\gamma = \pi/2</math> from which <math>\cos(\gamma) = 0</math>, the resulting equation becomes the Pythagorean theorem.

Vector definition

[edit]

The cross product and dot product are operations on two vectors in Euclidean vector space. The sine and cosine functions can be defined in terms of the cross product and dot product. If <math> \mathbf{a} </math> and <math> \mathbf{b} </math> are vectors, and <math>\theta</math> is the angle between <math> \mathbf{a} </math> and <math> \mathbf{b} </math>, then sine and cosine can be defined as:[1][2] <math display="block"> \begin{align}

\sin (\theta) &= \frac{|\mathbf{a} \times \mathbf{b}|}{|\mathbf{a}| |\mathbf{b}|}, \\
\cos (\theta) &= \frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{a}| |\mathbf{b}|}.

\end{align} </math>

Analytic descriptions

[edit]

Unit circle definition

[edit]

The sine and cosine functions may also be defined in a more general way by using unit circle, a circle of radius one centered at the origin <math> (0,0) </math>, formulated as the equation of <math> x^2 + y^2 = 1 </math> in the Cartesian coordinate system. A ray from the origin making an angle of <math> \theta </math> with the positive half of the axis intersects the unit circle at exactly one point. The and coordinates of this point of intersection are equal to <math> \cos (\theta) </math> and <math> \sin (\theta) </math>, respectively; that is, <math display="block"> \sin (\theta) = y, \qquad \cos (\theta) = x. </math>

This definition is consistent with the right-angled triangle definition of sine and cosine when <math display="inline"> 0 < \theta < \frac{\pi}{2} </math> because the length of the hypotenuse of the unit circle is always 1; mathematically speaking, the sine of an angle equals the opposite side of the triangle, which is simply the coordinate. A similar argument can be made for the cosine function to show that the cosine of an angle when <math display="inline"> 0 < \theta < \frac{\pi}{2} </math>, even under the new definition using the unit circle.

Graph of a function and its elementary properties

[edit]

[[File:Circle cos sin.gif|thumb|upright=2|Animation demonstrating how the sine function (in red) is graphed from the coordinate (red dot) of a point on the unit circle (in green), at an angle of . The cosine (in blue) is the coordinate.]] Using the unit circle definition has the advantage of drawing the graph of sine and cosine functions. This can be done by rotating counterclockwise a point along the circumference of a circle, depending on the input <math> \theta > 0 </math>. In a sine function, if the input is <math display="inline"> \theta = \frac{\pi}{2} </math>, the point is rotated counterclockwise and stopped exactly on the axis. If <math> \theta = \pi </math>, the point is at the circle's halfway point. If <math> \theta = 2\pi </math>, the point returns to its origin. This results in both sine and cosine functions having the range between <math> -1 \le y \le 1 </math>.

Extending the angle to any real domain, the point rotated counterclockwise continuously. This can be done similarly for the cosine function as well, although the point is rotated initially from the coordinate. In other words, both sine and cosine functions are periodic, meaning any angle added by the circle's circumference is the angle itself. Mathematically, <math display="block"> \begin{align}

\sin(\theta + 2\pi) &= \sin(\theta), \\
\cos(\theta + 2\pi) &= \cos (\theta).

\end{align} </math>

A function <math> f </math> is said to be odd if <math> f(-x) = -f(x) </math>, and is said to be even if <math> f(-x) = f(x) </math>. The sine function is odd, whereas the cosine function is even. Both sine and cosine functions are similar, with their difference being shifted by <math display="inline"> \frac{\pi}{2} </math>. This phase shift can be expressed as <math display="block"> \begin{align}

\sin(\theta) &= \cos\left(\theta - \frac{\pi}{2}\right), \\
\cos(\theta) &= \sin\left(\theta + \frac{\pi}{2}\right).

\end{align} </math>

This is distinct from the cofunction identities that follow below, which arise from right-triangle geometry and are not phase shifts: <math display="block"> \begin{align}

\sin(\theta) &= \cos\left(\frac{\pi}{2} - \theta \right), \\
\cos(\theta) &= \sin\left(\frac{\pi}{2} - \theta \right).

\end{align} </math>

Zero is the only real fixed point of the sine function; in other words the only intersection of the sine function and the identity function is <math>\sin(0)=0</math>. The only real fixed point of the cosine function is called the Dottie number. The Dottie number is the unique real root of the equation <math> \cos (x) = x</math>. The decimal expansion of the Dottie number is approximately 0.739085.[3]

Continuity and differentiation

[edit]

[[File:Sine quads 01 Pengo.svg|thumb|390px|The quadrants of the unit circle and of , using the Cartesian coordinate system]] The sine and cosine functions are infinitely differentiable. The derivative of sine is cosine, and the derivative of cosine is negative sine: <math display="block"> \frac{d}{dx}\sin(x) = \cos(x), \qquad \frac{d}{dx}\cos(x) = -\sin(x).</math> Continuing the process in higher-order derivative results in the repeated same functions; the fourth derivative of a sine is the sine itself. These derivatives can be applied to the first derivative test, according to which the monotonicity of a function can be defined as the inequality of function's first derivative greater or less than equal to zero. It can also be applied to second derivative test, according to which the concavity of a function can be defined by applying the inequality of the function's second derivative greater or less than equal to zero. The following table shows that both sine and cosine functions have concavity and monotonicity—the positive sign (<math> + </math>) denotes a graph is increasing (going upward) and the negative sign (<math> - </math>) is decreasing (going downward)—in certain intervals. This information can be represented as a Cartesian coordinates system divided into four quadrants.

QuadrantAngleSineCosine
DegreesRadiansSignMonotonyConvexitySignMonotonyConvexity
1st quadrant, I<math>0^\circ < x< 90^\circ</math><math>0 < x < \frac{\pi}{2}</math><math>+</math>IncreasingConcave<math>+</math>DecreasingConcave
2nd quadrant, II<math>90^\circ < x < 180^\circ</math><math>\frac{\pi}{2} < x < \pi</math><math>+</math>DecreasingConcave<math>-</math>DecreasingConvex
3rd quadrant, III<math>180^\circ < x < 270^\circ</math><math>\pi < x < \frac{3\pi}{2}</math><math>-</math>DecreasingConvex<math>-</math>IncreasingConvex
4th quadrant, IV<math>270^\circ < x < 360^\circ</math><math>\frac{3\pi}{2} < x < 2\pi</math><math>-</math>IncreasingConvex<math>+</math>IncreasingConcave

Both sine and cosine functions can be defined by using differential equations. The pair of <math>(\cos \theta, \sin \theta)</math> is the solution <math>(x(\theta), y(\theta))</math> to the two-dimensional system of differential equations <math>y'(\theta) = x(\theta)</math> and <math>x'(\theta) = -y(\theta)</math> with the initial conditions <math>y(0) = 0</math> and <math>x(0) = 1</math>. One could interpret the unit circle in the above definitions as defining the phase space trajectory of the differential equation with the given initial conditions. It can be interpreted as a phase space trajectory of the system of differential equations <math>y'(\theta) = x(\theta)</math> and <math>x'(\theta) = -y(\theta)</math> starting from the initial conditions <math>y(0) = 0</math> and <math>x(0) = 1</math>.

Integral and the usage in mensuration

[edit]

Their area under a curve can be obtained by using the integral with a certain bounded interval. Their antiderivatives are: <math display="block"> \int \sin(x)\,dx = -\cos(x) + C \qquad \int \cos(x)\,dx = \sin(x) + C, </math> where <math> C </math> denotes the constant of integration. These antiderivatives may be applied to compute the mensuration properties of both sine and cosine functions' curves with a given interval. For example, the arc length of the sine curve between <math>0</math> and <math>t</math> is <math display="block"> \int_0^t\!\sqrt{1+\cos^2(x)}\, dx =\sqrt{2} \operatorname{E} \left(t, \frac{1}{\sqrt{2}} \right),</math> where <math>\operatorname{E}(\varphi,k)</math> is the incomplete elliptic integral of the second kind with modulus <math>k</math>. It cannot be expressed using elementary functions. In the case of a full period, its arc length is <math display="block"> L = \frac{4\sqrt{2\pi ^3}}{\Gamma(1/4)^2} + \frac{\Gamma(1/4)^2}{\sqrt{2\pi}} = \frac{2\pi}{\varpi}+2\varpi \approx 7.6404</math> where <math>\Gamma</math> is the gamma function and <math>\varpi</math> is the lemniscate constant.[4]

Inverse functions

[edit]

The functions <math display="inline">\sin : \mathbb{R}\to \mathbb{R} </math> and <math>\cos : \mathbb{R}\to \mathbb{R}</math> (as well as those functions with the same function rule and domain whose codomain is a subset of <math>\mathbb{R}</math> containing the interval <math>\left[ -1,1\right]</math>) are not bijective and therefore do not have inverse functions. For example, <math> \sin (0) = 0 </math>, but also <math> \sin (\pi) = 0 </math>, <math> \sin (2\pi) = 0 </math>. Sine's "inverse", called arcsine, can then be described not as a function but a relation (for example, all integer multiples of <math>\pi</math> would have an arcsine of zero). To define the inverse functions of sine and cosine, they must be restricted to their principal branches by restricting their domain and codomain; the standard functions used to define arcsine and arccosine are then <math>\sin : \left[-\pi/2, \pi/2 \right]\to \left[-1, 1 \right]</math> and <math>\cos : \left[0,\pi\right]\to \left[-1,1 \right]</math>. These are bijective and have inverses: <math>\arcsin : \left[-1,1 \right]\to \left[-\pi/2,\pi/2 \right]</math> and <math>\arccos : \left[-1,1 \right]\to \left[ 0, \pi\right]</math>. Alternative notation is <math>\sin^{-1}</math> for arcsine and <math>\cos^{-1}</math> for arccosine.

Using these definitions, one obtains the identity maps and equations: <math display="block">\begin{align} \sin\circ\arcsin\,(x)&= \sin(\arcsin(x)) = x & x&\in \left[ -1,1\right],\\ \arcsin\circ\sin\, (\theta)&= \arcsin(\sin(\theta)) = \theta & \theta&\in \left[ -\pi/2, \pi/2\right], \end{align}</math>and <math display="block">\begin{align} \cos\circ\arccos\, (x)&= \cos(\arccos(x)) = x & x&\in \left[-1,1\right],\\ \arccos\circ\cos\,(\theta)&= \arccos(\cos(\theta)) = \theta & \theta&\in \left[0,\pi\right]. \end{align}</math>

An acute angle <math>\theta</math> is given by: <math display="block"> \theta = \arcsin \left( \frac{\text{opposite}}{\text{hypotenuse}} \right) = \arccos \left( \frac{\text{adjacent}}{\text{hypotenuse}} \right),</math> where for some integer <math> k </math>, <math display="block">\begin{align}

\sin(y) = x \iff & \begin{cases}
  y = \hphantom{\pi -} \arcsin(x) + 2\pi k , &\text{ or }\\
  y = \pi - \arcsin(x) + 2\pi k \\
\end{cases}\\
\cos(y) = x \iff & \begin{cases}
  y = \hphantom{-} \arccos(x) + 2\pi k , &\text{ or }\\
  y = - \arccos(x) + 2\pi k
\end{cases}
\end{align}</math>

Other identities

[edit]

According to Pythagorean theorem, the squared hypotenuse is the sum of two squared legs of a right triangle. Dividing the formula on both sides with squared hypotenuse resulting in the Pythagorean trigonometric identity, the sum of a squared sine and a squared cosine equals 1: <math display="block"> \sin^2 (\theta) + \cos^2(\theta) = 1. </math>

Sine and cosine satisfy the following double-angle formulas:[5] <math display="block"> \begin{align}

\sin(2\theta) &= 2\sin(\theta)\cos(\theta), \\
\cos(2\theta) &= \cos^2(\theta) - \sin^2(\theta) \\
&= 2\cos^2(\theta) - 1 \\
&= 1 - 2\sin^2(\theta)

\end{align} </math>

The cosine double angle formula implies that and are, themselves, shifted and scaled sine waves. Specifically,[6] <math display="block"> \sin^2(\theta) = \frac{1 - \cos(2\theta)}{2}\qquad\cos^2(\theta) = \frac{1 + \cos(2\theta)}{2}</math> The graph shows both sine and sine squared functions, with the sine in blue and the sine squared in red. Both graphs have the same shape but with different ranges of values and different periods. Sine squared has only positive values, but twice the number of periods.

Series and polynomials

[edit]

Both sine and cosine functions can be defined by using a Taylor series, a power series involving the higher-order derivatives. As mentioned in , the derivative of sine is cosine and the derivative of cosine is the negative of sine. This means the successive derivatives of <math> \sin(x) </math> are <math> \cos(x) </math>, <math> -\sin(x) </math>, <math> -\cos(x) </math>, <math> \sin(x) </math>, continuing to repeat those four functions. The th derivative, evaluated at the point 0: <math display="block"> \sin^{(4n+k)}(0)=\begin{cases} 0 & \text{when } k=0 \\ 1 & \text{when } k=1 \\ 0 & \text{when } k=2 \\ -1 & \text{when } k=3 \end{cases}</math> where the superscript represents repeated differentiation. This implies the following Taylor series expansion at <math> x = 0 </math>. One can then use the theory of Taylor series to show that the following identities hold for all real numbers <math> x </math>—where <math> x </math> is the angle in radians. More generally, for all complex numbers: <math display="block">\begin{align} \sin(x) &= x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots \\

&= \sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)!}x^{2n+1}

\end{align}</math> Taking the derivative of each term gives the Taylor series for cosine: <math display="block">\begin{align} \cos(x) &= 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \cdots \\

&= \sum_{n=0}^\infty \frac{(-1)^n}{(2n)!}x^{2n}

\end{align}</math>

Both sine and cosine functions with multiple angles may appear as their linear combination, resulting in a polynomial. Such a polynomial is known as the trigonometric polynomial. The trigonometric polynomial's ample applications may be acquired in its interpolation, and its extension of a periodic function known as the Fourier series. Let <math> a_n </math> and <math> b_n </math> be any coefficients, then the trigonometric polynomial of a degree <math> N </math>—denoted as <math> T(x) </math>—is defined as: <math display="block"> T(x) = a_0 + \sum_{n=1}^N a_n \cos (nx) + \sum_{n=1}^N b_n \sin (nx). </math>

The trigonometric series can be defined similarly analogous to the trigonometric polynomial, its infinite inversion. Let <math> A_n </math> and <math> B_n </math> be any coefficients, then the trigonometric series can be defined as: <math display="block"> \frac{1}{2} A_0 + \sum_{n=1}^\infty A_n \cos (nx) + B_n \sin (nx). </math> In the case of a Fourier series with a given integrable function <math> f </math>, the coefficients of a trigonometric series are: <math display="block"> \begin{align}

A_n &= \frac{1}{\pi} \int_0 ^{2\pi} f(x) \cos (nx) \, dx, \\
B_n &= \frac{1}{\pi} \int_0 ^{2\pi} f(x) \sin (nx) \, dx.

\end{align} </math>

Complex numbers relationship

[edit]

Complex exponential function definitions

[edit]

Both sine and cosine can be extended further via complex number, a set of numbers composed of both real and imaginary numbers. For real number <math> \theta </math>, the definition of both sine and cosine functions can be extended in a complex plane in terms of an exponential function as follows: <math display="block"> \begin{align}

\sin (\theta) &= \frac{e^{i \theta} - e^{-i \theta}}{2i}, \\
\cos (\theta) &= \frac{e^{i \theta} + e^{-i \theta}}{2},

\end{align} </math>

Alternatively, both functions can be defined in terms of Euler's formula: <math display="block"> \begin{align}

e^{i \theta} &= \cos (\theta) + i \sin (\theta), \\
e^{-i \theta} &= \cos (\theta) - i \sin (\theta).

\end{align} </math>

When plotted on the complex plane, the function <math>e^{ix}</math> for real values of <math>x</math> traces out the unit circle in the complex plane. Both sine and cosine functions may be simplified to the imaginary and real parts of <math>e^{i \theta}</math> as: <math display="block"> \begin{align}

\sin \theta &= \operatorname{Im}(e^{i \theta}), \\
\cos \theta &= \operatorname{Re}(e^{i \theta}).

\end{align} </math>

When <math>z=x+iy</math> for real values <math>x</math> and <math>y</math>, where <math> i = \sqrt{-1} </math>, both sine and cosine functions can be expressed in terms of real sines, cosines, and hyperbolic functions as:[7] <math display="block"> \begin{align}

\sin z &= \sin x \cosh y + i \cos x \sinh y, \\
\cos z &= \cos x \cosh y - i \sin x \sinh y.

\end{align}</math>

Polar coordinates

[edit]

Sine and cosine are used to connect the real and imaginary parts of a complex number with its polar coordinates <math> (r, \theta) </math>: <math display="block"> z = r(\cos(\theta) + i\sin(\theta)) = r\cos(\theta) + ir\sin(\theta), </math> and the real and imaginary parts are <math display="block"> \begin{align}

\operatorname{Re}(z) &= r \cos(\theta), \\
\operatorname{Im}(z) &= r \sin(\theta),

\end{align} </math> where <math> r </math> and <math> \theta </math> represent the magnitude and angle of the complex number <math> z </math>.

For any real number <math> \theta </math>, Euler's formula in terms of polar coordinates is stated as <math display="inline">z = re^{i\theta}</math>.

Complex arguments

[edit]

[[File:Complex_sin.jpg|thumb|Domain coloring of in the complex plane. Brightness indicates absolute magnitude, hue represents complex argument.]]

Applying the series definition of the sine and cosine to a complex argument, <math> z </math>, gives: <math display="block">\begin{align} \sin(z)& = \sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)!}z^{2n+1} \\ & = \frac{e^{i z} - e^{-i z}}{2i} \\ & = \frac{\sinh \left( i z\right) }{i} \\ & = -i \sinh \left(i z\right)\\ \cos(z)& = \sum_{n=0}^\infty \frac{(-1)^n}{(2n)!}z^{2n} \\ & = \frac{e^{i z} + e^{-i z}}{2} \\ & = \cosh( i z) \\ \end{align}</math> where <math>\sinh</math> and <math>\cosh</math> are the hyperbolic sine and cosine. These are entire functions.

It is also sometimes useful to express the complex sine and cosine functions in terms of the real and imaginary parts of its argument: <math display="block">\begin{align} \sin (x + iy) &= \sin(x) \cos(iy) + \cos(x) \sin(iy) \\ &= \sin(x) \cosh(y) + i \cos(x) \sinh(y)\\ \cos (x + iy) &= \cos(x) \cos(iy) - \sin(x) \sin(iy) \\ &= \cos(x) \cosh(y) - i \sin(x) \sinh(y)\\ \end{align}</math>

Partial fraction and product expansions of complex sine

[edit]

Using the partial fraction expansion technique in complex analysis, one can find that the infinite series <math display="block"> \sum_{n = -\infty}^{\infty}\frac{(-1)^n}{z-n} = \frac{1}{z} -2z \sum_{n = 1}^{\infty}\frac{(-1)^n}{n^2 - z^2}</math> both converge and are equal to <math display="inline">\frac{\pi}{\sin (\pi z)}</math>. Similarly, one can show that <math display="block">\frac{\pi^2}{\sin^2 (\pi z)} = \sum_{n=-\infty}^\infty \frac{1}{(z - n)^2}.</math>

Using product expansion technique, one can derive <math display="block">\sin(\pi z) = \pi z \prod_{n = 1}^\infty \left( 1 - \frac{z^2}{n^2} \right).</math>

Usage of complex sine

[edit]
is found in the [[functional equation]] for the [[Gamma function]],

<math display="block">\Gamma(s)\Gamma(1 - s) = {\pi\over\sin(\pi s)},</math> which in turn is found in the functional equation for the Riemann zeta-function, <math display="block">\zeta(s) = 2(2\pi)^{s-1}\Gamma(1 - s)\sin\left(\frac{\pi}{2} s\right)\zeta(1 - s).</math>

As a holomorphic function, is a 2D solution of Laplace's equation: <math display="block">\Delta u(x_1, x_2) = 0.</math>

The complex sine function is also related to the level curves of pendulums.[8]

Complex graphs

[edit]

<gallery mode="packed" caption="Sine function in the complex plane" widths="1000px" heights="130px"> Complex sin real 01 Pengo.svg|Real component Complex sin imag 01 Pengo.svg|Imaginary component Complex sin abs 01 Pengo.svg|Magnitude </gallery>
<gallery mode="packed" caption="Arcsine function in the complex plane" widths="1000px" heights="130px"> Complex arcsin real 01 Pengo.svg|Real component Complex arcsin imag 01 Pengo.svg|Imaginary component Complex arcsin abs 01 Pengo.svg|Magnitude </gallery>

Background

[edit]

Etymology

[edit]

The word sine is derived, indirectly, from the Sanskrit word 'bow-string' or more specifically its synonym (both adopted from Ancient Greek 'string; chord'), due to visual similarity between the arc of a circle with its corresponding chord and a bow with its string (see jyā, koti-jyā and utkrama-jyā; sine and chord are closely related in a circle of unit diameter, see Ptolemy's Theorem). This was transliterated in Arabic as , which is meaningless in that language and written as (). Since Arabic is written without short vowels, was interpreted as the homograph (:wikt:جيب), which means 'bosom', 'pocket', or 'fold'. When the Arabic texts of Al-Battani and al-Khwārizmī were translated into Medieval Latin in the 12th century by Gerard of Cremona, he used the Latin equivalent wikt:sinus (which also means 'bay' or 'fold', and more specifically 'the hanging fold of a toga over the breast'). Gerard was probably not the first scholar to use this translation; Robert of Chester appears to have preceded him and there is evidence of even earlier usage.[9] The English form sine was introduced in Thomas Fale's 1593 Horologiographia.[10]

The word cosine derives from an abbreviation of the Latin 'sine of the complementary angle' as in Edmund Gunter's Canon triangulorum (1620), which also includes a similar definition of cotangens.

History

[edit]

[[File:Khalili Collection Islamic Art sci 0040.1 CROP.jpg|right|thumb|Quadrant from 1840s Ottoman Turkey with axes for looking up the sine and versine of angles]] While the early study of trigonometry can be traced to antiquity, the trigonometric functions as they are in use today were developed in the medieval period. The chord function was discovered by Hipparchus of Nicaea (180–125 BCE) and Ptolemy of Roman Egypt (90–165 CE).[11]

The sine and cosine functions are closely related to the and functions used in Indian astronomy during the Gupta period (Aryabhatiya and Surya Siddhanta), via translation from Sanskrit to Arabic and then from Arabic to Latin.[12]

All six trigonometric functions in current use were known in Islamic mathematics by the 9th century, as was the law of sines, used in solving triangles.[13] Al-Khwārizmī (c. 780–850) produced tables of sines, cosines and tangents.[14][15] Muhammad ibn Jābir al-Harrānī al-Battānī (853–929) discovered the reciprocal functions of secant and cosecant, and produced the first table of cosecants for each degree from 1° to 90°.

In the early 17th-century, the French mathematician Albert Girard published the first use of the abbreviations sin, cos, and tan; these were further promulgated by Euler (see below). The Opus palatinum de triangulis of Georg Joachim Rheticus, a student of Copernicus, was probably the first in Europe to define trigonometric functions directly in terms of right triangles instead of circles, with tables for all six trigonometric functions; this work was finished by Rheticus' student Valentin Otho in 1596.

In a paper published in 1682, Leibniz proved that is not an algebraic function of .[16] Roger Cotes computed the derivative of sine in his Harmonia Mensurarum (1722).[17] Leonhard Euler's Introductio in analysin infinitorum (1748) was mostly responsible for establishing the analytic treatment of trigonometric functions in Europe, also defining them as infinite series and presenting "Euler's formula", as well as the near-modern abbreviations sin., cos., tang., cot., sec., and cosec.

Software implementations

[edit]

There is no standard algorithm for calculating sine and cosine. IEEE 754, the most widely used standard for the specification of reliable floating-point computation, does not address calculating trigonometric functions such as sine. The reason is that no efficient algorithm is known for computing sine and cosine with a specified accuracy, especially for large inputs.

Algorithms for calculating sine may be balanced for such constraints as speed, accuracy, portability, or range of input values accepted. This can lead to different results for different algorithms, especially for special circumstances such as very large inputs, e.g. sin(10{{sup|22}}).

A common programming optimization, used especially in 3D graphics, is to pre-calculate a table of sine values, for example one value per degree, then for values in-between pick the closest pre-calculated value, or linearly interpolate between the 2 closest values to approximate it. This allows results to be looked up from a table rather than being calculated in real time. With modern CPU architectures this method may offer no advantage.

The CORDIC algorithm is commonly used in scientific calculators.

The sine and cosine functions, along with other trigonometric functions, are widely available across programming languages and platforms. In computing, they are typically abbreviated to sin and cos.

Some CPU architectures have a built-in instruction for sine, including the Intel x87 FPUs since the 80387.

In programming languages, sin and cos are typically either a built-in function (e.g. in Fortran and MATLAB) or found within the language's standard math library. For example, the C standard library defines sine functions within math.h: sin([[Double-precision floating-point format|double]]), sinf([[Single-precision floating-point format|float]]), and sinl([[long double]]). The parameter of each is a floating point value, specifying the angle in radians. Each function returns the same data type as it accepts. Many other trigonometric functions are also defined in math.h, such as for cosine, arc sine, and hyperbolic sine (sinh). Similarly, Python defines math.sin(x) and math.cos(x) within the built-in math module. Complex sine and cosine functions are also available within the cmath module, e.g. cmath.sin(z). CPython's math functions call the C math library, and use a double-precision floating-point format.

Turns based implementations

[edit]

Some software libraries provide implementations of sine and cosine using the input angle in half-turns, a half-turn being an angle of 180 degrees or <math>\pi</math> radians. Representing angles in turns or half-turns has accuracy advantages and efficiency advantages in some cases. These functions, following the convention set by Fortran, are typically called sinpi and cospi. For example, sinpi(x) would evaluate to <math>\sin(\pi x),</math> where <math>x</math> is expressed in half-turns so that is the angle measure in radians. SciPy provides similar functions sindg and cosdg with input in degrees, as does Fortran (but named sind and cosd).[18]

The accuracy advantage stems from the ability to perfectly represent key angles like full-turn, half-turn, and quarter-turn losslessly in binary floating-point or fixed-point. In contrast, representing <math>2\pi</math>, <math>\pi</math>, and <math display="inline">\frac{\pi}{2}</math> in binary floating-point or binary scaled fixed-point always involves a loss of accuracy since irrational numbers cannot be represented with finitely many binary digits.

Turns also have an accuracy advantage and efficiency advantage for computing modulo to one period. Computing modulo 1 turn or modulo 2 half-turns can be losslessly and efficiently computed in both floating-point and fixed-point. For example, computing modulo 1 or modulo 2 for a binary point scaled fixed-point value requires only a bit shift or bitwise AND operation. In contrast, computing modulo <math display="inline">\frac{\pi}{2}</math> involves inaccuracies in representing <math display="inline">\frac{\pi}{2}</math>.

For applications involving angle sensors, the sensor typically provides angle measurements in a form directly compatible with turns or half-turns. For example, an angle sensor may count from 0 to 4096 over one complete revolution.[19] If half-turns are used as the unit for angle, then the value provided by the sensor directly and losslessly maps to a fixed-point data type with 11 bits to the right of the binary point. In contrast, if radians are used as the unit for storing the angle, then the inaccuracies and cost of multiplying the raw sensor integer by an approximation to <math display="inline">\frac{\pi}{2048}</math> would be incurred. (See also Binary angular measurement.)

See also

[edit]

References

[edit]

Footnotes

[edit]

Citations

[edit]
  1. ^
  2. ^
  3. ^
  4. ^
  5. ^ Extract of page 238
  6. ^
  7. ^
  8. ^
  9. ^ Various sources credit the first use of to either * Plato Tiburtinus's 1116 translation of the Astronomy of Al-Battani * Gerard of Cremona's translation of the Algebra of al-Khwārizmī * Robert of Chester's 1145 translation of the tables of al-Khwārizmī See . See , Chapter 3, for an earlier etymology crediting Gerard. See .
  10. ^ Fale's book alternately uses the spellings "sine", "signe", or "sign".
  11. ^
  12. ^
  13. ^
  14. ^ Jacques Sesiano, "Islamic mathematics", p. 157, in
  15. ^
  16. ^
  17. ^ "Why the sine has a simple derivative ", in Historical Notes for Calculus Teachers by V. Frederick Rickey
  18. ^ Documentation for:
  19. ^

Works cited

[edit]
[edit]
no:Trigonometriske funksjoner
This article is based on Sine and cosine from the English Wikipedia (revision 1366258215), by its contributors, used under the Creative Commons Attribution-ShareAlike licence. The page history there lists the authors.