Sei sulla pagina 1di 66

# Introductions to Cos

## Introduction to the trigonometric functions

General
The six trigonometric functions sine sinHzL, cosine cosHzL, tangent tanHzL, cotangent cotHzL, cosecant cscHzL, and
secant secHzL are well known and among the most frequently used elementary functions. The most popular func-
tions sinHzL, cosHzL, tanHzL, and cotHzL are taught worldwide in high school programs because of their natural appear-
ance in problems involving angle measurement and their wide applications in the quantitative sciences.

## Definitions of trigonometric functions

All trigonometric functions can be defined as simple rational functions of the exponential function of ä z:

ãä z - ã-ä z
sinHzL 

ãä z + ã-ä z
cosHzL 

ä Iãä z - ã-ä z M
2

tanHzL  -
ãä z + ã-ä z
ä Iãä z + ã-ä z M
cotHzL 
ãä z - ã-ä z

cscHzL 
ãä z - ã-ä z
2
secHzL  .
ãä z + ã-ä z

The functions tanHzL, cotHzL, cscHzL, and secHzL can also be defined through the functions sinHzL and cosHzL using the
following formulas:

sinHzL
tanHzL 
cosHzL
cosHzL
cotHzL 
sinHzL
1
cscHzL 
sinHzL
1
secHzL  .
cosHzL

## A quick look at the trigonometric functions

http://functions.wolfram.com 2

Here is a quick look at the graphics for the six trigonometric functions along the real axis.
3
2
1 sinHxL
0 cosHxL
f

-1 tanHxL
-2 cotHxL
-3 secHxL
-3 Π -2 Π -Π 0 Π 2Π 3Π cscHxL
x

Connections within the group of trigonometric functions and with other function groups

## Representations through more general functions

The trigonometric functions are particular cases of more general functions. Among these more general functions,
four different classes of special functions are particularly relevant: Bessel, Jacobi, Mathieu, and hypergeometric
functions.

For example, sinHzL and cosHzL have the following representations through Bessel, Mathieu, and hypergeometric
functions:

J12 HzL I12 Hä zL sinHzL  Y-12 HzL sinHzL  I ä z K12 Hä zL - -ä z K12 H-ä zLN
Πz Πäz Πz ä
sinHzL  2
sinHzL  -ä 2 2

Πz Πäz Πz äz äz
cosHzL  2
cosHzL  2
cosHzL  - 2
cosHzL  2Π

## sinHzL  SeH1, 0, zL cosHzL  CeH1, 0, zL

sinHzL  z 0 F1 J; 2 ; - 4 N cosHzL  0 F1 J; 2 ; - 4 N .
3 z2 1 z2

On the other hand, all trigonometric functions can be represented as degenerate cases of the corresponding doubly
periodic Jacobi elliptic functions when their second parameter is equal to 0 or 1:

## sinHzL  sdHz È 0L  snHz È 0L sinHzL  -ä scHä z È 1L  -ä sdHä z È 1L

cosHzL  cdHz È 0L  cnHz È 0L cosHzL  ncHä z È 1L  ndHä z È 1L
tanHzL  scHz È 0L tanHzL  -ä snHä z È 1L
cotHzL  csHz È 0L cotHzL  ä nsHä z È 1L
cscHzL  dsHz È 0L  nsHz È 0L cscHzL  ä csHä z È 1L  ä dsHä z È 1L
secHzL  dcHz È 0L  ncHz È 0L secHzL  cnHä z È 1L  dnHä z È 1L.

## Representations through related equivalent functions

Each of the six trigonometric functions can be represented through the corresponding hyperbolic function:

## sinHzL  -ä sinhHä zL sinHä zL  ä sinhHzL

cosHzL  coshHä zL cosHä zL  coshHzL
tanHzL  -ä tanhHä zL tanHä zL  ä tanhHzL
cotHzL  ä cothHä zL cotHä zL  -ä cothHzL
cscHzL  ä cschHä zL cscHä zL  -ä cschHzL
secHzL  sechHä zL secHä zL  sechHzL.

## Relations to inverse functions

http://functions.wolfram.com 3

Each of the six trigonometric functions is connected with its corresponding inverse trigonometric function by two
formulas. One is a simple formula, and the other is much more complicated because of the multivalued nature of
the inverse function:

sinIsin HzLM  z sin HsinHzLL  z ; - 2 < ReHzL < ë ReHzL  - 2 í ImHzL ³ 0 ë ReHzL  í ImHzL £ 0
-1 -1 Π Π Π Π

cosIcos HzLM  z cos HcosHzLL  z ; 0 < ReHzL < Π Þ ReHzL  0 ß ImHzL ³ 0 Þ ReHzL  Π ß ImHzL £ 0
2 2
-1 -1

tanItan-1 HzLM  z tan-1 HtanHzLL  z ;  ReHzL¤ < ë ReHzL  - 2 í ImHzL < 0 ë ReHzL  í ImHzL > 0
Π Π Π

cotIcot-1 HzLM  z cot-1 HcotHzLL  z ;  ReHzL¤ < ë ReHzL  - 2 í ImHzL < 0 ë ReHzL  í ImHzL ³ 0
2 2
Π Π Π

cscIcsc-1 HzLM  z csc-1 HcscHzLL  z ;  ReHzL¤ < ë ReHzL  - 2 í ImHzL £ 0 ë ReHzL  í ImHzL ³ 0
2 2
Π Π Π

secIsec-1 HzLM  z sec-1 HsecHzLL  z ; 0 < ReHzL < Π Þ ReHzL  0 ß ImHzL ³ 0 Þ ReHzL  Π ß ImHzL £ 0.
2 2

## Representations through other trigonometric functions

Each of the six trigonometric functions can be represented by any other trigonometric function as a rational func-
tion of that function with linear arguments. For example, the sine function can be representative as a group-defining
function because the other five functions can be expressed as follows:

## cos2 HzL  1 - sin HzL

Π 2
cosHzL  sinI 2 - zM

tan2 HzL 
sin2 HzL
1-sin2 HzL
sinHzL sinHzL
tanHzL  cosHzL
 Π
sinJ -zN
2

cot2 HzL 
1-sin2 HzL
Π
sinJ -zN

sin2 HzL
cosHzL
cotHzL   2

csc HzL 
sinHzL sinHzL

sin2 HzL
1 1
cscHzL  2

sec2 HzL 
sinHzL

1-sin2 HzL
1 1 1
secHzL  cosHzL
 Π .
sinJ -zN
2

## argument z is replaced by p Π  2 + q z with q2  1 ì p Î Z:

All six trigonometric functions can be transformed into any other trigonometric function of this group if the

## sinH-z - 2 ΠL  -sin HzL sinHz - 2 ΠL  sinHzL

N N
3Π 3Π
sinJ-z -  cosHzL sinJz -  cosHzL
sinHz - ΠL  -sin HzL
2 2
sinH-z - ΠL  sinHzL
M  -cos HzL sinIz - 2 M  -cos HzL
Π Π
sinI-z -
sinIz + 2 M  cosHzL
2
Π Π
sinI 2 - zM  cosHzL
sinHz + ΠL  -sin HzL sinHΠ - zL  sinHzL
N  -cos HzL - zN  -cos HzL
3Π 3Π
sinJz + sinJ
sinH2 Π - zL  -sin HzL
2 2
sinHz + 2 ΠL  sinHzL
http://functions.wolfram.com 4

## cosH-z - 2 ΠL  cosHzL cosHz - 2 ΠL  cosHzL

N N  -sin HzL
3Π 3Π
cosJ-z -  sinHzL cosJz -
cosH-z - ΠL  -cosHzL cosHz - ΠL  -cos HzL
2 2

Π Π

## cosIz + 2 M  -sin HzL

Π Π
cosI 2 - zM  sinHzL
cosHz + ΠL  -cos HzL cosHΠ - zL  -cos HzL
N - zN  -sin HzL
3Π 3Π
cosJz + 2
 sinHzL cosJ 2
cosHz + 2 ΠL  cosHzL cosH2 Π - zL  cosHzL

## tanH-z - ΠL  -tan HzL tanHz - ΠL  tanHzL

tanI-z - 2 M  cotHzL tanIz - 2 M  -cot HzL
Π Π

## tanIz + 2 M  -cot HzL

Π Π
tanI 2 - zM  cotHzL
tanHz + ΠL  tanHzL tanHΠ - zL  -tanHzL

## cotH-z - ΠL  -cot HzL cotHz - ΠL  cotHzL

cotI-z - 2 M  tanHzL cotIz - 2 M  -tan HzL
Π Π

cotIz + 2 M  -tanHzL
Π Π
cotI 2 - zM  tanHzL
cotHz + ΠL  cotHzL cotHΠ - zL  -cotHzL

## cscH-z - 2 ΠL  -csc HzL cscHz - 2 ΠL  cscHzL

N N
3Π 3Π
cscJ-z -  secHzL cscJz -  secHzL
cscHz - ΠL  -csc HzL
2 2
cscH-z - ΠL  cscHzL
M cscIz - 2 M  -secHzL
Π Π
cscI-z -  -secHzL
cscIz + 2 M  secHzL
2
Π Π
cscI 2 - zM  secHzL
cscHz + ΠL  -csc HzL cscHΠ - zL  cscHzL
N
3Π 3Π
cscJz +  -secHzL cscJ - zN  -secHzL
cscH2 Π - zL  -csc HzL
2 2
cscHz + 2 ΠL  cscHzL

## secH-z - 2 ΠL  secHzL secHz - 2 ΠL  secHzL

N N  -csc HzL
3Π 3Π
secJ-z -  cscHzL secJz -
secHz - ΠL  -sec HzL
2 2
secH-z - ΠL  -secHzL
secI-z - 2 M  -cscHzL secIz - 2 M  cscHzL
Π Π

secIz + 2 M  -cscHzL
Π Π
secI 2 - zM  cscHzL
secHz + ΠL  -sec HzL secHΠ - zL  -secHzL
N - zN  -csc HzL
3Π 3Π
secJz + 2
 cscHzL secJ 2
secHz + 2 ΠL  secHzL secH2 Π - zL  secHzL.

## The best-known properties and formulas for trigonometric functions

Real values for real arguments

For real values of argument z, the values of all the trigonometric functions are real (or infinity).
http://functions.wolfram.com 5

In the points z = 2 Π n  m ; n Î Z ì m Î Z, the values of trigonometric functions are algebraic. In several cases
they can even be rational numbers or integers (like sinHΠ  2L = 1 or sinHΠ  6L = 1  2). The values of trigonometric
functions can be expressed using only square roots if n Î Z and m is a product of a power of 2 and distinct Fermat
primes {3, 5, 17, 257, …}.

## Simple values at zero

All trigonometric functions have rather simple values for arguments z  0 and z  Π  2:

sinI 2 M  1
Π
sinH0L  0
cosH0L  1 cosI 2 M  0
Π

tanH0L  0 tanI M  ¥ 
Π

 cotI Π M  0
2
cotH0L  ¥
 cscI Π M  1
2
cscH0L  ¥
secH0L  1 secI M  ¥
2
Π .
2

Analyticity

All trigonometric functions are defined for all complex values of z, and they are analytical functions of z over the
whole complex z-plane and do not have branch cuts or branch points. The two functions sinHzL and cosHzL are entire

functions with an essential singular point at z = ¥. All other trigonometric functions are meromorphic functions
with simple poles at points z  Π k ; k Î Z for cscHzL and cotHzL, and at points z  Π  2 + Π k ; k Î Z for secHzL and
tanHzL.

Periodicity

All trigonometric functions are periodic functions with a real period (2 Π or Π):

sinHz + 2 Π kL  sinHzL ; k Î Z
cosHz + 2 Π kL  cosHzL ; k Î Z
sinHzL  sinHz + 2 ΠL

tanHz + Π kL  tanHzL ; k Î Z
cosHzL  cosHz + 2 ΠL

cotHz + Π kL  cotHzL ; k Î Z
tanHzL  tanHz + ΠL

cscHz + 2 Π kL  cscHzL ; k Î Z
cotHzL  cotHz + ΠL

secHz + 2 Π kL  secHzL ; k Î Z.
cscHzL  cscHz + 2 ΠL
secHzL  secHz + 2 ΠL

## Parity and symmetry

All trigonometric functions have parity (either odd or even) and mirror symmetry:

## sinH-zL  -sin HzL sinHz L  sinHzL

cosH-zL  cosHzL cosHz L  cosHzL
tanH-zL  -tan HzL tanHz L  tanHzL
cotH-zL  -cot HzL cotHz L  cotHzL
cscH-zL  -csc HzL cscHz L  cscHzL
secH-zL  secHzL secHz L  secHzL.

## Simple representations of derivatives

http://functions.wolfram.com 6

The derivatives of all trigonometric functions have simple representations that can be expressed through other
trigonometric functions:

##  -sin HzL  sec2 HzL

¶sinHzL ¶cosHzL ¶tanHzL
 cosHzL

 -csc2 HzL
¶z ¶z ¶z
¶cotHzL ¶cscHzL ¶secHzL
¶z ¶z
 -cotHzL cscHzL ¶z
 secHzL tanHzL.

## Simple differential equations

The solutions of the simplest second-order linear ordinary differential equation with constant coefficients can be
represented through sinHzL and cosHzL:

## w¢¢ HzL + wHzL  0 ; wHzL  cosHzL ì wH0L  1 ì w¢ H0L  0

w¢¢ HzL + wHzL  0 ; wHzL  sinHzL ì wH0L  0 ì w¢ H0L  1
w¢¢ HzL + wHzL  0 ; wHzL  c1 cosHzL + c2 sinHzL.

Π
2

Π

2

Π

## w¢ HzL2 - wHzL4 + wHzL2  0 ; wHzL  cscHzL

w¢ HzL2 - wHzL4 + wHzL2  0 ; wHzL  secHzL.

## Applications of trigonometric functions

Triangle theorems

The prime application of the trigonometric functions are triangle theorems. In a triangle, a, b, and c represent the
lengths of the sides opposite to the angles, D the area , R the circumradius, and r the inradius. Then the following
identities hold:

Α+ Β+Γ  Π
sinHΑL sinHΒL sinHΓL
 
a b c

D 2D
sinHΑL sinHΒL sinHΓL  sinHΑL 
2 R2 bc
b2 +c2 -a2 b2 +c2 -a2
cosHΑL  cotHΑL  4D

## sinI 2 M sinJ 2 N sinI 2 M 

2bc
Α Β Γ r r
4R
cosHΑL + cosHΒL + cosHΓL  1 + R
http://functions.wolfram.com 7

a2 + b2 + c2
cotHΑL + cotHΒL + cotHΓL 
4D
tanHΑL + tanHΒL + tanHΓL  tanHΑL tanHΒL tanHΓL

## cos2 HΑL + cos2 HΒL + cos2 HΓL  1 - 2 cosHΑL cosHΒL cosHΓL

cotHΑL cotHΒL + cotHΑL cotHΓL + cotHΒL cotHΓL  1

tanI 2 M tanJ 2 N
Α Β
r

tanI 2 M + tanJ 2 N
 .
Α Β c

## For a right-angle triangle the following relations hold:

; Γ  ; Γ 
a Π b Π
sinHΑL  cosHΑL 

; Γ  ; Γ 
c 2 c 2
a Π b Π
tanHΑL  cotHΑL 
; Γ  ; Γ 
b 2 a 2
c Π c Π
cscHΑL  a 2
secHΑL  b 2
.

Other applications

Because the trigonometric functions appear virtually everywhere in quantitative sciences, it is impossible to list
their numerous applications in teaching, science, engineering, and art.

## Defining the cosine function

The cosine function is one of the oldest mathematical functions. It was first used in ancient Egypt in the book of
Ahmes (c. 2000 B.C.). Much later F. Viète (1590) evaluated some values of cosHn zL, E. Gunter (1636) introduced
the notation "Cosi" and the word "cosinus" (replacing "complementi sinus"), and I. Newton (1658, 1665) found the
series expansion for cosHzL.

The classical definition of the cosine function for real arguments is: "the cosine of an angle Α in a right-angle

