Secant

Author

Eric W. Weisstein
March 5, 2012

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

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

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

Definition

TrigToExp[Sec[z]]

Plots

<<Utilities`Plot`

Real Axis

V5

disc=Range[-3,3,2]Pi/2;
PlotDiscontinuous[Sec[x],{x,-2Pi,Sequence@@disc,2Pi},
VerticalAsymptotes->disc,
HorizontalAsymptotes->{-1,1},
AxesLabel->TraditionalForm/@{x,Sec[x]},
PlotRange->{Automatic,{-5,5}},
PlotStyle->Red]

V6

Plot[Sec[x],{x,-2π,2π},
PlotStyle->Red,
Exclusions->Range[-3,3,2]Pi/2,
Ticks->{{#,Text[#,Background->White]}&/@Range[-2Pi,2Pi,Pi/2],Automatic},
AxesLabel->{x,Sec[x]},
PlotRange->{Automatic,{-5,5}},
Prolog->{Dashing[.02],Blue,Line[{{-2π,#},{2π,#}}]&/@{-1,1},
Line[{{#,-5},{#,5}}]&/@(Range[-3,3,2]Pi/2)
}]

Complex Plane

ComplexPlot3D[Sec[z],{z,-2Pi,2Pi},PlotPoints->100,ClipFill->None,Mesh->False]//Timing

ComplexContourPlot[Sec[z],{z,-5,5}]//Timing

Bifurcation Plot

BifurcationPlot[Sec[x],{x,-.5},{500,200},{.9,1.04,10^-4}]//Timing

BifurcationPlot[Sec[x],{x,-.5},{500,200},{1.026,1.04,2 10^-5}]//Timing

Series

Series[Sec[z],{z,0,10}]

V5

<<DiscreteMath`RSolve`

SeriesTerm[Sec[z],{z,0,n}]

V7

SeriesCoefficient[Sec[z],{z,0,n}]

SeriesCoefficient[Sec[z],{z,0,n}]//InputForm

TimeConstrained[GeneratingFunction[%,n,x],60]//Timing

Sum[Piecewise[{{(I^n*EulerE[n])/n!,Mod[n,2]==0&&n≥0}},0] x^n,{n,-∞,∞}]//InputForm

Sum[Piecewise[{{(I^n*EulerE[n])/n!,Mod[n,2]==0&&n≥0}},0] x^n,{n,0,∞}]//InputForm

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

Sums

(∑_(n=0)^∞)(x^n) Piecewise[(({{(((i^n) (Subscript[E, n]))/(n!)), n mod 2==0∧n≥0}})),0]==sec(x)

Sum[Piecewise[{{(I^n*EulerE[n])/n!,Mod[n,2]==0&&n≥0}},0] x^n,{n,0,∞}]

(∑_(n=0)^∞)(((x^(2 n)) ((((-1))^n) (Subscript[E, 2 n])))/((2 n)!))=sec(x)

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

(∑_(n=0)^∞)(((x^n) ((((-1))^n) (Subscript[E, 2 n])))/((2 n)!))==sec((Sqrt[x]))

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

Sum[(((((-1))^n)EulerE[2n])/((2n)!))(x^n),{n,0,100}]/.x->1.2

Sec[(Sqrt[1.2])]

Derivative and Integral

Derivative

D[Sec[z],z]

Integral

int=Integrate[Sec[z],z]

FullSimplify[int,-π/2<z<π/2]

Table[Subtract@@{Log[Sec[z]+Tan[z]],int}/.z->Random[Real,{-5,1}π/2],{1000}]//Chop//Union

FullSimplify[Subtract@@{Log[Sec[z]+Tan[z]],int},-5π/2<z<π/2]

FullSimplify[Subtract@@{Log[Tan[(1/4)π+(1/2)z]],Log[Sec[z]+Tan[z]]}]

Prime Numerators

(p=Position[Numerator[Table[(((((-1))^k)EulerE[2k] )/((2k)!)),{k,200}]],_?PrimeQ]//Flatten)//Timing

(p=Position[Numerator[Table[(((((-1))^k)EulerE[2k] )/((2k)!)),{k,300}]],_?PrimeQ]//Flatten)//Timing

Take[Numerator/@Function[k,(((((-1))^k)EulerE[2k] )/((2k)!))]/@p,5]