Cosine

Author

Eric W. Weisstein
August 23, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/SpecialFunctions/Cosine.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Cosine.html.

©2008 Wolfram Research, Inc. except for portions noted otherwise

Definition

FactorTerms[TrigToExp[Cos[z]]]

Plots

<<Utilities`Plot`

Real Axis

PlotDiscontinuous[Cos[x],{x,-2π,2π},
AxesLabel->TraditionalForm/@{x,Cos[x]},
HorizontalAsymptotes->{-1,1},Ticks->{{#,TraditionalForm[#]}&/@{-2π,-π,0,π,2π},{#,TraditionalForm[#]}&/@{-1,-1/2,0,1/2,1}}
]

Re/Im

ComplexPlot3D[Cos[z],{z,-2π,2π}]//Timing

Complex Contour

ComplexContourPlot[Cos[z],{z,-2π,2π}]

Properties

Roots

v4.2

Solve[Cos[x]==0,x]

v5.0

Reduce[Cos[x]==0&&x∈Reals,x]

Fixed Point

x0=FixedPoint[Cos,.5]

Plot[{x,Cos[x]},{x,-2π,2π},Epilog->{Red,PointSize[.03],Point[{x0,x0}],{Dashing[{.01,.01}],Line[{{0,x0},{x0,x0},{x0,0}}]}}]

Plot[{Cos[x],x},{x,-5,5}]

V6

Reduce[Cos[x]==x,x,Reals]

Reduce[Cos[x]==x&&x>0,x,Reals]

V7

Reduce[Cos[x]==x,x,Reals]

Reduce[Cos[x]==x&&x>0,x,Reals]

Reduce[Cos[x]==x&&0<x<10,x,Reals]

Derivatives and Integrals

Derivative

Cos'[x]

Integral

Integrate[Cos[x],x]

Sums

(∑_(n=0)^N)cos(n x)==csc((x/2)) sin(((N x)/2)+(x/2)) cos(((N x)/2))

v4.2

Sum[Cos[n x],{n,0,N}]

FullSimplify[(1/2) Csc[(x/2)] (Sin[(x/2)]+Sin[(x/2)+N x])-Cos[((N x)/2)] Csc[(x/2)] Sin[(x/2)+((N x)/2)]]

v5.0

Sum[Exp[I n x],{n,0,N}]

FullSimplify[Sum[Cos[n x],{n,0,N}]]

FullSimplify[ExpToTrig[Sum[Cos[k x]^2,{k,0,N}]]]

V7

Sum[Cos[n x],{n,0,N}]

FullSimplify[%]

cos(n θ)==(∑_(k=0)^n)(({{n}, {k}})) (cos^k)(x) (sin^(n-k))(x) cos((1/2) (n-k) π)

V6

Sum[Binomial[n,k]Cos[x]^k Sin[x]^(n-k)Cos[(n-k)Pi/2],{k,0,n}]

FullSimplify[%,n∈Integers]

V7

Sum[Binomial[n,k]Cos[x]^k Sin[x]^(n-k)Cos[(n-k)Pi/2],{k,0,n}]

FullSimplify[%,n∈Integers]

(∑_(n=0)^∞)(((((-1))^n) (x^(2 n)))/((2 n)!))==cos(x)

Sum[(((((-1))^n)(x^(2n)))/((2n)!)),{n,0,∞}]

(∑_(n=0)^∞)((((i^n) ((((-1))^n)+1)) (x^n))/(2 n!))==cos(x)

Sum[(((I^n) (1+(((-1))^n)))/(2 n!))(x^n),{n,0,∞}]

(∑_(n=0)^∞)(p^n) cos(n x)==((1-p cos(x))/((p^2)-2 p cos(x)+1))

Sum[p^n Cos[n x],{n,0,∞}]

(∑_(k=0)^N)(cos^2)(k x)==(1/4) (csc(x) sin(2 N x+x)+2 N+3)

Sum[Cos[k x]^2,{k,0,N}]

(∑_(k=0)^∞)((sin(a (2 k+1)))/(((2 k+1))^n))==(((((-1))^((n-1)/2)) (π^n) (Subscript[E, n-1])((a/π)))/(4 (n-1)!))

Sum[((Cos[(2k+1)a])/((2k+1)^n)),{k,0,∞}]//InputForm

Sum[Cos[a*(1 + 2*k)]/(1 + 2*k)^n, {k, 0, Infinity},Assumptions->Mod[n,2]==0]//InputForm

Subtract@@@Table[{(2^(-1-n)*(LerchPhi[E^((-2*I)*a),n,1/2]+E^((2*I)*a)*LerchPhi[E^((2*I)*a),n,1/2]))/E^(I*a),((((-1))^(n/2))/(4(n-1)!))(π^n)EulerE[n-1,a/Pi]}/.{a->RandomComplex[],n->(2RandomInteger[{1,10}])},{100}]//Chop//Union

Table[{Sum[((Cos[(2k+1)a])/((2k+1)^n)),{k,0,∞}],((((-1))^(n/2))/(4(n-1)!))(π^n)EulerE[n-1,a/Pi]},{n,1,5,2}]//FullSimplify//Column

FunctionExpand[%]//FullSimplify

n==2

FullSimplify[(1/2) I (ArcTanh[(E^(-I a))]-ArcTanh[(E^(I a))])]

FullSimplify[(1/2) I (ArcTanh[(E^(-I a))]-ArcTanh[(E^(I a))])-π/4]

Subtract@@@Table[{Pi/4,(1/2) I (ArcTanh[(E^(-I a))]-ArcTanh[(E^(I a))])}/.a->RandomComplex[],{100}]//Chop//Union

n == 3

FullSimplify[(1/16) I (E^(-I a)) (LerchPhi[(E^(-2 I a)),3,(1/2)]-(E^(2 I a)) LerchPhi[(E^(2 I a)),3,(1/2)])]

Subtract@@@Table[{(1/16) I (E^(-I a)) (LerchPhi[(E^(-2 I a)),3,(1/2)]-(E^(2 I a)) LerchPhi[(E^(2 I a)),3,(1/2)]),(1/8) a π (-a+π)}/.a->RandomComplex[],{100}]//Chop//Union

n == 5

FullSimplify[(1/64) I (E^(-I a)) (LerchPhi[(E^(-2 I a)),5,(1/2)]-(E^(2 I a)) LerchPhi[(E^(2 I a)),5,(1/2)])]

Subtract@@@Table[{(1/64) I (E^(-I a)) (LerchPhi[(E^(-2 I a)),5,(1/2)]-(E^(2 I a)) LerchPhi[(E^(2 I a)),5,(1/2)]),(1/96) a π ((a^3)-2 (a^2) π+(π^3))}/.a->RandomComplex[],{100}]//Chop//Union

Series

Series[Cos[x],{x,0,10}]

SeriesCoefficient[Cos[x],{x,0,n}]

GeneratingFunction[(((I^n) (1+(((-1))^n)))/(2 n!)),n,x]

FullSimplify[%]

Products

(∏_n^∞)(1-((4 (x^2))/((π^2) (((2 n-1))^2))))==cos(x)

Product[1-((4(x^2))/((π^2)(((2n-1))^2))),{n,∞}]

Approximations

Hardy

Hardy[x_]:=1-x^2/(x+(1-x)Sqrt[(2-x)/3])

FullSimplify[Hardy[x]]

V5

Plot[Cos[x]-Hardy[x/(Pi/2)],{x,0,Pi/2},PlotStyle->Red]

V6

Plot[Cos[π x/2]-Hardy[x],{x,0,1},PlotStyle->Red,AxesLabel->{x,Cos[x π/2]-H[x]}]

Multiple-Angle Formulas

cos(n θ)=2 cos(θ) cos((n-1) θ)-cos((n-2) θ)

FullSimplify[2 Cos[θ]Cos[(n-1)θ]-Cos[(n-2)θ]]

{#,FullSimplify[#]}&[2 Cos[θ]Cos[(n-1)θ]-Cos[(n-2)θ]/.n->2]

Integrals

(∫_0^∞)cos((x^n))dx==cos((π/(2 n))) Γ(1+(1/n))

Integrate[Cos[(x^n)],{x,0,∞}]//FullSimplify

FullSimplify[Gamma[1+(1/n)] Cos[(π/(2 n))]-((1/n))! Cos[(π/(2 n))]]