valid for 0 < Α < Π  2 when the triangle is nondegenerate. This approach to the cosine can be expanded to arbitrary
triangle is the ratio of the length of the adjacent leg to the length of the hypotenuse." This description of cosHΑL is

real values of Α if consideration is given to the arbitrary point 8x, y< in the x,y-Cartesian plane and cosHΑL is defined
as the ratio x  Ix2 + y2 M , assuming that Α is the value of the angle between the positive direction of the x-axis and
12

## the direction from the origin to the point 8x, y<.

The following formula can also be used as a definition of the cosine function:

H-1Lk z2 k
-¼ â
z2 z4 ¥

H2 kL!
cosHzL  1 - + .
2 24 k=0

## A quick look at the cosine function

http://functions.wolfram.com 8

Here is a graphic of the cosine function f HxL = cosHxL for real values of its argument x.
2

0
f

-1

-2
-3 Π -2 Π -Π 0 Π 2Π 3Π
x

## Representation through more general functions

The function cosHzL is a particular case of more complicated mathematical functions. For example, it is a special
case of the generalized hypergeometric function 0 F1 H; a; wL with the parameter a 
1 z2
2
at w  - 4 :

1 z2
cosHzL  0 F1 ; ;- .
2 4

It is also a particular case of the Bessel function JΝ HzL with the parameter Ν  - 2 , multiplied by
1 Πz
2
:

J 1 HzL.
Πz
cosHzL 
2 -
2

Other Bessel functions can also be expressed through cosine functions for similar values of the parameter:

## I 1 Hä zL cosHzL  - Y 1 HzL cosHzL  ä z K 1 Hä zL + -ä z K 1 H-ä zL .

Πäz Πz 1
cosHzL  2 - 2
2 2 2Π 2 2

Struve functions can also degenerate into the cosine function for similar values of the parameter:

## H 1 HzL cosHzL  1 + L 1 Hä zL.

Πz Πäz
cosHzL  1 - 2 2
2 2

But the function cosHzL is also a degenerate case of the doubly periodic Jacobi elliptic functions when their second
parameter is equal to 0 or 1:

## cosHzL  cdHz È 0L  cnHz È 0L

cosHzL  ncHä z È 1L  ndHä z È 1L.

Finally, the function cosHzL is the particular case of another class of functions—the Mathieu functions:

## cosHzL  CeH1, 0, zL.

http://functions.wolfram.com 9

## Definition of the cosine function for a complex argument

In the complex z-plane, the function cosHzL is defined using the exponential function ãw in the points w = ä z and
w = -ä z through the formula:

ãä z + ã-ä z
cosHzL  .
2

The key role in this definition of cosHzL belongs to the famous Euler formula that connects the exponential, the sine,
and the cosine functions:

ãä z  cosHzL + ä sinHzL.

Changing z to -z, the Euler formula can be converted into the following modification:

## Adding the preceding formulas gives the following result:

ãä z + ã-ä z
cosHzL  .
2

Here are two graphics showing the real and imaginary parts of the cosine function over the complex plane.

10 10
5 5
Re Im
0 0
-5 2 -5 2
-10 1 -10 1
-2 Π 0
y -2 Π 0
y
-Π -1 -Π -1
0 0
-2 -2
x Π x Π
2Π 2Π

## The best-known properties and formulas for the cosine function

Values in points

Students usually learn the following basic table of cosine function values for special points of the circle:

## cosJ 6 N  cosI 4 M  cosJ 3 N 

Π 3 Π 1 Π 1
cosH0L  1 2 2
2

cosI 2 M  0 N N N
Π 2Π 1 3Π 1 5Π 3
cosJ 3
 -2 cosJ 4
- cosJ 6
- 2
2

N N N
7Π 3 5Π 1 4Π 1
cosHΠL  -1 cosJ 6
- 2
cosJ 4
- cosJ 3
 -2
2

N N N N
3Π 5Π 1 7Π 1 11 Π 3
cosJ 2
0 cosJ 3
 2
cosJ 4
 cosJ 6
 2
2
http://functions.wolfram.com 10

## cosH2 ΠL  1 cosHΠ mL  H-1Lm ; m Î Z cosJΠ J 2 + mNN  0 ; m Î Z .

1

General characteristics

## For real values of argument z, the values of cosHzL are real.

In the points z = 2 Π n  m ; n Î Z ì m Î Z, the values of cosHzL are algebraic. In several cases they can even be
rational numbers, 0, or 1. Here are some examples:

## cosH0L  1 cosJ 3 N  cosI 2 M  0.

Π 1 Π
2

M

The values of cosI m
can be expressed using only square roots if n Î Z and m is a product of a power of 2 and
distinct Fermat primes {3, 5, 17, 257, …}.

The function cosHzL is an entire analytical function of z that is defined over the whole complex z-plane and does not

have branch cuts and branch points. It has an essential singular point at z = ¥. It is a periodic function with the
real period 2 Π:

cos Hz + 2 ΠL  cosHzL

## cosH-zL  cosHzL cosHz L  cosHzL .

Differentiation

The derivatives of cosHzL have simple representations using either the sinHzL function or the cosHzL function:

M ; n Î N+ .
¶cosHzL ¶n cosHzL Πn
¶z
 -sinHzL ¶zn
 cosIz + 2

## Ordinary differential equation

The function cosHzL satisfies the simplest possible linear differential equation with constant coefficients:

## w¢¢ HzL + wHzL  0 ; wHzL  cosHzL ì wH0L  1 ì w¢ H0L  0.

The complete solution of this equation can be represented as a linear combination of sinHzL and cosHzL with arbitrary
constant coefficients c1 and c2 :

## w¢ HzL - 1 - HwHzLL2  0 ; wHzL  cosHzL í wH0L  1 í ReHzL <

Π
.
2

Series representation

The function cosHzL has a simple series expansion at the origin that converges in the whole complex z-plane:
http://functions.wolfram.com 11

H-1Lk z2 k
-¼ â
z2 z4 ¥

H2 kL!
cosHzL  1 - + .
2 24 k=0

For real z  x this series can be interpreted as the real part of the series expansion for the exponential function ãä x :

## Hä xL2 Hä xL3 Hä xLk

+ ¼  Re â  ReIãä x M.
z2 z4 ¥
cosHzL  1 - + - ¼  Re 1 + ä x + +
2 24 2! 3! k=0 k!

Product representation

The following famous infinite product representation for cosHzL clearly illustrates that cosHzL  0 at
í k Î Z:
Π
z Πk- 2

cosHzL  ä 1 -
¥ 4 z2

Π2 H2 k - 1L
.
2
k=1

Indefinite integration

Indefinite integrals of expressions involving the cosine function can sometimes be expressed using elementary
functions. However, special functions are frequently needed to express the results even when the integrands have a
simple form (if they can be evaluated in closed form). Here are some examples:

à cosHzL â z  sinHzL

à Ì 2O
z
cosHzL â z  2 EK
2

2-v H1 - v mod 2L
à z cos Ha zL â z 
v
Α-1 v
zΑ v -
Α 2

f v
v-1

## z â HGHΑ, ä a H2 j - vL zL Hä a H2 j - vL zL-Α + GHΑ, ä a Hv - 2 jL zL Hä a Hv - 2 jL zL-Α L ; Α ¹ 0 ì v Î N+ .

2
-v Α
v
2
j
j=0

The last integral cannot be evaluated in closed form using the known classical special functions for arbitrary values
of parameters Α and v.

Definite integration

Definite integrals that contain the cosine function are sometimes simple. For example, the famous Dirichlet type
and Fresnel integrals have the following values:
¥ cos HtL - 1
à â t  -ý
0 t

à cosIt2 M â t 
¥ 1 Π
,
0 2 2

## where ý is the Euler-Mascheroni constant ý  0.577216 ¼.

http://functions.wolfram.com 12

Some special functions can be used to evaluate more complicated definite integrals. For example, elliptic integrals
and gamma functions are needed to express the following integrals:

Π 1

## à z cosHzL â z  cos GHΑL ; 0 < ReHΑL < 1.

Π ΠΑ
Α-1
0 2

Integral transforms

Integral transforms of expressions involving the cosine function may not be classically convergent but can be
interpreted in a generalized functions (distributions) sense. For example, the exponential Fourier transform of the
cosine function cosHzL does not exist in the classical sense but can be expressed using the Dirac delta function.

Ft @cosHtLD HzL 
Π Π
∆Hz - 1L + ∆Hz + 1L.
2 2

Among other integral transforms of the cosine function, the best known are the Fourier cosine and sine transforms,
and the Laplace, Mellin, Hilbert, and Hankel transforms:

Π
2

## Fst @cosHa tLD HzL  - ; a Î R

2 z
Π a2 - z2

Lt @cosHtLD HzL 
z
1 + z2

Πz
2

## Ht;Ν AtΑ-1 cosHtLE HzL 

Π H2 Α + 2 Ν + 1L G Α + Ν + H2 Α + 2 Ν + 1L, H2 Α + 2 Ν + 3L; Ν + 1; z2 ;
1 Ν+
1 1 1 1 1
2-Ν z 2 cos 2 F1
GHΝ + 1L 4 2 4 4

í ReHΑL < 1.
1
ReHΑ + ΝL > -
2

Finite summation

The following finite sums from the cosine can be expressed using the trigonometric functions:

a Hn + 1L
â cosHa kL  cscK O sin cosK O
n a an

k=0
2 2 2

## â H-1Lk cosHa kL  cos Ha + n Ha + ΠLL secK O cos n Ha + ΠL

n 1 a 1

k=0
2 2 2
http://functions.wolfram.com 13

n a 1 an
+ zO
k=0
2 2 2

n 1 a 1

k=0
2 2 2

## z IcosHa nL zn+1 - cosHn a + aL zn - z + cosHaLM

â zk cosHk aL 
n
.
k=1 z2 - 2 cosHaL z + 1

Infinite summation

## â ; 0 < ReHaL < 2 Π

¥ cosHa kL 1 1
2 H1 - cosHaLL
 log
k=1 k 2

H-1Lk-1 cosHa kL
â  logK2 cosK OO ;  ReHaL¤ < Π
¥ a

k=1 k 2

â
¥ cosHa kL
 ãcosHaL cosHsinHaLL
k=0 k!

â
¥ zk cosHa kL
 ãz cosHaL cosHz sinHaLL
k=0 k!

## â zk cosHa kL  ;  z¤ < 1.

¥ 1 - z cosHaL

k=0 z2 - 2 cosHaL z + 1

Finite products

The following finite products from the cosine can be expressed using trigonometric functions:

2 n-1 kΠ

k=1
n

f v
n-1

2 Πk 1-n 1 1
2 2 n
k=1
n 2 2

ä cos ; n Î N+
n-1 Πk 21-n Π
+z  sin n z +
k=1
n cosHzL 2

## ä cos + z  H-2L1-n secHzL cosHn zL - cos ; n Î N+ .

n-1 2Πk nΠ

k=1
n 2

Infinite products

The following infinite product that contains the cosine function can be expressed using the sine function:
http://functions.wolfram.com 14

ä cos
¥ z sinHzL
 .
k=1 2k z

The cosine of a sum can be represented by the rule: "the cosine of a sum is equal to the product of the cosines
minus the product of the sines." A similar rule is valid for the cosine of the difference:

## cosHa + bL  cosHaL cosHbL - sinHaL sinHbL

cosHa - bL  cosHaL cosHbL + sinHaL sinHbL.

Multiple arguments

In the case of multiple arguments z, 2 z, 3 z, …, the function cosHzL can be represented as the finite sum of terms
that include powers of the sine and the cosine:

2

## cosH3 zL  4 cos3 HzL - 3 cosHzL

f v

cosHn zL  â H-1Lk
n

## sin HzL cosn-2 k HzL ; n Î N+ .

2
n 2k
2k
k=0

The function cosHn zL can also be represented as the finite sum including only the cosine of z:

f v
n

## cosHn zL  n â cosn-2 k HzL ; n Î N+ .

2

k=0 k ! Hn - 2 kL!

Half-angle formulas

The cosine of the half-angle can be represented by the following simple formula that is valid in some vertical strips:

## cosK O  ;  ReHzL¤ < Π Þ ReHzL  -Π ß ImHzL ³ 0 Þ ReHzL  Π ß ImHzL £ 0.

z 1 + cosHzL
2 2

To make this formula correct for all complex z, a complicated prefactor is needed:

## cosK O  cHzL ; cHzL  H-1L 1 - 1 + H-1L

z 1 + cosHzL f v f v+f- v
ReHzL+Π ReHzL+Π ReHzL+Π
2Π 2Π 2Π ΘH-ImHzLL ,
2 2

where cHzL contains the unit step, real part, imaginary part, and the floor functions.

## Sums of two direct functions

The sum of two cosine functions can be described by the rule: "the sum of the cosines is equal to two times the
cosine of the half-difference multiplied by the cosine of the half-sum." A similar rule is valid for the difference of
two cosines:
http://functions.wolfram.com 15

a-b a+b
cosHaL + cosHbL  2 cos cos
2 2
a+b a-b
cosHaL - cosHbL  -2 sin sin .
2 2

## Products involving the direct function

The product of two cosine functions and the product of the cosine and sine have the following representations:

1
cosHaL cosHbL 
2

1
cosHaL sinHbL 
2

## Powers of the direct function

The integer powers of the cosine functions can be expanded as finite sums of cosine functions with multiple
arguments. These sums include binomial coefficients:

f v

## cos HzL  2 H1 - n mod 2L + 2

n-1

â cosHHn - 2 kL zL ; n Î N+ .
n 2
n
n -n 1-n
n
2 k
k=0

Inequalities

## The best-known inequalities for cosine functions are the following:

cosHxL¤ £ 1 ; x Î R

sinHxL
cosHxL <
x

## Relations with its inverse function

There are simple relations between the function cosHzL and its inverse function cos-1 HzL:

cos-1 HcosHzLL  z cos-1 HcosHzLL  z ; 0 < ReHzL < Π Þ ReHzL  0 ß ImHzL ³ 0 Þ ReHzL  Π ß ImHzL £ 0.

The second formula is valid at least in the vertical strip 0 < ReHzL < Π. Outside of this strip, a much more compli-
cated relation (that contains the unit step, real part, and the floor functions) holds:

## cos-1 HcosHzLL  1 - H-1L + H-1L 1 + H-1L

Π f- v f- v f v+f- v ReHzL
ReHzL ReHzL ReHzL ReHzL
Π Π Π Π ΘHImHzLL - 1 z + Π - .
2 Π

## Representations through other trigonometric functions

Cosine and sine functions are connected by a very simple formula including the linear function in the argument:

Π
cosHzL  sin -z .
2

Another famous formula, connecting cosHzL and sinHzL, is shown in the well-known Pythagorean theorem:
http://functions.wolfram.com 16

2

## 1 - sin HzL ;  ReHzL¤ < ë ReHzL  - í ImHzL ³ 0 ë ReHzL  í ImHzL £ 0.

2
Π Π Π
cosHzL 
2 2 2

The last restriction on z can be removed, but the formula will get a complicated coefficient cHzL with  cHzL¤  1, that
contains the unit step, real part, imaginary part, and the floor function:

## 1 - sin HzL ; cHzL  H-1L 1 - 1 + H-1L

f - v f - v+f - v
1 ReHzL ReHzL 1 1 ReHzL
2
cosHzL  cHzL 2 Π Π 2 2 Π ΘHImHzLL .

The cosine function can also be represented using other trigonometric functions by the following formulas:

z z

## 1+tan2 J N cot2 J N+1

cosHzL  2
z cosHzL  2
z
2 2

1 1
cosHzL  Π cosHzL  secHzL
.
cscJ -zN
2

## The cosine function has representations using the hyperbolic functions:

Πä
cosHzL  coshHä zL cosHä zL  coshHzL cosHzL  -ä sinhJ 2
- ä zN

## 1+tanh2 J N coth2 J N+1

zä äz
ä 1
cosHzL  cosHzL  cosHzL  - cosHzL 
1-tanh2 J N coth2 J N-1
2 2
zä äz Πä sechHä zL
.
cschJ -ä zN
2 2 2

