The cosine function cosx is one of the basic functions encountered in trigonometry (the others being the cosecant, cotangent, secant, sine, and tangent). Let theta be an angle measured counterclockwise from the x-axis along the arc of the unit circle. Then costheta is the horizontal coordinate of the arc endpoint.


The common schoolbook definition of the cosine of an angle theta in a right triangle (which is equivalent to the definition just given) is as the ratio of the lengths of the side of the triangle adjacent to the angle and the hypotenuse, i.e.,


A convenient mnemonic for remembering the definition of the sine, cosine, and tangent is SOHCAHTOA (sine equals opposite over hypotenuse, cosine equals adjacent over hypotenuse, tangent equals opposite over adjacent).

As a result of its definition, the cosine function is periodic with period 2pi. By the Pythagorean theorem, costheta also obeys the identity

Min Max
Im Powered by webMathematica

The definition of the cosine function can be extended to complex arguments z using the definition


where e is the base of the natural logarithm and i is the imaginary number. Cosine is an entire function and is implemented in the Wolfram Language as Cos[z].

A related function known as the hyperbolic cosine is similarly defined,


The cosine function has a fixed point at 0.739085... (OEIS A003957), a value sometimes known as the Dottie number (Kaplan 2007).

The cosine function can be defined analytically using the infinite sum


or the infinite product


A close approximation to cos(pix/2) for x in [0,1] is

 approx cos(pi/2x)

(Hardy 1959), where the difference between cos(pix/2) and Hardy's approximation is plotted above.

The cosine obeys the identity


and the multiple-angle formula

 cos(nx)=sum_(k=0)^n(n; k)cos^kxsin^(n-k)xcos[1/2(n-k)pi],

where (n; k) is a binomial coefficient. It is related to tan(x/2) via


(Trott 2006, p. 39).

Summation of cos(nx) from n=0 to N can be done in closed form as




where |p|<1. The exponential sum formula gives


The sum of cos^2(kx) can also be done in closed form,


The Fourier transform of cos(2pik_0x) is given by


where delta(k) is the delta function.

Cvijović and Klinowski (1995) note that the following series


has closed form for nu=2n,


where E_n(x) is an Euler polynomial.

A definite integral involving cosx is given by


for n>1 where Gamma(z) is the gamma function (T. Drane, pers. comm., Apr. 21, 2006).

See also

Cis, Dottie Number, Elementary Function, Euler Polynomial, Exponential Sum Formulas, Fourier Transform--Cosine, Hyperbolic Cosine, Inverse Cosine, Secant, Sine, SOHCAHTOA, Tangent, Trigonometric Functions, Trigonometry Explore this topic in the MathWorld classroom

Related Wolfram sites

Explore with Wolfram|Alpha


Abramowitz, M. and Stegun, I. A. (Eds.). "Circular Functions." §4.3 in Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, pp. 71-79, 1972.Beyer, W. H. CRC Standard Mathematical Tables, 28th ed. Boca Raton, FL: CRC Press, p. 215, 1987.Cvijović, D. and Klinowski, J. "Closed-Form Summation of Some Trigonometric Series." Math. Comput. 64, 205-210, 1995.Hansen, E. R. A Table of Series and Products. Englewood Cliffs, NJ: Prentice-Hall, 1975.Hardy, G. H. Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work, 3rd ed. New York: Chelsea, p. 68, 1959.Jeffrey, A. "Trigonometric Identities." §2.4 in Handbook of Mathematical Formulas and Integrals, 2nd ed. Orlando, FL: Academic Press, pp. 111-117, 2000.Kaplan, S. R. "The Dottie Number." Math. Mag. 80, 73-74, 2007.Project Mathematics. "Sines and Cosines, Parts I-III." Videotape., N. J. A. Sequence A003957 in "The On-Line Encyclopedia of Integer Sequences."Spanier, J. and Oldham, K. B. "The Sine sin(x) and Cosine cos(x) Functions." Ch. 32 in An Atlas of Functions. Washington, DC: Hemisphere, pp. 295-310, 1987.Tropfke, J. Teil IB, §1. "Die Begriffe des Sinus und Kosinus eines Winkels." In Geschichte der Elementar-Mathematik in systematischer Darstellung mit besonderer Berücksichtigung der Fachwörter, fünfter Band, zweite aufl. Berlin and Leipzig, Germany: de Gruyter, pp. 11-23, 1923.Trott, M. The Mathematica GuideBook for Symbolics. New York: Springer-Verlag, 2006., D. (Ed.). "Trigonometric or Circular Functions." §6.1 in CRC Standard Mathematical Tables and Formulae. Boca Raton, FL: CRC Press, pp. 452-460, 1995.

Referenced on Wolfram|Alpha


Cite this as:

Weisstein, Eric W. "Cosine." From MathWorld--A Wolfram Web Resource.

Subject classifications