Applications

The cosine function is used throughout mathematics, the exact sciences, and engineering.

## Introduction to the Trigonometric Functions in Mathematica

Overview
The following shows how the six trigonometric functions are realized in Mathematica. Examples of evaluating
Mathematica functions applied to various numeric and exact expressions that involve the trigonometric functions
or return them are shown. These involve numeric and symbolic calculations and plots.

Notations
Mathematica forms of notations

All six trigonometric functions are represented as built-in functions in Mathematica. Following Mathematica's
general naming convention, the StandardForm function names are simply capitalized versions of the traditional
mathematics names. Here is a list trigFunctions of the six trigonometric functions in StandardForm.

## 8Sin@zD, Cos@zD, Tan@zD, Cot@zD, Sec@zD, Cos@zD<

http://functions.wolfram.com 17

## 8sinHzL, cosHzL, tanHzL, cotHzL, secHzL, cosHzL<

Mathematica also knows the most popular forms of notations for the trigonometric functions that are used in other
programming languages. Here are three examples: CForm, TeXForm, and FortranForm.

## 8Sin H2 * Pi * zL, Cos H2 * Pi * zL, Tan H2 * Pi * zL,

Cot H2 * Pi * zL, Sec H2 * Pi * zL, Cos H2 * Pi * zL<

## 8 \ sin H2 \, \ pi \, zL, \ cos H2 \, \ pi \, zL, \ tan H2 \, \ pi \, zL, \ cot

H2 \, \ pi \, zL, \ sec H2 \, \ pi \, zL, \ cos H2 \, \ pi \, zL<

## 8Sin H2 * Pi * zL, Cos H2 * Pi * zL, Tan H2 * Pi * zL,

Cot H2 * Pi * zL, Sec H2 * Pi * zL, Cos H2 * Pi * zL<

## Evaluation for exact, machine-number, and high-precision arguments

For a simple exact argument, Mathematica returns exact results. For instance, for the argument Π  6, the Sin
function evaluates to 1  2.

SinB F
Π
6
1
2

## 8Sin@zD, Cos@zD, Tan@zD, Cot@zD, Csc@zD, Sec@zD< . z ®

Π
6

: , >
1 3 1 2
, , 3 , 2,
2 2 3 3

For a generic machine-number argument (a numerical argument with a decimal point and not too many digits), a
machine number is returned.

Cos@3.D

-0.989992

## 80.909297, -0.416147, -2.18504, -0.457658, 1.09975, -2.403<

http://functions.wolfram.com 18

The next inputs calculate 100-digit approximations of the six trigonometric functions at z = 1.

N@Tan@1D, 40D

1.557407724654902230506974807458360173087

## Cot@1D  N@ð, 50D &

0.64209261593433070300641998659426562023027811391817

## N@8Sin@zD, Cos@zD, Tan@zD, Cot@zD, Csc@zD, Sec@zD< . z ® 1, 100D

80.841470984807896506652502321630298999622563060798371065672751709991910404391239668
9486397435430526959,
0.540302305868139717400936607442976603732310420617922227670097255381100394774471764
5179518560871830893,
1.557407724654902230506974807458360173087250772381520038383946605698861397151727289
555099965202242984,
0.642092615934330703006419986594265620230278113918171379101162280426276856839164672
1984829197601968047,
1.188395105778121216261599452374551003527829834097962625265253666359184367357190487
913663568030853023,
1.850815717680925617911753241398650193470396655094009298835158277858815411261596705
921841413287306671<

Within a second, it is possible to calculate thousands of digits for the trigonometric functions. The next input
calculates 10000 digits for sinH1L, cosH1L, tanH1L, cotH1L, secH1L, and cscH1L and analyzes the frequency of the occur-
rence of the digit k in the resulting decimal number.

## Map@Function@w, 8First@ðD, Length@ðD< &  Split@Sort@First@RealDigits@wDDDDD,

N@8Sin@zD, Cos@zD, Tan@zD, Cot@zD, Csc@zD, Sec@zD< . z ® 1, 10 000DD

8880, 983<, 81, 1069<, 82, 1019<, 83, 983<, 84, 972<, 85, 994<,
86, 994<, 87, 988<, 88, 988<, 89, 1010<<, 880, 998<, 81, 1034<, 82, 982<,
83, 1015<, 84, 1013<, 85, 963<, 86, 1034<, 87, 966<, 88, 991<, 89, 1004<<,
880, 1024<, 81, 1025<, 82, 1000<, 83, 969<, 84, 1026<, 85, 944<, 86, 999<,
87, 1001<, 88, 1008<, 89, 1004<<, 880, 1006<, 81, 1030<, 82, 986<,
83, 954<, 84, 1003<, 85, 1034<, 86, 999<, 87, 998<, 88, 1009<, 89, 981<<,
880, 1031<, 81, 976<, 82, 1045<, 83, 917<, 84, 1001<, 85, 996<, 86, 964<,
87, 1012<, 88, 982<, 89, 1076<<, 880, 978<, 81, 1034<, 82, 1016<,
83, 974<, 84, 987<, 85, 1067<, 86, 943<, 87, 1006<, 88, 1027<, 89, 968<<<

Here are 50-digit approximations to the six trigonometric functions at the complex argument z = 3 + 5 ä.

## N@Csc@3 + 5 äD, 100D

0.0019019704237010899966700172963208058404592525121712743108017196953928700340468202
96847410109982878354 +
0.013341591397996678721837322466473194390132347157253190972075437462485814431570118
67262664488519840339 ä

## N@8Sin@zD, Cos@zD, Tan@zD, Cot@zD, Csc@zD, Sec@zD< . z ® 3 + 5 ä, 50D

http://functions.wolfram.com 19

810.472508533940392276673322536853503271126419950388-
73.460621695673676366791192505081750407213922814475 ä,
-73.467292212645262467746454594833950830814859165299-
10.471557674805574377394464224329537808548330651734 ä,
-0.000025368676207676032417806136707426288195560702602478+
0.99991282015135380828209263013972954140566020462086 ä,
-0.000025373100044545977383763346789469656754050037355986-
1.0000871868058967743285316881045218577131612831891 ä,
0.0019019704237010899966700172963208058404592525121713+
0.013341591397996678721837322466473194390132347157253 ä,
-0.013340476530549737487361100811100839468470481725038+
0.0019014661516951513089519270013254277867588978133499 ä<

Mathematica always evaluates mathematical functions with machine precision, if the arguments are machine
numbers. In this case, only six digits after the decimal point are shown in the results. The remaining digits are
suppressed, but can be displayed using the function InputForm.

%  InputForm

## {0.9092974268256817, 0.9092974268256817, 0.9092974268256817, 0.9092974268256817,

0.909297426825681695396019865911745`20}

Precision@%%D

16

## Simplification of the argument

Mathematica uses symmetries and periodicities of all the trigonometric functions to simplify expressions. Here are
some examples.

Sin@-zD

-Sin@zD

Sin@z + ΠD

-Sin@zD

Sin@z + 2 ΠD

Sin@zD

Sin@z + 34 ΠD

Sin@zD

## 8-Sin@zD, Cos@zD, -Tan@zD, -Cot@zD, -Csc@zD, Sec@zD<

http://functions.wolfram.com 20

8Sin@z + ΠD, Cos@z + ΠD, Tan@z + ΠD, Cot@z + ΠD, Csc@z + ΠD, Sec@z + ΠD<

## 8-Sin@zD, -Cos@zD, Tan@zD, Cot@zD, -Csc@zD, -Sec@zD<

8Sin@z + 2 ΠD, Cos@z + 2 ΠD, Tan@z + 2 ΠD, Cot@z + 2 ΠD, Csc@z + 2 ΠD, Sec@z + 2 ΠD<

## 8Sin@zD, Cos@zD, Tan@zD, Cot@zD, Csc@zD, Sec@zD<

8Sin@z + 342 ΠD, Cos@z + 342 ΠD, Tan@z + 342 ΠD, Cot@z + 342 ΠD, Csc@z + 342 ΠD, Sec@z + 342 ΠD<

## 8Sin@zD, Cos@zD, Tan@zD, Cot@zD, Csc@zD, Sec@zD<

Mathematica automatically simplifies the composition of the direct and the inverse trigonometric functions into the
argument.

## 8Sin@ArcSin@zDD, Cos@ArcCos@zDD, Tan@ArcTan@zDD,

Cot@ArcCot@zDD, Csc@ArcCsc@zDD, Sec@ArcSec@zDD<

8z, z, z, z, z, z<

Mathematica also automatically simplifies the composition of the direct and any of the inverse trigonometric
functions into algebraic functions of the argument.

## 8Sin@ArcSin@zDD, Sin@ArcCos@zDD, Sin@ArcTan@zDD,

Sin@ArcCot@zDD, Sin@ArcCsc@zDD, Sin@ArcSec@zDD<

:z, >
z 1 1 1
1 - z2 , , , , 1-
z z2
1 + z2 1+ 1
z
z2

## 8Cos@ArcSin@zDD, Cos@ArcCos@zDD, Cos@ArcTan@zDD,

Cos@ArcCot@zDD, Cos@ArcCsc@zDD, Cos@ArcSec@zDD<

: >
1 1 1 1
1 - z2 , z, , , 1- ,
2
z z
1 + z2 1+ 1
z2

## 8Tan@ArcSin@zDD, Tan@ArcCos@zDD, Tan@ArcTan@zDD,

Tan@ArcCot@zDD, Tan@ArcCsc@zDD, Tan@ArcSec@zDD<

:
z 1 - z2 1 1 1
, , z, , , 1- z>
z z z2
1-z 2
1- 1
z
z2

## 8Cot@ArcSin@zDD, Cot@ArcCos@zDD, Cot@ArcTan@zDD,

Cot@ArcCot@zDD, Cot@ArcCsc@zDD, Cot@ArcSec@zDD<

: >
1 - z2 z 1 1 1
, , , z, 1- z,
z z z2
1-z 2
1- 1
z
z2
http://functions.wolfram.com 21

## 8Csc@ArcSin@zDD, Csc@ArcCos@zDD, Csc@ArcTan@zDD,

Csc@ArcCot@zDD, Csc@ArcCsc@zDD, Csc@ArcSec@zDD<

: , >
1 1 1 + z2 1 1
, , 1+ z, z,
z z z2
1-z 2
1- 1
z2

## 8Sec@ArcSin@zDD, Sec@ArcCos@zDD, Sec@ArcTan@zDD,

Sec@ArcCot@zDD, Sec@ArcCsc@zDD, Sec@ArcSec@zDD<

:
1 1 1 1
, , 1 + z2 , 1+ , , z>
z z2
1-z 2
1- 1
z2

In cases where the argument has the structure Π k  2 + z or Π k  2 - z, and Π k  2 + ä z or Π k  2 - ä z with integer k,
trigonometric functions can be automatically transformed into other trigonometric or hyperbolic functions. Here are
some examples.
Π
TanB - zF
2
Cot@zD

Csc@ä zD

-ä Csch@zD

:SinB
Π Π Π Π Π Π
- zF, CosB - zF, TanB - zF, CotB - zF, CscB - zF, SecB - zF>
2 2 2 2 2 2
8Cos@zD, Sin@zD, Cot@zD, Tan@zD, Sec@zD, Csc@zD<

8Sin@ä zD, Cos@ä zD, Tan@ä zD, Cot@ä zD, Csc@ä zD, Sec@ä zD<

## Simplification of simple expressions containing trigonometric functions

Sometimes simple arithmetic operations containing trigonometric functions can automatically produce other
trigonometric functions.

1  Sec@zD

Cos@zD

## 91  Sin@zD, 1  Cos@zD, 1  Tan@zD, 1  Cot@zD, 1  Csc@zD, 1  Sec@zD,

Sin@zD  Cos@zD, Cos@zD  Sin@zD, Sin@zD  Sin@Π  2 - zD, Cos@zD  Sin@zD ^ 2=

8Csc@zD, Sec@zD, Cot@zD, Tan@zD, Sin@zD, Cos@zD, Tan@zD, Cot@zD, Tan@zD, Cot@zD Csc@zD<

## Trigonometric functions arising as special cases from more general functions

http://functions.wolfram.com 22

All trigonometric functions can be treated as particular cases of some more advanced special functions. For exam-
ple, sinHzL and cosHzL are sometimes the results of auto-simplifications from Bessel, Mathieu, Jacobi, hypergeomet-
ric, and Meijer functions (for appropriate values of their parameters).

1
BesselJB , zF
2

2
Π
Sin@zD

MathieuC@1, 0, zD

Cos@zD

JacobiSC@z, 0D

Tan@zD

1
In[14]:=
2

## HypergeometricPFQB8<, : >, - F, MeijerGB88<, 8<<, :: >, 80<>, F>

3 z2 1 z2
2 4 2 4

z2 F
2

: >
Π
Sin@zD SinB z2 Sin@zD
Out[14]= , Sin@zD, Sin@zD, ,
z 2
z Π z

:BesselJB-
1
In[15]:= , zF, MathieuC@1, 0, zD, JacobiCD@z, 0D,
2

## Hypergeometric0F1B , - F, MeijerGB88<, 8<<, :80<, : >>, F>

1 z2 1 z2
2 4 2 4

: z2 F, >
Π
Cos@zD
Cos@zD
Out[15]= , Cos@zD, Cos@zD, CosB
z Π

## Equivalence transformations carried out by specialized Mathematica functions

General remarks
http://functions.wolfram.com 23

Almost everybody prefers using sinHzL  2 instead of cosHΠ  2 - zL sinHΠ  6L. Mathematica automatically transforms

sions can give overly complicated results. Compact expressions like sinH2 zL sinHΠ  16L should not be automatically
the second expression into the first one. The automatic application of transformation rules to mathematical expres-

expanded into the more complicated expression sinHzL cosHzL J2 - I2 + 212 M N . Mathematica has special com-
12 12

mands that produce these types of expansions. Some of them are demonstrated in the next section.

TrigExpand

The function TrigExpand expands out trigonometric and hyperbolic functions. In more detail, it splits up sums
and integer multiples that appear in the arguments of trigonometric and hyperbolic functions, and then expands out
the products of the trigonometric and hyperbolic functions into sums of powers, using the trigonometric and
hyperbolic identities where possible. Here are some examples.

TrigExpand@Sin@x - yDD

## Cos@yD Sin@xD - Cos@xD Sin@yD

Cos@4 zD  TrigExpand

## TrigExpand@88Sin@x + yD, Sin@3 zD<,

8Cos@x + yD, Cos@3 zD<,
8Tan@x + yD, Tan@3 zD<,
8Cot@x + yD, Cot@3 zD<,
8Csc@x + yD, Csc@3 zD<,
8Sec@x + yD, Sec@3 zD<<D

## :9Cos@yD Sin@xD + Cos@xD Sin@yD, 3 Cos@zD2 Sin@zD - Sin@zD3 =,

9Cos@xD Cos@yD - Sin@xD Sin@yD, Cos@zD3 - 3 Cos@zD Sin@zD2 =,

:
Cos@yD Sin@xD Cos@xD Sin@yD
+ ,
Cos@xD Cos@yD - Sin@xD Sin@yD Cos@xD Cos@yD - Sin@xD Sin@yD

>,
3 Cos@zD2 Sin@zD Sin@zD3
-
Cos@zD3 - 3 Cos@zD Sin@zD2 Cos@zD3 - 3 Cos@zD Sin@zD2

:
Cos@xD Cos@yD Sin@xD Sin@yD
- ,
Cos@yD Sin@xD + Cos@xD Sin@yD Cos@yD Sin@xD + Cos@xD Sin@yD

>,
Cos@zD3 3 Cos@zD Sin@zD2
-
3 Cos@zD2 Sin@zD - Sin@zD3 3 Cos@zD2 Sin@zD - Sin@zD3

: >,
1 1
,
Cos@yD Sin@xD + Cos@xD Sin@yD 3 Cos@zD2 Sin@zD - Sin@zD3

: >>
1 1
,
Cos@xD Cos@yD - Sin@xD Sin@yD Cos@zD3 - 3 Cos@zD Sin@zD2

## TableForm@Hð == TrigExpand@ðDL & 

Flatten@88Sin@x + yD, Sin@3 zD<, 8Cos@x + yD, Cos@3 zD<, 8Tan@x + yD, Tan@3 zD<,
8Cot@x + yD, Cot@3 zD<, 8Csc@x + yD, Csc@3 zD<, 8Sec@x + yD, Sec@3 zD<<DD
http://functions.wolfram.com 24

## Sin@x + yD == Cos@yD Sin@xD + Cos@xD Sin@yD

Sin@3 zD == 3 Cos@zD2 Sin@zD - Sin@zD3
Cos@x + yD == Cos@xD Cos@yD - Sin@xD Sin@yD
Cos@3 zD == Cos@zD3 - 3 Cos@zD Sin@zD2
Cos@yD Sin@xD Cos@xD Sin@yD
Tan@x + yD == Cos@xD Cos@yD-Sin@xD Sin@yD
+ Cos@xD Cos@yD-Sin@xD Sin@yD
3 Cos@zD2 Sin@zD Sin@zD3
Tan@3 zD == -
Cos@zD3 -3 Cos@zD Sin@zD2 Cos@zD3 -3 Cos@zD Sin@zD2
Cos@xD Cos@yD Sin@xD Sin@yD
Cot@x + yD == Cos@yD Sin@xD+Cos@xD Sin@yD
- Cos@yD Sin@xD+Cos@xD Sin@yD
Cos@zD3 3 Cos@zD Sin@zD2
Cot@3 zD == -
3 Cos@zD2 Sin@zD-Sin@zD3 3 Cos@zD2 Sin@zD-Sin@zD3
1
Csc@x + yD == Cos@yD Sin@xD+Cos@xD Sin@yD
1
Csc@3 zD ==
3 Cos@zD2 Sin@zD-Sin@zD3
1
Sec@x + yD == Cos@xD Cos@yD-Sin@xD Sin@yD
1
Sec@3 zD ==
Cos@zD3 -3 Cos@zD Sin@zD2

TrigFactor

The function TrigFactor factors trigonometric and hyperbolic functions. In more detail, it splits up sums and
integer multiples that appear in the arguments of trigonometric and hyperbolic functions, and then factors the
resulting polynomials in the trigonometric and hyperbolic functions, using the corresponding identities where
possible. Here are some examples.

TrigFactor@Sin@xD + Cos@yDD

F + SinB F F + SinB F
x y x y x y x y
CosB - - CosB + +
2 2 2 2 2 2 2 2

## -Cos@x + yD Csc@yD Sec@xD

TrigFactor@8Sin@xD + Sin@yD,
Cos@xD + Cos@yD,
Tan@xD + Tan@yD,
Cot@xD + Cot@yD,
Csc@xD + Csc@yD,
Sec@xD + Sec@yD<D

## :2 CosB F SinB F, 2 CosB F CosB

F, Sec@xD Sec@yD Sin@x + yD,
x y x y x y x y
- + - +
2 2 2
2 2 22 2

## CosB - F CscB F CscB F SecB F SecB F SinB + F,

1 x y x y x y x y
Csc@xD Csc@yD Sin@x + yD,

E CosA x2 + E
2 2 2 2 2 2 2 2 2

>
y y
2 CosA x2 -

## ICosA x2 E - SinA x2 EM ICosA x2 E + SinA x2 EM ICosA 2 E - SinA 2 EM ICosA 2 E + SinA 2 EM

2 2
y y y y

TrigReduce
http://functions.wolfram.com 25

The function TrigReduce rewrites products and powers of trigonometric and hyperbolic functions in terms of
those functions with combined arguments. In more detail, it typically yields a linear expression involving trigono-
metric and hyperbolic functions with more complicated arguments. TrigReduce is approximately inverse to
TrigExpand and TrigFactor. Here are some examples.

TrigReduce@Sin@zD ^ 3D

1
4

1
2

## : H1 - Cos@2 zDL, H1 + Cos@2 zDL, >

1 1 1 - Cos@2 zD -1 - Cos@2 zD 2 2
, ,- ,
2 2 1 + Cos@2 zD -1 + Cos@2 zD -1 + Cos@2 zD 1 + Cos@2 zD

## TrigReduce@TrigExpand@88Sin@x + yD, Sin@3 zD, Sin@xD Sin@yD<,

8Cos@x + yD, Cos@3 zD, Cos@xD Cos@yD<,
8Tan@x + yD, Tan@3 zD, Tan@xD Tan@yD<,
8Cot@x + yD, Cot@3 zD, Cot@xD Cot@yD<,
8Csc@x + yD, Csc@3 zD, Csc@xD Csc@yD<,
8Sec@x + yD, Sec@3 zD, Sec@xD Sec@yD<<DD

1
2

1
2

## :Tan@x + yD, Tan@3 zD, >,

Cos@x - yD - Cos@x + yD
Cos@x - yD + Cos@x + yD

## :Cot@x + yD, Cot@3 zD, >,

Cos@x - yD + Cos@x + yD
Cos@x - yD - Cos@x + yD

## :Csc@x + yD, Csc@3 zD, >,

2
Cos@x - yD - Cos@x + yD

## :Sec@x + yD, Sec@3 zD, >>

2
Cos@x - yD + Cos@x + yD

## TrigReduce@TrigFactor@8Sin@xD + Sin@yD, Cos@xD + Cos@yD,

Tan@xD + Tan@yD, Cot@xD + Cot@yD, Csc@xD + Csc@yD, Sec@xD + Sec@yD<DD

2 Sin@x + yD
,

## 2 HSin@xD + Sin@yDL 2 HCos@xD + Cos@yDL

Cos@x - yD + Cos@x + yD

>
2 Sin@x + yD
, ,
Cos@x - yD - Cos@x + yD Cos@x - yD - Cos@x + yD Cos@x - yD + Cos@x + yD

TrigToExp
http://functions.wolfram.com 26

The function TrigToExp converts direct and inverse trigonometric and hyperbolic functions to exponential or
logarithmic functions. It tries, where possible, to give results that do not involve explicit complex numbers. Here
are some examples.

TrigToExp@Sin@2 zDD

1 1
ä ã-2 ä z - ä ã2 ä z
2 2

## Sin@zD Tan@2 zD  TrigToExp

Iã-ä z - ãä z M Iã-2 ä z - ã2 ä z M

2 Iã-2 ä z + ã2 ä z M
-

## TrigToExp@8Sin@zD, Cos@zD, Tan@zD, Cot@zD, Csc@zD, Sec@zD<D

ä Iã-ä z - ãä z M ä Iã-ä z + ãä z M
: >
1 -ä z
1 äz
ã-ä z ãä z 2ä 2
äã - äã , + , ,- ,- ,
-ä z äz -ä z äz -ä z äz -ä z
2 2 2 2 ã +ã ã -ã ã -ã ã + ãä z

ExpToTrig

The function ExpToTrig converts exponentials to trigonometric or hyperbolic functions. It tries, where possible, to
give results that do not involve explicit complex numbers. It is approximately inverse to TrigToExp. Here are
some examples.

ExpToTrigAãä x Β E

Cos@x ΒD + ä Sin@x ΒD

 ExpToTrig
ãä x Α - ãä x Β
ãä x Γ + ãä x ∆
Cos@x ΑD - Cos@x ΒD + ä Sin@x ΑD - ä Sin@x ΒD
Cos@x ΓD + Cos@x ∆D + ä Sin@x ΓD + ä Sin@x ∆D

## 82 Α Cos@x ΒD, Α Cos@x ΒD + Γ Cos@x ΒD - ä Α Sin@x ΒD + ä Γ Sin@x ΒD<

ComplexExpand

The function ComplexExpand expands expressions assuming that all the occurring variables are real. The value
option TargetFunctions is a list of functions from the set {Re, Im, Abs, Arg, Conjugate, Sign}.
ComplexExpand tries to give results in terms of the specified functions. Here are some examples

## ComplexExpand@Sin@x + ä yD Cos@x - ä yDD

http://functions.wolfram.com 27

## ä ICos@xD2 Cosh@yD Sinh@yD + Cosh@yD Sin@xD2 Sinh@yDM

Cos@xD Cosh@yD2 Sin@xD - Cos@xD Sin@xD Sinh@yD2 +

## 4 Cos@xD Cosh@yD2 Sin@xD 4 Cos@xD Sin@xD Sinh@yD2

HCos@2 xD - Cosh@2 yDL HCos@2 xD + Cosh@2 yDL HCos@2 xD - Cosh@2 yDL HCos@2 xD + Cosh@2 yDL
- + +

## 4 Cos@xD2 Cosh@yD Sinh@yD

HCos@2 xD - Cosh@2 yDL HCos@2 xD + Cosh@2 yDL
ä +

## 4 Cosh@yD Sin@xD2 Sinh@yD

HCos@2 xD - Cosh@2 yDL HCos@2 xD + Cosh@2 yDL

In[17]:= li1 = 8Sin@x + ä yD, Cos@x + ä yD, Tan@x + ä yD, Cot@x + ä yD, Csc@x + ä yD, Sec@x + ä yD<

Out[17]= 8Sin@x + ä yD, Cos@x + ä yD, Tan@x + ä yD, Cot@x + ä yD, Csc@x + ä yD, Sec@x + ä yD<

In[18]:= ComplexExpand@li1D

## Out[18]= :Cosh@yD Sin@xD + ä Cos@xD Sinh@yD, Cos@xD Cosh@yD - ä Sin@xD Sinh@yD,

Sin@2 xD ä Sinh@2 yD Sin@2 xD ä Sinh@2 yD
+ ,- + ,
Cos@2 xD + Cosh@2 yD Cos@2 xD + Cosh@2 yD Cos@2 xD - Cosh@2 yD Cos@2 xD - Cosh@2 yD

>
2 Cosh@yD Sin@xD 2 ä Cos@xD Sinh@yD 2 Cos@xD Cosh@yD 2 ä Sin@xD Sinh@yD
- + , +
Cos@2 xD - Cosh@2 yD Cos@2 xD - Cosh@2 yD Cos@2 xD + Cosh@2 yD Cos@2 xD + Cosh@2 yD

## :Cosh@yD Sin@xD, Cos@xD Cosh@yD,

Sin@2 xD
Out[19]= ,
Cos@2 xD + Cosh@2 yD

>
Sin@2 xD 2 Cosh@yD Sin@xD 2 Cos@xD Cosh@yD
- ,- ,
Cos@2 xD - Cosh@2 yD Cos@2 xD - Cosh@2 yD Cos@2 xD + Cosh@2 yD

## :Cos@xD Sinh@yD, -Sin@xD Sinh@yD,

Sinh@2 yD
Out[20]= ,
Cos@2 xD + Cosh@2 yD

>
Sinh@2 yD 2 Cos@xD Sinh@yD 2 Sin@xD Sinh@yD
, ,
Cos@2 xD - Cosh@2 yD Cos@2 xD - Cosh@2 yD Cos@2 xD + Cosh@2 yD

## In[21]:= ComplexExpand@Abs@ðD &  li1, TargetFunctions ® 8Re, Im<D

http://functions.wolfram.com 28

+ ,

+ ,

## HCos@2 xD - Cosh@2 yDL2 HCos@2 xD - Cosh@2 yDL2

+ ,

>
4 Cos@xD2 Cosh@yD2 4 Sin@xD2 Sinh@yD2

+

## In[22]:= %  Simplify@ð, 8x, y< Î RealsD &

:
-Cos@2 xD + Cosh@2 yD Cos@2 xD + Cosh@2 yD Sin@2 xD2 + Sinh@2 yD2
Out[22]= , , ,
2 2 Cos@2 xD + Cosh@2 yD

>
Cos@2 xD + Cosh@2 yD 2 2
- , ,
Cos@2 xD - Cosh@2 yD -Cos@2 xD + Cosh@2 yD Cos@2 xD + Cosh@2 yD

## Out[23]= :ArcTan@Cosh@yD Sin@xD, Cos@xD Sinh@yDD, ArcTan@Cos@xD Cosh@yD, -Sin@xD Sinh@yDD,

F,
Sin@2 xD Sinh@2 yD
ArcTanB ,
Cos@2 xD + Cosh@2 yD Cos@2 xD + Cosh@2 yD

F,
Sin@2 xD Sinh@2 yD
ArcTanB- ,
Cos@2 xD - Cosh@2 yD Cos@2 xD - Cosh@2 yD

F,
2 Cosh@yD Sin@xD 2 Cos@xD Sinh@yD
ArcTanB- ,
Cos@2 xD - Cosh@2 yD Cos@2 xD - Cosh@2 yD

F>
2 Cos@xD Cosh@yD 2 Sin@xD Sinh@yD
ArcTanB ,
Cos@2 xD + Cosh@2 yD Cos@2 xD + Cosh@2 yD

## Out[24]= :Cosh@yD Sin@xD - ä Cos@xD Sinh@yD, Cos@xD Cosh@yD + ä Sin@xD Sinh@yD,

Sin@2 xD - ä Sinh@2 yD Sin@2 xD + ä Sinh@2 yD
,- ,
Cos@2 xD + Cosh@2 yD Cos@2 xD - Cosh@2 yD

>
1 1
,
Cosh@yD Sin@xD - ä Cos@xD Sinh@yD Cos@xD Cosh@yD + ä Sin@xD Sinh@yD

Simplify
http://functions.wolfram.com 29

The function Simplify performs a sequence of algebraic transformations on its argument, and returns the simplest
form it finds. Here are two examples.

SimplifyASin@2 zD  Sin@zDE

2 Cos@zD

## Sin@2 zD  Cos@zD  Simplify

2 Sin@zD

Here is a large collection of trigonometric identities. All are written as one large logical conjunction.

## Simplify@ðD &  Cos@zD2 + Sin@zD == 1 í

2

í Cos@zD2 == í
2 1 - Cos@2 zD 1 + Cos@2 zD
Sin@zD ==
2 2

í Cot@zD2 == í
1 - Cos@2 zD 1 + Cos@2 zD
Tan@zD2 ==
1 + Cos@2 zD 1 - Cos@2 zD
Sin@2 zD  2 Sin@zD Cos@zD í Cos@2 zD  Cos@zD2 - Sin@zD  2 Cos@zD2 - 1 í
2

## F CosB F í Sin@aD - Sin@bD  2 CosB F SinB Fí

a+b a-b a+b a-b
Sin@aD + Sin@bD  2 SinB
2 2 2 2

## F CosB F í Cos@aD - Cos@bD  2 SinB F SinB Fí

a+b a-b a+b b-a
Cos@aD + Cos@bD  2 CosB
2 2 2 2

í Tan@aD - Tan@bD  í
Sin@a + bD Sin@a - bD

SinBz + ArcTanB FF í
B2 B
A Sin@zD + B Cos@zD  A 1+
A2 A

í
Cos@a - bD - Cos@a + bD
2

Cos@a - bD + Cos@a + bD Sin@a + bD + Sin@a - bD
2 2

SinB F  í CosB F  í
z 2 1 - Cos@zD z 2 1 + Cos@zD
2 2 2 2

TanB F  í CotB F 
z 1 - Cos@zD Sin@zD z Sin@zD 1 + Cos@zD
 
2 Sin@zD 1 + Cos@zD 2 1 - Cos@zD Sin@zD

True

The function Simplify has the Assumption option. For example, Mathematica knows that -1 £ sinHxL £ 1 for all
real x, and uses the periodicity of trigonometric functions for the symbolic integer coefficient k of k Π.
http://functions.wolfram.com 30

Simplify@Abs@Sin@xDD £ 1, x Î RealsD

True

True

## Simplify@8Sin@z + 2 k ΠD, Cos@z + 2 k ΠD, Tan@z + k ΠD,

Cot@z + k ΠD, Csc@z + 2 k ΠD, Sec@z + 2 k ΠD<, k Î IntegersD

## SimplifyA9Sin@z + k ΠD  Sin@zD, Cos@z + k ΠD  Cos@zD, Tan@z + k ΠD  Tan@zD,

Cot@z + k ΠD  Cot@zD, Csc@z + k ΠD  Csc@zD, Sec@z + k ΠD  Sec@zD=, k Î IntegersE

## 9H-1Lk , H-1Lk , 1, 1, H-1Lk , H-1Lk =

Mathematica also knows that the composition of inverse and direct trigonometric functions produces the value of
the inner argument under the appropriate restriction. Here are some examples.

## -Π  2 < Re@zD < Π  2D

Simplify@8ArcSin@Sin@zDD, ArcTan@Tan@zDD, ArcCot@Cot@zDD, ArcCsc@Csc@zDD<,

8z, z, z, z<

8z, z<

## FunctionExpand (and Together)

While the trigonometric functions auto-evaluate for simple fractions of Π, for more complicated cases they stay as
trigonometric functions to avoid the build up of large expressions. Using the function FunctionExpand, such
expressions can be transformed into explicit radicals.

F
Π
CosB
32

F
Π
CosB
32

FF
Π
FunctionExpandB CosB
32

1
2+ 2+ 2+ 2
2

F  FunctionExpand
Π
CotB
24
http://functions.wolfram.com 31

3 J2 + 2N
2- 2
1
4
+ 4

3 J2 - 2N +
2+ 2
- 14 4

## :SinB F, CosB F, TanB F, CotB F, CscB F, SecB F>

Π Π Π Π Π Π
16 16 16 16 16 16

## :SinB F, CosB F, TanB F, CotB F, CscB F, SecB F>

Π Π Π Π Π Π
16 16 16 16 16 16

FunctionExpand[%]

:
1 1 2- 2+ 2
2- 2+ 2 , 2+ 2+ 2 , ,
2 2
2+ 2+ 2

>
2+ 2+ 2 2 2
, ,
2- 2+ 2
2- 2+ 2 2+ 2+ 2

## :SinB F, CosB F, TanB F, CotB F, CscB F, SecB F>

Π Π Π Π Π Π
60 60 60 60 60 60

## :SinB F, CosB F, TanB F, CotB F, CscB F, SecB F>

Π Π Π Π Π Π
60 60 60 60 60 60

Together@FunctionExpand@%DD
http://functions.wolfram.com 32

: 3 J5 + 5N ,
1
- 2 - 6 + 10 + 30 + 2 5+ 5 -2
16

3 J5 + 5N ,
1
2 - 6 - 10 + 30 + 2 5+ 5 +2
16

-1 - 3 + 5 + 15 + 2 J5 + 5N - 6 J5 + 5N
,

1- 3 - 5 + 15 + 2 J5 + 5N + 6 J5 + 5N

-1 + 3 + 5 - 15 - 2 J5 + 5N - 6 J5 + 5N
,

1+ 3 - 5 - 15 - 2 J5 + 5N + 6 J5 + 5N

16
,

- 2 - 6 + 10 + 30 + 2 5+ 5 -2 3 J5 + 5N

>
16

2 - 6 - 10 + 30 + 2 5+ 5 +2 3 J5 + 5N

If the denominator contains squares of integers other than 2, the results always contain complex numbers (meaning
that the imaginary number ä = -1 appears unavoidably).

Π Π Π Π Π Π
9 9 9 9 9 9

## :SinB F, CosB F, TanB F, CotB F, CscB F, SecB F>

Π Π Π Π Π Π
9 9 9 9 9 9

FunctionExpand[%] // Together
http://functions.wolfram.com 33

: -ä 223 J-1 - ä 3N
1 13
+
8

13 13 13
223 + 223 ,

1 13 13 13
+ ä 223 -
8

3 J-1 + ä 3N
13
ä 223 ,

13 13 13 13
-J-1 - ä -ä -ä

,
13 13 13 13
+ -

13 13 13 13
+ä -ä

,
13 13 13 13
+ +

13 13
+ 223 +

13 13
+ 223 ,

13 13
+ 223 -

## ä 223 J-1 + ä 3N 3 J-1 + ä 3N >

13 13
- 223

Here the function RootReduce is used to express the previous algebraic numbers as numbered roots of polynomial
equations.

RootReduce@Simplify@%DD

9RootA-3 + 36 ð12 - 96 ð14 + 64 ð16 &, 4E, RootA-1 - 6 ð1 + 8 ð13 &, 3E,
RootA-3 + 27 ð12 - 33 ð14 + ð16 &, 4E, RootA-1 + 33 ð12 - 27 ð14 + 3 ð16 &, 6E,
RootA-64 + 96 ð12 - 36 ð14 + 3 ð16 &, 6E, RootA-8 + 6 ð12 + ð13 &, 3E=

The function FunctionExpand also reduces trigonometric expressions with compound arguments or composi-
tions, including hyperbolic functions, to simpler ones. Here are some examples.

FunctionExpandBCotB -z2 FF

-z Coth@zD
-
z

TanB ä z2 F  FunctionExpand

## H-1L34 -H-1L34 z H-1L34 z TanBH-1L14 zF

-
z
http://functions.wolfram.com 34

## :SinB z2 F, CosB z2 F, TanB z2 F, CotB z2 F, CscB z2 F, SecB z2 F>  FunctionExpand

:
-ä z ä z Sin@zD -ä z ä z Tan@zD
, Cos@zD, ,
z z
-ä z ä z Cot@zD -ä z ä z Csc@zD
, , Sec@zD>
z z

## Applying Simplify to the last expression gives a more compact result.

Simplify@%D

:
z2 Sin@zD z2 Tan@zD z2 Cot@zD z2 Csc@zD
, Cos@zD, , , , Sec@zD>
z z z z

## Sin@2 ArcTan@zDD  FunctionExpand

2z
1 + z2

F  FunctionExpand
ArcCot@zD
CosB
2

-z z
1+
-1-z2

## 8Sin@2 ArcSin@zDD, Cos@2 ArcCos@zDD, Tan@2 ArcTan@zDD,

Cot@2 ArcCot@zDD, Csc@2 ArcCsc@zDD, Sec@2 ArcSec@zDD<  FunctionExpand

:2
H-1 + zL H1 + zL
2z
1-z z 1 + z , -1 + 2 z2 , - ,

>
1 1 1 z2 -ä z äz z z2

H-1 + zL H1 + zL
1+ z - , ,
2 z2 -1 - z2 -1 - z2 2 2 - z2

## :SinB F, CosB F, TanB F,

ArcSin@zD ArcCos@zD ArcTan@zD
2 2 2

## F, CscB F, SecB F>  FunctionExpand

ArcCot@zD ArcCsc@zD ArcSec@zD
CotB
2 2 2
http://functions.wolfram.com 35

:
z 1- 1-z 1+z 1+z z

ä H-ä + zL -ä Hä + zL
, , ,
2 -ä z äz 2 1+

- äz ä

>
2 z
-1 - z2 z 2 -z
z 1+ , ,
H-1+zL H1+zL
-z z -1 - z
1-
-ä z äz

Simplify@%D

: >
z 1- 1 - z2 2 z
1+z z z -1 - z2 z2 2
, , , z+ , ,
2 z 2 2 1+ 1+z 2 -z
z2 -1+z2 1+ 1
1- z
z2

FullSimplify

The function FullSimplify tries a wider range of transformations than Simplify and returns the simplest form
it finds. Here are some examples that contrast the results of applying these functions to the same expressions.

## ä Log@1 + ä zDF  Simplify

1 1
CosB ä Log@1 - ä zD -
2 2

1
CoshB
2

## ä Log@1 + ä zDF  FullSimplify

1 1
CosB ä Log@1 - ä zD -
2 2
1

1 + z2

## CscB-ä LogBä z + 1 - z2 FF, SecB-ä LogBä z + 1 - z2 FF>  Simplify

:z, >
z z-ä 1 - z2 2 äz+ 1 - z2
1 - z2 + ä z 1 - z2 1 - z2 + ä z 1 - z2 1
, , , ,
z 2
äz+ 1-z 2
-ä + ä z + z2
1-z 2
äz +z 2
1-z 2
1+ äz+ 1 - z2

## CscB-ä LogBä z + 1 - z2 FF, SecB-ä LogBä z + 1 - z2 FF>  FullSimplify

http://functions.wolfram.com 36

:z, >
z 1 - z2 1 1
1 - z2 , , , ,
z z
1-z 2
1-z 2

## Operations carried out by specialized Mathematica functions

Series expansions

Calculating the series expansion of trigonometric functions to hundreds of terms can be done in seconds. Here are
some examples.

z3 z5
z- + + O@zD6
6 120

Normal@%D

z3 z5
z- +
6 120

## Series@8Sin@zD, Cos@zD, Tan@zD, Cot@zD, Csc@zD, Sec@zD<, 8z, 0, 3<D

:z -
z3 z2 z3
+ O@zD4 , 1 - + O@zD4 , z + + O@zD4 ,
6 2 3

+ O@zD4 >
1 z z3 1 z 7 z3 z2
- - + O@zD4 , + + + O@zD4 , 1 +
z 3 45 z 6 360 2

## Series@Cot@zD, 8z, 0, 100<D  Timing

:1.442 Second,
1 z z3 2 z5 z7 2 z9 1382 z11
- - - - - - -
z 3 45 945 4725 93 555 638 512 875
4 z13 3617 z15 87 734 z17 349 222 z19
- - - -
18 243 225 162 820 783 125 38 979 295 480 125 1 531 329 465 290 625
310 732 z21 472 728 182 z23 2 631 724 z25
- - -
13 447 856 940 643 125 201 919 571 963 756 521 875 11 094 481 976 030 578 125
13 571 120 588 z27 13 785 346 041 608 z29
- -
564 653 660 170 076 273 671 875 5 660 878 804 669 082 674 070 015 625
7 709 321 041 217 z31 303 257 395 102 z33
- -
31 245 110 285 511 170 603 633 203 125 12 130 454 581 433 748 587 292 890 625
52 630 543 106 106 954 746 z35 616 840 823 966 644 z37
- -
20 777 977 561 866 588 586 487 628 662 044 921 875 2 403 467 618 492 375 776 343 276 883 984 375
522 165 436 992 898 244 102 z39
-
20 080 431 172 289 638 826 798 401 128 390 556 640 625
6 080 390 575 672 283 210 764 z41
-
2 307 789 189 818 960 127 712 594 427 864 667 427 734 375
10 121 188 937 927 645 176 372 z43
-
37 913 679 547 025 773 526 706 908 457 776 679 169 921 875

-
http://functions.wolfram.com 37

## 207 461 256 206 578 143 748 856 z45

-
7 670 102 214 448 301 053 033 358 480 610 212 529 462 890 625
11 218 806 737 995 635 372 498 255 094 z47
-
4 093 648 603 384 274 996 519 698 921 478 879 580 162 286 669 921 875
79 209 152 838 572 743 713 996 404 z49
-
285 258 771 457 546 764 463 363 635 252 374 414 183 254 365 234 375
246 512 528 657 073 833 030 130 766 724 z51
-
8 761 982 491 474 419 367 550 817 114 626 909 562 924 278 968 505 859 375
233 199 709 079 078 899 371 344 990 501 528 z53
-
81 807 125 729 900 063 867 074 959 072 425 603 825 198 823 017 351 806 640 625
1 416 795 959 607 558 144 963 094 708 378 988 z55
-
4 905 352 087 939 496 310 826 487 207 538 302 184 255 342 959 123 162 841 796 875
23 305 824 372 104 839 134 357 731 308 699 592 z57
-
796 392 368 980 577 121 745 974 726 570 063 253 238 310 542 073 919 837 646 484 375
9 721 865 123 870 044 576 322 439 952 638 561 968 331 928 z59
-
3 278 777 586 273 629 598 615 520 165 380 455 583 231 003 564 645 636 125 000 418 914 794 921 875
6 348 689 256 302 894 731 330 601 216 724 328 336 z61
-
21 132 271 510 899 613 925 529 439 369 536 628 424 678 570 233 931 462 891 949 462 890 625
106 783 830 147 866 529 886 385 444 979 142 647 942 017 z63
-

I267 745 458 568 424 664 373 021 714 282 169 516 771 254 382 z65 M 
3 508 062 732 166 890 409 707 514 582 539 928 001 638 766 051 683 792 497 378 070 587 158 203 125

625 - I250 471 004 320 250 327 955 196 022 920 428 000 776 938 z67 M 
86 812 790 293 146 213 360 651 966 604 262 937 105 495 141 563 588 806 888 204 273 501 373 291 015 

- I172 043 582 552 384 800 434 637 321 986 040 823 829 878 646 884 z69 M 
801 528 196 428 242 695 121 010 267 455 843 804 062 822 357 897 831 858 125 102 407 684 326 171 875

982 421 875 - I11 655 909 923 339 888 220 876 554 489 282 134 730 564 976 603 688 520 858 z71 M 
5 433 748 964 547 053 581 149 916 185 708 338 218 048 392 402 830 337 634 114 958 370 880 742 156 

3 633 348 205 269 879 230 856 840 004 304 821 536 968 049 780 112 803 650 817 771 432 558 560 793 

I3 692 153 220 456 342 488 035 683 646 645 690 290 452 790 030 604 z73 M 
458 452 606 201 171 875 -

346 435 546 875 - I5 190 545 015 986 394 254 249 936 008 544 252 611 445 319 542 919 116 z75 M 
11 359 005 221 796 317 918 049 302 062 760 294 302 183 889 391 189 419 445 133 951 612 582 060 536 

157 606 197 452 423 911 112 934 066 120 799 083 442 801 465 302 753 194 801 233 578 624 576 089 

I255 290 071 123 323 586 643 187 098 799 718 199 072 122 692 536 861 835 992 z77 M 
941 806 793 212 890 625 -

76 505 736 228 426 953 173 738 238 352 183 101 801 688 392 812 244 485 181 277 127 930 109 049 138 

I9 207 568 598 958 915 293 871 149 938 038 093 699 588 515 745 502 577 839 313 734 z79 M 
257 655 704 498 291 015 625 -

27 233 582 984 369 795 892 070 228 410 001 578 355 986 013 571 390 071 723 225 259 349 721 067 988 

I163 611 136 505 867 886 519 332 147 296 221 453 678 803 514 884 902 772 183 572 z81 M 
068 852 863 296 604 156 494 140 625 -

4 776 089 171 877 348 057 451 105 924 101 750 653 118 402 745 283 825 543 113 171 217 116 857 704 

I8 098 304 783 741 161 440 924 524 640 446 924 039 959 669 564 792 363 509 124 335 729 908 z83 M 
024 700 607 798 175 811 767 578 125 -

2 333 207 846 470 426 678 843 707 227 616 712 214 909 162 634 745 895 349 325 948 586 531 533 393 
-
http://functions.wolfram.com 38

I8 098 304 783 741 161 440 924 524 640 446 924 039 959 669 564 792 363 509 124 335 729 908 z83 M 
2 333 207 846 470 426 678 843 707 227 616 712 214 909 162 634 745 895 349 325 948 586 531 533 393 

I122 923 650 124 219 284 385 832 157 660 699 813 260 991 755 656 444 452 420 836 648 z85 M 
530 725 143 500 144 033 328 342 437 744 140 625 -

349 538 086 043 843 717 584 559 187 055 386 621 548 470 304 913 596 772 372 737 435 524 697 231 

I476 882 359 517 824 548 362 004 154 188 840 670 307 545 554 753 464 961 562 516 323 845 108z87 M 
069 047 713 981 709 496 784 210 205 078 125 -

13 383 510 964 174 348 021 497 060 628 653 950 829 663 288 548 327 870 152 944 013 988 358 928 114 

I1 886 491 646 433 732 479 814 597 361 998 744 134 040 407 919 471 435 385 970 472 345 164 676 056
528 962 242 087 062 453 152 690 410 614 013 671 875 -

z89 M 
522 532 651 330 971 490 226 753 590 247 329 744 050 384 290 675 644 135 735 656 667 608 610 471 

I450 638 590 680 882 618 431 105 331 665 591 912 924 988 342 163 281 788 877 675 244 114 763 912
400 391 047 234 539 824 350 830 981 313 610 076 904 296 875 -

z91 M 
1 231 931 818 039 911 948 327 467 370 123 161 265 684 460 571 086 659 079 080 437 659 781 065 743 

I415 596 189 473 955 564 121 634 614 268 323 814 113 534 779 643 471 190 276 158 333 713 923 216
269 173 212 919 832 661 978 537 311 246 395 111 083 984 375 -

z93 M 
11 213 200 675 690 943 223 287 032 785 929 540 201 272 600 687 465 377 745 332 153 847 964 679 254 

I423 200 899 194 533 026 195 195 456 219 648 467 346 087 908 778 120 468 301 277 466 840 101 336 
692 602 138 023 498 144 562 090 675 557 613 372 802 734 375 -

## 699 974 518 z95 M 

112 694 926 530 960 148 011 367 752 417 874 063 473 378 698 369 880 587 800 838 274 234 349 237 

I5 543 531 483 502 489 438 698 050 411 951 314 743 456 505 773 755 468 368 087 670 306 121 873 229 
591 647 453 413 782 021 538 312 594 164 677 406 144 702 434 539 794 921 875 -

244 z97 M 
14 569 479 835 935 377 894 165 191 004 250 040 526 616 509 162 234 077 285 176 247 476 968 227 225 

I378 392 151 276 488 501 180 909 732 277 974 887 490 811 366 132 267 744 533 542 784 817 245 581 
810 918 346 966 001 491 701 692 846 112 140 419 483 184 814 453 125 -

## 660 788 990 844 z99 M 

9 815 205 420 757 514 710 108 178 059 369 553 458 327 392 260 750 404 049 930 407 987 933 582 359 
080 767 225 644 716 670 683 512 153 512 547 802 166 033 089 160 919 189 453 125+ O@zD101 >

Mathematica comes with the add-on package DiscreteMath`RSolve` that allows finding the general terms of
series for many functions. After loading this package, and using the package function SeriesTerm, the following
nth term for odd trigonometric functions can be evaluated.

<< DiscreteMath`RSolve`

## SeriesTerm@8Sin@zD, Tan@zD, Cot@zD, Csc@zD, Cos@zD, Sec@zD<, 8z, 0, n<D

http://functions.wolfram.com 39

:
ä-1+n KroneckerDelta@Mod@-1 + n, 2DD UnitStep@-1 + nD
,
Gamma@1 + nD
ä-1+n 21+n I-1 + 21+n M BernoulliB@1 + nD ä än 21+n BernoulliB@1 + nD
H1 + nL ! H1 + nL !
IfBOdd@nD, , 0F, ,

F
>
1
ä än 21+n BernoulliBB1 + n, än KroneckerDelta@Mod@n, 2DD än EulerE@nD
H1 + nL !
2
, ,
Gamma@1 + nD n!

Differentiation

Mathematica can evaluate derivatives of trigonometric functions of an arbitrary positive integer order.

D@Sin@zD, zD

Cos@zD

Cos@zD

## 9-Sin@zD, -Cos@zD, 2 Sec@zD2 Tan@zD, 2 Cot@zD Csc@zD2 ,

Cot@zD2 Csc@zD + Csc@zD3 , Sec@zD3 + Sec@zD Tan@zD2 =

Table@D@8Sin@zD, Cos@zD, Tan@zD, Cot@zD, Csc@zD, Sec@zD<, 8z, n<D, 8n, 4<D

99Cos@zD, -Sin@zD, Sec@zD2 , -Csc@zD2 , -Cot@zD Csc@zD, Sec@zD Tan@zD=, 9-Sin@zD, -Cos@zD,
2 Sec@zD2 Tan@zD, 2 Cot@zD Csc@zD2 , Cot@zD2 Csc@zD + Csc@zD3 , Sec@zD3 + Sec@zD Tan@zD2 =,
9-Cos@zD, Sin@zD, 2 Sec@zD4 + 4 Sec@zD2 Tan@zD2 , -4 Cot@zD2 Csc@zD2 - 2 Csc@zD4 ,
-Cot@zD3 Csc@zD - 5 Cot@zD Csc@zD3 , 5 Sec@zD3 Tan@zD + Sec@zD Tan@zD3 =,
9Sin@zD, Cos@zD, 16 Sec@zD4 Tan@zD + 8 Sec@zD2 Tan@zD3 ,

## 5 Sec@zD5 + 18 Sec@zD3 Tan@zD2 + Sec@zD Tan@zD4 ==

8 Cot@zD3 Csc@zD2 + 16 Cot@zD Csc@zD4 , Cot@zD4 Csc@zD + 18 Cot@zD2 Csc@zD3 + 5 Csc@zD5 ,

Finite summation

Mathematica can calculate finite sums that contain trigonometric functions. Here are two examples.

## CosB F - CosB + a nF CscB F

1 a a a
2 2 2 2

â H-1Lk Sin@a kD
n

k=0
http://functions.wolfram.com 40

## SecB F -SinB F + SinB + a n + n ΠF

1 a a a
2 2 2 2

Infinite summation

Mathematica can calculate infinite sums that contain trigonometric functions. Here are some examples.

â zk Sin@k xD
¥

k=1

ä I-1 + ã2 ä x M z

2 Iãä x - zM I-1 + ãä x zM

â
¥ Sin@k xD

k=1
k!

ä Jãã - ãã N
1 -ä x äx

â
¥ Cos@k xD

k=1
k

## I-LogA1 - ã-ä x E - LogA1 - ãä x EM

1
2

Finite products

Mathematica can calculate some finite symbolic products that contain the trigonometric functions. Here are two
examples.

F, 8k, 1, n - 1<F
Πk
ProductBSinB
n

21-n n

ä CosBz + F
n-1 Πk

k=1
n

n HΠ - 2 zLF
1
-H-1Ln 21-n Sec@zD SinB
2

Infinite products

Mathematica can calculate infinite products that contain trigonometric functions. Here are some examples.

¥
In[2]:=
k=1

ä J-1+ã2 ä x N z

## 2 Jz+ã2 ä x z-ãä x J1+z2 NN

Out[2]= ã
http://functions.wolfram.com 41

ä ExpB F
¥ Cos@k xD
In[3]:=
k=1
k!

J-2+ãã N
1 -ä x äx
+ãã
Out[3]= ã2

Indefinite integration

Mathematica can calculate a huge number of doable indefinite integrals that contain trigonometric functions. Here
are some examples.

à Sin@7 zD â z

1
- Cos@7 zD
7

a a a

## 8Cot@zD, Cot@zDa <, 8Csc@zD, Csc@zDa <, 8Sec@zD, Sec@zDa <= â z

H-1-aL
::-Cos@zD, -Cos@zD Hypergeometric2F1B , , , Cos@zD2 F Sin@zD1+a ISin@zD2 M 2 >,
1 1-a 3 1

2 2 2
Cos@zD2 F Sin@zD
:Sin@zD, - >,
Cos@zD1+a Hypergeometric2F1B 1+a
2
, 1
2
, 3+a
2
,

H1 + aL Sin@zD2

-Tan@zD2 F Tan@zD1+a
:-Log@Cos@zDD, >,
Hypergeometric2F1B 1+a , 1, 1 + 1+a
,
2 2

1+a

-Cot@zD2 F
:Log@Sin@zDD, - >,
Cot@zD1+a Hypergeometric2F1B 1+a
2
, 1, 1 + 1+a
2
,

1+a

## :-LogBCosB FF + LogBSinB FF,

z z
2 2
H-1+aL
, , Cos@zD2 F ISin@zD2 M 2 >,
1 1+a 3 1

2 2 2

## :-LogBCosB F - SinB FF + LogBCosB F + SinB FF,

z z z z
2 2 2 2
Cos@zD2 F Sec@zD-1+a Sin@zD
>>
Hypergeometric2F1B 1-a
2
, 1
2
, 3-a
2
,
-
H1 - aL Sin@zD 2

Definite integration

Mathematica can calculate wide classes of definite integrals that contain trigonometric functions. Here are some
examples.

à
Π2 3
Sin@zD â z
0
http://functions.wolfram.com 42

Π GammaB 23 F

2 GammaB 76 F

à : Sec@zD > â z
Π2
Sin@zD , Cos@zD , Tan@zD , Cot@zD , Csc@zD ,
0

Π GammaA 54 E Π GammaA 54 E
:2 EllipticEB , 2F, 2 EllipticEB , 2F, >
Π Π Π Π 2 2

GammaB 34 F GammaB 34 F
, , ,
4 4 2 2

Π
2 a

## 8Cot@zD, Cot@zDa <, 8Csc@zD, Csc@zDa <, 8Sec@zD, Sec@zDa <= â z

0

F F
::1, >, :1, >,
Π GammaB 1+a Π GammaB 1+a

a GammaA a2 E a GammaA a2 E
2 2

Π Π
2 1 aΠ 2
Π SecB
0 2 2 0

## :à Cot@zD â z, IfBRe@aD < 1, F, à Cot@zDa â zF>,

Π Π
2 1 aΠ 2
Π SecB
0 2 2 0

F F
:à Csc@zD â z, >, :à Sec@zD â z, >>
Π
Π GammaB 12 - a Π
Π GammaB 12 - a

E E
2 2 2 2
a a
0 2 GammaA1 - 2
0 2 GammaA1 - 2

Limit operation

## Mathematica can calculate limits that contain trigonometric functions.

Sin@zD
LimitB + Cos@zD3 , z ® 0F
z
2

1
Tan@xD x2
LimitB , x ® 0F
x

ã13

Solving equations

The next input solves equations that contain trigonometric functions. The message indicates that the multivalued
functions are used to express the result and that some solutions might be absent.

SolveATan@zD2 + 3 SinAz + Pi  6E  4, zE
Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found.
http://functions.wolfram.com 43

## 99z ® ArcCosARootA4 - 40 ð12 + 12 ð13 + 73 ð14 - 60 ð15 + 36 ð16 &, 1EE=,

9z ® -ArcCosARootA4 - 40 ð12 + 12 ð13 + 73 ð14 - 60 ð15 + 36 ð16 &, 2EE=,
9z ® -ArcCosARootA4 - 40 ð12 + 12 ð13 + 73 ð14 - 60 ð15 + 36 ð16 &, 3EE=,
9z ® ArcCosARootA4 - 40 ð12 + 12 ð13 + 73 ð14 - 60 ð15 + 36 ð16 &, 4EE=,
9z ® ArcCosARootA4 - 40 ð12 + 12 ð13 + 73 ð14 - 60 ð15 + 36 ð16 &, 5EE=,
9z ® ArcCosARootA4 - 40 ð12 + 12 ð13 + 73 ð14 - 60 ð15 + 36 ð16 &, 6EE==

## Complete solutions can be obtained by using the function Reduce.

Reduce@Sin@xD  a, xD  TraditionalForm

 InputForm =
C@1D Î Integers && Hx  Pi - ArcSin@aD + 2 * Pi * C@1D ÈÈ x  ArcSin@aD + 2 * Pi * C@1DL

Reduce@Cos@xD  a, xD  TraditionalForm

##  InputForm = C@1D Î Integers && Hx  -ArcCos@aD + 2 * Pi * C@1D ÈÈ x  ArcCos@aD + 2 * Pi * C@1DL

Reduce@Tan@xD  a, xD  TraditionalForm

##  InputForm = C@1D Î Integers && 1 + a ^ 2 ¹ 0 && x  ArcTan@aD + Pi * C@1D

Reduce@Cot@xD  a, xD  TraditionalForm

##  InputForm = C@1D Î Integers && 1 + a ^ 2 ¹ 0 && x  ArcCot@aD + Pi * C@1D

Reduce@Csc@xD  a, xD  TraditionalForm

c1 Î Z í a ¹ 0 í x  -sin + 2 Π c1 + Π ë x  sin
-1
1 -1
1
+ 2 Π c1
a a

Reduce@Sec@xD  a, xD  TraditionalForm

##  InputForm = C@1D Î Integers && a ¹ 0 &&

Hx  -ArcCos@a ^ H-1LD + 2 * Pi * C@1D ÈÈ x  ArcCos@a ^ H-1LD + 2 * Pi * C@1DL

## Solving differential equations

Here are differential equations whose linear-independent solutions are trigonometric functions. The solutions of the
simplest second-order linear ordinary differential equation with constant coefficients can be represented through
sinHzL and cosHzL.

## dsol1 = DSolveA2 w@zD + 3 w¢¢ @zD + wH4L @zD == 0, w@zD, zE

::w@zD ® C@3D Cos@zD + C@1D CosB 2 zF + C@4D Sin@zD + C@2D SinB 2 zF>>

In the last input, the differential equation was solved for wHzL. If the argument is suppressed, the result is returned
as a pure function (in the sense of the Λ-calculus).
http://functions.wolfram.com 44

## dsol2 = DSolveA2 w@zD + 3 w¢¢ @zD + wH4L @zD == 0, w, zE

::w ® FunctionB8z<, C@3D Cos@zD + C@1D CosB 2 zF + C@4D Sin@zD + C@2D SinB 2 zFF>>

The advantage of such a pure function is that it can be used for different arguments, derivatives, and more.

w '@ΖD . dsol1

8w¢ @ΖD<

w '@ΖD . dsol2

## :C@4D Cos@ΖD + 2 C@2D CosB 2 ΖF - C@3D Sin@ΖD - 2 C@1D SinB 2 ΖF>

All trigonometric functions satisfy first-order nonlinear differential equations. In carrying out the algorithm to solve
the nonlinear differential equation, Mathematica has to solve a transcendental equation. In doing so, the generically
multivariate inverse of a function is encountered, and a message is issued that a solution branch is potentially
missed.

## DSolveB:w¢ @zD  1 - w@zD2 , w@0D  0>, w@zD, zF

Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found.

88w@zD ® Sin@zD<<

## DSolveB:w¢ @zD  1 - w@zD2 , w@0D  1>, w@zD, zF

Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found.

88w@zD ® Cos@zD<<

## DSolveA9w '@zD - w@zD2 - 1  0, w@0D  0=, w@zD, zE

Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found.

88w@zD ® Tan@zD<<

## DSolveB:w¢ @zD + w@zD2 + 1  0, wB F  0>, w@zD, zF

Π
2
Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found.

88w@zD ® Cot@zD<<

DSolveB:w¢ @zD  w@zD4 - w@zD2 , 1  w@0D  0>, w@zD, zF  SimplifyAð, 0 < z < Pi  2E &

## Solve::verif : Potential solution 8C@1D ® Indeterminate< Hpossibly

discarded by verifierL should be checked by hand. May require use of limits.

Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found.

## Solve::verif : Potential solution 8C@1D ® Indeterminate< Hpossibly

discarded by verifierL should be checked by hand. May require use of limits.

Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found.
http://functions.wolfram.com 45

## 88w@zD ® -Csc@zD<, 8w@zD ® Csc@zD<<

DSolveB:w¢ @zD  w@zD4 - w@zD2 , 1  wB F  0>, w@zD, zF  SimplifyAð, 0 < z < Pi  2E &
Π
2
Solve::verif : Potential solution 8C@1D ® Indeterminate< Hpossibly
discarded by verifierL should be checked by hand. May require use of limits.

Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found.

## Solve::verif : Potential solution 8C@1D ® Indeterminate< Hpossibly

discarded by verifierL should be checked by hand. May require use of limits.

Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found.

## 88w@zD ® -Sec@zD<, 8w@zD ® Sec@zD<<

Integral transforms

Mathematica supports the main integral transforms like direct and inverse Fourier, Laplace, and Z transforms that
can give results that contain classical or generalized functions. Here are some transforms of trigonometric functions.

LaplaceTransform@Sin@tD, t, sD

1
1 + s2

FourierTransform@Sin@tD, t, sD

Π Π
ä DiracDelta@-1 + sD - ä DiracDelta@1 + sD
2 2

FourierSinTransform@Sin@tD, t, sD

Π Π
DiracDelta@-1 + sD - DiracDelta@1 + sD
2 2

FourierCosTransform@Sin@tD, t, sD

1 1

2 Π H-1 + sL 2 Π H1 + sL
- +

ZTransform@Sin@Π tD, t, sD

Plotting

Mathematica has built-in functions for 2D and 3D graphics. Here are some examples.

## PlotBSinBâ zk F, :z, - >F;

5 2Π 2Π
,
k=0
3 3
http://functions.wolfram.com 46

0.5

-2 -1 1 2

-0.5

-1

## Plot3D@Re@Tan@x + ä yDD, 8x, -Π, Π<, 8y, 0, Π<,

PlotPoints ® 240, PlotRange ® 8-5, 5<,
ClipFill ® None, Mesh ® False, AxesLabel ® 8"x", "y", None<D;

## FF, :x, - >, :y, - >,

1 1 1 1 1
ContourPlotBArgBSecB , ,
x+äy
PlotPoints ® 400, PlotRange ® 8-Π, Π<, FrameLabel ® 8"x", "y", None, None<,
2 2 2 2

## ColorFunction ® Hue, ContourLines ® False, Contours ® 200F;

http://functions.wolfram.com 47

## Introduction to the Cosine Function in Mathematica

Overview
The following shows how the cosine function is realized in Mathematica. Examples of evaluating Mathematica
functions applied to various numeric and exact expressions that involve the cosine function or return it are shown.
These involve numeric and symbolic calculations and plots.

Notations
Mathematica forms of notations

Following Mathematica's general naming convention, function names in StandardForm are just the capitalized
versions of their traditional mathematics names. This shows the cosine function in StandardForm.

Cos@zD

Cos@zD

## This shows the cosine function in TraditionalForm.

cosHzL

Mathematica also knows the most popular forms of notations for the cosine function that are used in other program-
ming languages. Here are three examples: CForm, TeXForm, and FortranForm.

## Automatic evaluations and transformations

http://functions.wolfram.com 48

## For the exact argument z = Π  4, Mathematica returns an exact result.

CosB F
Π
4
1

Cos@zD . z ®
Π
4
1

For a machine-number argument (a numerical argument with a decimal point and not too many digits), a machine
number is also returned.

Cos@5.D

0.283662

Cos@zD . z ® 3.

-0.989992

## The next inputs calculate 100-digit approximations at z = 1 and z = 2.

N@Cos@zD . z ® 1, 100D

0.5403023058681397174009366074429766037323104206179222276700972553811003947744717645
179518560871830893

N@Cos@2D, 100D

-0.416146836547142386997568229500762189766000771075544890755149973781964936124079169
0745317778601691404

## Cos@2D  N@ð, 100D &

-0.416146836547142386997568229500762189766000771075544890755149973781964936124079169
0745317778601691404

Within a second, it is possible to calculate thousands of digits for the cosine function. The next input calculates
10000 digits for cosH1L and analyzes the frequency of the digit k in the resulting decimal number.

## Map@Function@w, 8First@ðD, Length@ðD< &  Split@Sort@First@RealDigits@wDDDDD ,

N@8Cos@zD< . z ® 1, 10 000DD

## 8880, 998<, 81, 1034<, 82, 982<, 83, 1015<,

84, 1013<, 85, 963<, 86, 1034<, 87, 966<, 88, 991<, 89, 1004<<<

## Here is a 50-digit approximation of the cosine function at the complex argument z = 3 + 2 i.

http://functions.wolfram.com 49

## N@Cos@3 + 2 äD, 50D

-3.7245455049153225654739707032559725286749657732153-
0.51182256998738460883446384980187563424555660949074 ä

## 8N@Cos@zD . z ® 3 + 2 ä, 50D, Cos@3 + 2 äD  N@ð, 50D &<

8-3.7245455049153225654739707032559725286749657732153-
0.51182256998738460883446384980187563424555660949074 ä,
-3.7245455049153225654739707032559725286749657732153-
0.51182256998738460883446384980187563424555660949074 ä<

Mathematica automatically evaluates mathematical functions with machine precision, if the arguments of the
function are machine-number elements. In this case, only six digits after the decimal point are shown in the results.
The remaining digits are suppressed, but can be displayed using the function InputForm.

%  InputForm

## {-0.4161468365471424, -0.4161468365471424, -0.4161468365471424, -0.4161468365471424,

-0.416146836547142386997568229500762`20}

## Simplification of the argument

Mathematica knows the symmetry and periodicity of the cosine function. Here are some examples:

Cos@-3D

Cos@3D

8Cos@-zD, Cos@z + ΠD, Cos@z + 2 ΠD, Cos@z + 342 ΠD, Cos@-z + 21 ΠD<

## 8Cos@zD, -Cos@zD, Cos@zD, Cos@zD, -Cos@zD<

Mathematica automatically simplifies the composition of the direct and the inverse cosine functions into its
argument.

Cos@ArcCos@zDD

Mathematica also automatically simplifies the composition of the direct and any of the inverse trigonometric
functions into algebraic functions of the argument.

## In[1]:= 8Cos@ArcSin@zDD, Cos@ArcCos@zDD, Cos@ArcTan@zDD,

Cos@ArcCot@zDD, Cos@ArcCsc@zDD, Cos@ArcSec@zDD<

: >
1 1 1 1
Out[1]= 1 - z2 , z, , , 1- ,
z2 z
1+z 2
1+ 1
z2
http://functions.wolfram.com 50

If the argument has the structure Π k  2 + z or Π k  2 - z, and Π k  2 + ä z or Π k  2 - ä z with integer k, the cosine
function can be automatically transformed into trigonometric or hyperbolic sine or cosine functions.
Π
CosB - 4F
2
Sin@4D

:CosB
Π Π Π Π
- zF, CosB + zF, CosB- - zF, CosB- + zF, Cos@Π - zD, Cos@Π + zD>
2 2 2 2
8Sin@zD, -Sin@zD, -Sin@zD, Sin@zD, -Cos@zD, -Cos@zD<

Cos@ä 5D

Cosh@5D

## :Cos@ä zD, CosB

Π Π
- ä zF, CosB + ä zF, Cos@Π - ä zD, Cos@Π + ä zD>
2 2
8Cosh@zD, ä Sinh@zD, -ä Sinh@zD, -Cosh@zD, -Cosh@zD<

## Simplification of simple expressions containing the cosine function

Sometimes simple arithmetic operations containing the cosine function can automatically produce other trigonomet-
ric functions.

1  Cos@4D

Sec@4D

## 81  Cos@zD, 1  Cos@Π  2 - zD, Cos@Π  2 - zD  Cos@zD,

Cos@zD  Cos@Π  2 - zD, 1  Cos@Π  2 - zD, Cos@Π  2 - zD  Cos@zD ^ 2<

## 8Sec@zD, Csc@zD, Tan@zD, Cot@zD, Csc@zD, Sec@zD Tan@zD<

The cosine function arising as special cases from more general functions

The cosine function can be treated as a particular case of some more general special functions. For example, cosHzL
can appear automatically from Bessel, Mathieu, Jacobi, hypergeometric, and Meijer functions for appropriate
values of their parameters.

:BesselJB-
1
, zF, MathieuC@1, 0, zD, JacobiCD@z, 0D,
2

## Hypergeometric0F1B , - F, MeijerGB88<, 8<<, :80<, : >>, F>

1 z2 1 z2
2 4 2 4

: z2 F, >
Π
Cos@zD
Cos@zD
, Cos@zD, Cos@zD, CosB
z Π

## Equivalence transformations carried out by specialized Mathematica functions

General remarks
http://functions.wolfram.com 51

Almost everybody prefers using cosHzL  2 instead of sinHΠ  2 - zL cosHΠ  3L. Mathematica automatically transforms

sions can give overly complicated results. Compact expressions like cosH2 zL cosHΠ  16L should not be automatically
the second expression into the first one. The automatic application of transformation rules to mathematical expres-

expanded into the more complicated expression Icos2 HzL - 2 M J2 + I2 + 212 M N . Mathematica has special func-
1 12 12

tions that produce such expansions. Some are demonstrated in the next section.

TrigExpand

The function TrigExpand expands out trigonometric and hyperbolic functions. In more detail, it splits up sums
and integer multiples that appear in arguments of trigonometric and hyperbolic functions, and then expands out
products of trigonometric and hyperbolic functions into sums of powers, using trigonometric and hyperbolic
identities where possible. Here are some examples.

TrigExpand@Cos@x - yDD

## Cos@xD Cos@yD + Sin@xD Sin@yD

Cos@4 zD  TrigExpand

## Cos@2 zD2  TrigExpand

1 Cos@zD4 Sin@zD4
+ - 3 Cos@zD2 Sin@zD2 +
2 2 2

## TrigExpand@8Cos@x + y + zD, Cos@3 zD<D

9Cos@xD Cos@yD Cos@zD - Cos@zD Sin@xD Sin@yD - Cos@yD Sin@xD Sin@zD - Cos@xD Sin@yD Sin@zD,
Cos@zD3 - 3 Cos@zD Sin@zD2 =

TrigFactor

The function TrigFactor factors trigonometric and hyperbolic functions. In more detail, it splits up sums and
integer multiples that appear in the arguments of trigonometric and hyperbolic functions, and then factors the
resulting polynomials into trigonometric and hyperbolic functions, using trigonometric and hyperbolic identities
where possible. Here are some examples.

TrigFactor@Cos@xD + Cos@yDD

F CosB F
x y x y
2 CosB - +
2 2 2 2

## Cos@xD + Sin@yD  TrigFactor

F - SinB F F + SinB F
x y x y x y x y
CosB - - CosB + +
2 2 2 2 2 2 2 2

TrigReduce
http://functions.wolfram.com 52

The function TrigReduce rewrites the products and powers of trigonometric and hyperbolic functions in terms of
trigonometric and hyperbolic functions with combined arguments. In more detail, it typically yields a linear
expression involving trigonometric and hyperbolic functions with more complicated arguments. TrigReduce is
approximately inverse to TrigExpand and TrigFactor. Here are some examples.

TrigReduce@Cos@xD Cos@yDD

1
2

1
2

1 1
2 4

1 1
8 16

1
2

## TrigFactor@Cos@xD + Cos@yDD  TrigReduce

Cos@xD + Cos@yD

TrigToExp

The function TrigToExp converts trigonometric and hyperbolic functions to exponentials. It tries, where possible,
to give results that do not involve explicit complex numbers. Here are some examples.

TrigToExp@Cos@zDD

ã-ä z ãä z
+
2 2

## Cos@a zD + Cos@b zD  TrigToExp

1 1 1 1
ã-ä a z + ãä a z + ã-ä b z + ãä b z
2 2 2 2

ExpToTrig

The function ExpToTrig converts exponentials to trigonometric and hyperbolic functions. It is approximately
inverse to TrigToExp. Here are some examples.

ExpToTrig@TrigToExp@Cos@zDDD

Cos@zD
http://functions.wolfram.com 53

## 82 Α Cos@x ΒD, Α Cos@x ΒD + Γ Cos@x ΒD - ä Α Sin@x ΒD + ä Γ Sin@x ΒD<

ComplexExpand

The function ComplexExpand expands expressions assuming that all the variables are real. The value option
TargetFunctions is a list of functions from the set {Re, Im, Abs, Arg, Conjugate, Sign}.
ComplexExpand tries to give results in terms of the functions specified. Here are some examples.

ComplexExpand@Cos@x + ä yDD

2 Cos@xD Cosh@yD

Cos@xD Cosh@yD

-Sin@xD Sinh@yD

## ComplexExpand@Abs@Cos@x + ä yDD, TargetFunctions ® 8Re, Im<D 

Simplify@ð, 8x, y< Î RealsD &

Cos@2 xD + Cosh@2 yD

## ComplexExpand@Arg@Cos@x + ä yDD, TargetFunctions ® 8Re, Im<D 

Simplify@ð, 8x, y< Î RealsD &

## Cos@xD Cosh@yD + ä Sin@xD Sinh@yD

Simplify
http://functions.wolfram.com 54

The function Simplify performs a sequence of algebraic transformations on its argument, and returns the simplest
form it finds. Here are some examples.

## :SimplifyACos@2 zD - Cos@zD2 E, Cos@2 zD + Sin@zD  Simplify>

2

9-Sin@zD2 , Cos@zD2 =

Here is a large collection of trigonometric identities. All are written as one large logical conjunction.

2

í
1 + Cos@2 zD
Cos@zD2 ==

2
2

## F CosB F í Cos@aD - Cos@bD  2 SinB F SinB Fí

a+b a-b a+b b-a
Cos@aD + Cos@bD  2 CosB
2 2 2 2

SinBz + ArcTanB FF í
B2 B
A Sin@zD + B Cos@zD  A 1+
A2 A

í
Cos@a - bD + Cos@a + bD
2

í CosB F 
Sin@a + bD + Sin@a - bD z 2 1 + Cos@zD
2 2 2

True

The function Simplify has the Assumption option. For example, Mathematica knows that -1 £ cosHxL £ 1 for
all real x, and knows about the periodicity of trigonometric functions for the symbolic integer coefficient k of k Π.

Simplify@Abs@Cos@xDD £ 1, x Î RealsD

True

True

## Simplify@8Cos@z + 2 k ΠD, Cos@z + k ΠD  Cos@zD<, k Î IntegersD

9Cos@zD, H-1Lk =
http://functions.wolfram.com 55

Mathematica also knows that the composition of the inverse and direct trigonometric functions produces the value
of the internal argument under the corresponding restriction.

ArcCos@Cos@zDD

ArcCos@Cos@zDD

## FunctionExpand (and Together)

While the cosine function auto-evaluates for simple fractions of Π, for more complicated cases it stays as a cosine
function to avoid the build up of large expressions. Using the function FunctionExpand, the cosine function can
sometimes be transformed into explicit radicals. Here are some examples.

Π Π
16 60

## :CosB F, CosB F>

Π Π
16 60

FunctionExpand[%]

- 18 3 J-1 + 5 N- 1 1
J5 + 5N 1
J-1 + 5 N- 1 3
J5 + 5N
: >
1 4 2 8 4 2
2+ 2+ 2 ,- -
2 2 2

Together@%D

: 3 J5 + 5N >
1 1
2+ 2+ 2 , 2 - 6 - 10 + 30 + 2 5+ 5 +2
2 16

If the denominator contains squares of integers other than 2, the results always contain complex numbers (meaning
that the imaginary number ä = -1 appears unavoidably).

:CosB F>
Π
9

:CosB F>
Π
9

FunctionExpand[%] // Together

: 223 J-1 - ä 3N
1 13
+
8

## 3 J-1 - ä 3N + 223 J-1 + ä 3N 3 J-1 + ä 3N >

13 13 13
ä 223 - ä 223

The function RootReduce allows for writing the last algebraic numbers as roots of polynomial equations.

RootReduce@Simplify@%DD
http://functions.wolfram.com 56

## 9RootA-1 - 6 ð1 + 8 ð13 &, 3E=

The function FunctionExpand also reduces trigonometric expressions with compound arguments or composi-
tions, including inverse trigonometric functions, to simpler ones. Here are some examples.

## :CosB z2 F, CosB F, Cos@3 ArcCos@zDD>  FunctionExpand

ArcCos@zD
2

:Cos@zD, , z3 - 3 z I1 - z2 M>
1+z

Simplify@%D

## :Cos@zD, , z I-3 + 4 z2 M>

1+z

FullSimplify

The function FullSimplify tries a wider range of transformations than Simplify and returns the simplest form
it finds. Here are some examples that contrast the results of applying the functions Simplify and FullSimplify
to the same expressions.

## set1 = :CosB-ä LogBä z + 1 - z2 FF, CosB 1 - z2 FF,

Π
+ ä LogBä z +
2

F- FF,
1 1 1 ä 1 ä
CosB ä Log@1 - ä zD - ä Log@1 + ä zDF, CosB ä LogB1 - ä LogB1 +
2 2 2 z 2 z

## FF, CosB FF>

1 ä Π 1 ä
CosB-ä LogB 1- + + ä LogB 1- +
z 2 z 2 z 2 z

2
2
ä -1 + ä z + 1 - z2
:
1+ äz+ 1-z 2
1 1
,- , CoshB Log@1 - ä zD - Log@1 + ä zDF,
2 2
2 äz+ 1-z 2
2 äz+ 1-z 2

2 2
1 ä
1+ 1- 1
+ ä ä -1 + 1- +

F- FF, >
z z2 z
z2
1 ä 1 ä
CoshB LogB1 - LogB1 + ,-
2 z 2 z
1 ä 1 ä
2 1- + z
2 1- + z
z2 z2

set1  Simplify
http://functions.wolfram.com 57

## : HLog@1 - ä zD - Log@1 + ä zDLF,

1 - z2 + ä z 1 - z2 1
, z, CoshB
2
äz+ 1-z 2

1
-1 + ä 1- z + z2
F - LogB F F, >
1 -ä + z ä+z z2 1
CoshB LogB ,
2 z z z
1
z ä+ 1- z
z2

set1  FullSimplify

: >
1 1 1 1
1 - z2 , z, , , 1- ,
z2 z
1+z 2
1+ 1
z2

## Operations carried out by specialized Mathematica functions

Series expansions

Calculating the series expansion of a cosine function to hundreds of terms can be done in seconds.

z2
1- + O@zD4
2

Normal@%D

z2
1-
2

## :8.53484 ´ 10-16 Second, 1 -

z2 z4 z6 z8 z10
+ - + - +
2 24 720 40 320 3 628 800
z12 z14 z16 z18
- + - +
479 001 600 87 178 291 200 20 922 789 888 000 6 402 373 705 728 000
z20 z22 z24
- + -
2 432 902 008 176 640 000 1 124 000 727 777 607 680 000 620 448 401 733 239 439 360 000
z26 z28
+ -
403 291 461 126 605 635 584 000 000 304 888 344 611 713 860 501 504 000 000
z30 z32
+ -
265 252 859 812 191 058 636 308 480 000 000 263 130 836 933 693 530 167 218 012 160 000 000
z34
+
295 232 799 039 604 140 847 618 609 643 520 000 000
z36
-
371 993 326 789 901 217 467 999 448 150 835 200 000 000

+
http://functions.wolfram.com 58

z38
+
523 022 617 466 601 111 760 007 224 100 074 291 200 000 000
z40
-
815 915 283 247 897 734 345 611 269 596 115 894 272 000 000 000
z42
+
1 405 006 117 752 879 898 543 142 606 244 511 569 936 384 000 000 000
z44
-
2 658 271 574 788 448 768 043 625 811 014 615 890 319 638 528 000 000 000
z46
+
5 502 622 159 812 088 949 850 305 428 800 254 892 961 651 752 960 000 000 000
z48
-
12 413 915 592 536 072 670 862 289 047 373 375 038 521 486 354 677 760 000 000 000
z50
+
30 414 093 201 713 378 043 612 608 166 064 768 844 377 641 568 960 512 000 000 000 000
z52
-
80 658 175 170 943 878 571 660 636 856 403 766 975 289 505 440 883 277 824 000 000 000 000
z54
+

z56 
230 843 697 339 241 380 472 092 742 683 027 581 083 278 564 571 807 941 132 288 000 000 000 000

710 998 587 804 863 451 854 045 647 463 724 949 736 497 978 881 168 458 687 447 040 000 000 000 000

z58 
-

2 350 561 331 282 878 571 829 474 910 515 074 683 828 862 318 181 142 924 420 699 914 240 000 000 

z 
000 000 +
60

## 000 000 000 - z62 

8 320 987 112 741 390 144 276 341 183 223 364 380 754 172 606 361 245 952 449 277 696 409 600 000 

## 000 000 000 000 + z64 

31 469 973 260 387 937 525 653 122 354 950 764 088 012 280 797 258 232 192 163 168 247 821 107 200 

## 230 400 000 000 000 000 - z66 

126 886 932 185 884 164 103 433 389 335 161 480 802 865 516 174 545 192 198 801 894 375 214 704 

## 148 416 000 000 000 000 000 + z68 

544 344 939 077 443 064 003 729 240 247 842 752 644 293 064 388 798 874 532 860 126 869 671 081 

## 712 183 296 000 000 000 000 000 - z70 

2 480 035 542 436 830 599 600 990 418 569 171 581 047 399 201 355 367 672 371 710 738 018 221 445 

789 845 319 680 000 000 000 000 000 + z72 
11 978 571 669 969 891 796 072 783 721 689 098 736 458 938 142 546 425 857 555 362 864 628 009 582 

221 689 274 204 160 000 000 000 000 000 - z74 
61 234 458 376 886 086 861 524 070 385 274 672 740 778 091 784 697 328 983 823 014 963 978 384 987 

700 971 565 459 250 872 320 000 000 000 000 000 + z76 
330 788 544 151 938 641 225 953 028 221 253 782 145 683 251 820 934 971 170 611 926 835 411 235 

495 537 923 117 729 972 224 000 000 000 000 000 000 - z78 
1 885 494 701 666 050 254 987 932 260 861 146 558 230 394 535 379 329 335 672 487 982 961 844 043 

11 324 281 178 206 297 831 457 521 158 732 046 228 731 749 579 488 251 990 048 962 825 668 835 325 
+
http://functions.wolfram.com 59

234 200 766 245 086 213 177 344 000 000 000 000 000 000 + z80 
11 324 281 178 206 297 831 457 521 158 732 046 228 731 749 579 488 251 990 048 962 825 668 835 325 

480 148 842 668 944 867 280 814 080 000 000 000 000 000 000 - z82 
71 569 457 046 263 802 294 811 533 723 186 532 165 584 657 342 365 752 577 109 445 058 227 039 255 

734 899 148 613 007 131 808 479 167 119 360 000 000 000 000 000 000 + z84 
475 364 333 701 284 174 842 138 206 989 404 946 643 813 294 067 993 328 617 160 934 076 743 994 

291 716 864 129 885 722 968 716 753 156 177 920 000 000 000 000 000 000 - z86 
3 314 240 134 565 353 266 999 387 579 130 131 288 000 666 286 242 049 487 118 846 032 383 059 131 

742 450 276 789 464 634 901 319 465 571 660 595 200 000 000 000 000 000 000 + z88 
24 227 095 383 672 732 381 765 523 203 441 259 715 284 870 552 429 381 750 838 764 496 720 162 249 

184 028 199 319 100 141 244 804 501 828 416 633 516 851 200 000 000 000 000 000 000- z90 
185 482 642 257 398 439 114 796 845 645 546 284 380 220 968 949 399 346 684 421 580 986 889 562 

094 065 876 545 992 131 370 884 059 645 617 234 469 978 112 000 000 000 000 000 000 000+ z92 
1 485 715 964 481 761 497 309 522 733 620 825 737 885 569 961 284 688 766 942 216 863 704 985 393 

12 438 414 054 641 307 255 475 324 325 873 553 077 577 991 715 875 414 356 840 239 582 938 137 710 

z94 
983 519 518 443 046 123 837 041 347 353 107 486 982 656 753 664 000 000 000 000 000 000 000-

108 736 615 665 674 308 027 365 285 256 786 601 004 186 803 580 182 872 307 497 374 434 045 199 

000 + z96 
869 417 927 630 229 109 214 583 415 458 560 865 651 202 385 340 530 688 000 000 000 000 000 000 

991 677 934 870 949 689 209 571 401 541 893 801 158 183 648 651 267 795 444 376 054 838 492 222 

## 000 000 - z98 

809 091 499 987 689 476 037 000 748 982 075 094 738 965 754 305 639 874 560 000 000 000 000 000 

9 426 890 448 883 247 745 626 185 743 057 242 473 809 693 764 078 951 663 494 238 777 294 707 070 

## 000 000 000 + z100 

023 223 798 882 976 159 207 729 119 823 605 850 588 608 460 429 412 647 567 360 000 000 000 000 

93 326 215 443 944 152 681 699 238 856 266 700 490 715 968 264 381 621 468 592 963 895 217 599 993 
229 915 608 941 463 976 156 518 286 253 697 920 827 223 758 251 185 210 916 864 000 000 000 000 
000 000 000 000 + O@zD101 >

Mathematica comes with the add-on package DiscreteMath`RSolve` that allows finding the general terms of
the series for many functions. After loading this package, and using the package function SeriesTerm, the follow-
ing nth term of cosHzL can be evaluated.

## In[3]:= SeriesTerm@Cos@zD, 8z, 0, n<D z ^ n

än zn KroneckerDelta@Mod@n, 2DD
Out[3]=
Gamma@1 + nD

## This result can be checked by the following process.

¥
In[4]:= FunctionExpandBâ Evaluate@%DF
n=0

Out[4]= Cos@zD

Differentiation
http://functions.wolfram.com 60

Mathematica can evaluate derivatives of the cosine function of an arbitrary positive integer order.

¶z Cos@zD

-Sin@zD

¶8z,2< Cos@zD

-Cos@zD

## Table@D@Cos@zD, 8z, n<D, 8n, 10<D

8-Sin@zD, -Cos@zD, Sin@zD, Cos@zD, -Sin@zD, -Cos@zD, Sin@zD, Cos@zD, -Sin@zD, -Cos@zD<

Finite summation

Mathematica can calculate finite symbolic sums that contain the cosine function. Here are some examples.

â Cos@a kD
n

k=1

F CscB F SinB + F
an a a an
-1 + CosB
2 2 2 2

â H-1Lk Cos@a kD
n

k=1

F CosB F SecB F
an nΠ a an nΠ a
-1 + CosB + + +
2 2 2 2 2 2

Infinite summation

Mathematica can calculate infinite sums including the cosine function. Here are some examples.

â zk Cos@k xD
¥

k=1

z I1 + ã2 ä x - 2 ãä x zM

2 Iãä x - zM I-1 + ãä x zM
-

â
¥ Cos@k xD

k=1
k!

J-2 + ãã + ãã N
1 -ä x äx

â
¥ Cos@k xD

k=1
k

## I-LogA1 - ã-ä x E - LogA1 - ãä x EM

1
2

Finite products
http://functions.wolfram.com 61

Mathematica can calculate some finite symbolic products that contain the cosine function. Here is an example.

ä CosBz + F
n-1 Πk

k=1
n

n HΠ - 2 zLF
1
-H-1Ln 21-n Sec@zD SinB
2

Indefinite integration

Mathematica can calculate a huge number of doable indefinite integrals that contain the cosine function. Here are
some examples.

à Cos@zD â z

Sin@zD

à Cos@zD â z
a

## Cos@zD1+a Hypergeometric2F1B 1+a

2
, 1
2
, 3+a
2
, Cos@zD2 F Sin@zD
-
H1 + aL Sin@zD2

Definite integration

Mathematica can calculate wide classes of definite integrals that contain the cosine function. Here are some
examples.

à
Π2
Cos@zD â z
0

Π
2 EllipticEB , 2F
4

à
Π
2
Cos@zDa â z
0

Π GammaB 1+a F

a GammaA a2 E
2

Limit operation

Mathematica can calculate limits that contain the cosine function. Here are some examples.

Cos@2 zD - 1
LimitB , z ® 0F
z2
-2
http://functions.wolfram.com 62

CosB z2 F - 1
LimitB , z ® 0F
z2
1
-
2

CosBIz2 M F-1
14

z
1
Out[573]=
2

CosBIz2 M F-1
14

## In[574]:= LimitB , z ® 0, Direction ® -1F

z
1
Out[574]= -
2

Solving equations

The next inputs solve two equations that contain the cosine function. Because of the multivalued nature of the
inverse cosine function, a printed message indicates that only some of the possible solutions are returned.

SolveACos@zD2 + 4 CosAz - Pi  6E  4, zE
Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found.

1 20 1 13 2 13
+ + -
2 3 3 3

1 40 1 13 2 13
- - -
2 3 3 3

F>,
16

1 20 1 13 2 13
3 3
+ 3
+ 3

1 20 1 13 2 13
+ + +
2 3 3 3

## J22 112 - 288 85 N 223 J691 + 9 85 N

1 40 1 13 2 13
- - -
2 3 3 3

F>,
http://functions.wolfram.com 63

F>,
16

1 20 1 13 2 13
3 3
+ 3
+ 3

1 20 1 13 2 13
+ + -
2 3 3 3

1 40 1 13 2 13
- - +
2 3 3 3

F>,
16

1 20 1 13 2 13
3 3
+ 3
+ 3

1 20 1 13 2 13
+ + +
2 3 3 3

1 40 1 13 2 13
- - +
2 3 3 3

F>>
16

## J22 112 - 288 85 N 223 J691 + 9 85 N

1 20 1 13 2 13
3 3
+ 3
+ 3

Solve@Cos@xD  a, xD
Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found.

A complete solution of the previous equation can be obtained using the function Reduce.

Reduce@Cos@xD  a, xD  InputForm

## Solving differential equations

Here are differential equations whose linear independent solutions include the cosine function. The solutions of the
simplest second-order linear ordinary differential equation with constant coefficients can be represented using
sinHzL and cosHzL.
http://functions.wolfram.com 64

## In[9]:= dsol1 = DSolveA2 w@zD + 3 w¢¢ @zD + wH4L @zD == 0, w@zD, zE

Out[9]= ::w@zD ® C@3D Cos@zD + C@1D CosB 2 zF + C@4D Sin@zD + C@2D SinB 2 zF>>

In the last input, the differential equation was solved for wHzL. If the argument is suppressed, the result is returned
as a pure function (in the sense of the Λ-calculus).

## In[10]:= dsol2 = DSolveA2 w@zD + 3 w¢¢ @zD + wH4L @zD == 0, w, zE

Out[10]= ::w ® FunctionB8z<, C@3D Cos@zD + C@1D CosB 2 zF + C@4D Sin@zD + C@2D SinB 2 zFF>>

The advantage of such a pure function is that it can be used for different arguments, derivatives, and more.

## In[12]:= w '@ΖD . dsol2

Out[12]= :C@4D Cos@ΖD + 2 C@2D CosB 2 ΖF - C@3D Sin@ΖD - 2 C@1D SinB 2 ΖF>

In carrying out the algorithm to solve the following nonlinear differential equation, Mathematica has to solve a
transcendental equation. In doing so, the generically multivariate inverse of a function is encountered, and a
message is issued that a solution branch is potentially missed.

## In[13]:= DSolveB:w¢ @zD == 1 - w@zD2 , w@0D  1>, w@zD, zF

Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found.

## Out[13]= 88w@zD ® Cos@zD<<

Integral transforms

Mathematica supports the main integral transforms like direct and inverse Fourier, Laplace, and Z transforms that
can give results that contain classical or generalized functions.

LaplaceTransform@Cos@tD, t, sD
s
1 + s2

FourierTransform@Cos@tD, t, sD

Π Π
DiracDelta@-1 + sD + DiracDelta@1 + sD
2 2

FourierSinTransform@Cos@tD, t, sD
http://functions.wolfram.com 65

1 1

2 Π H-1 + sL 2 Π H1 + sL
+

FourierCosTransform@Cos@tD, t, sD

Π Π
DiracDelta@-1 + sD + DiracDelta@1 + sD
2 2

ZTransform@Cos@Π tD, t, sD
s
1+s

Plotting

Mathematica has built-in functions for 2D and 3D graphics. Here are some examples.

5 2Π 2Π
,
k=0
3 3

## Plot3D@Re@Cos@x + ä yDD, 8x, -Π, Π<, 8y, 0, Π<,

PlotPoints ® 240, PlotRange ® 8-5, 5<,
ClipFill ® None, Mesh ® False, AxesLabel ® 8"x", "y", None<D;

## FF, :x, - >, :y, - >,

1 1 1 1 1
ContourPlotBArgBCosB , ,
x+äy
PlotPoints ® 400, PlotRange ® 8-Π, Π<, FrameLabel ® 8"x", "y", None, None<,
2 2 2 2

## ColorFunction ® Hue, ContourLines ® False, Contours ® 200F;

http://functions.wolfram.com 66

This document was downloaded from functions.wolfram.com, a comprehensive online compendium of formulas
involving the special functions of mathematics. For a key to the notations used here, see
http://functions.wolfram.com/Notations/.