Tanc Function

Author

Eric W. Weisstein
July 15, 2022

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

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

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

Additional Authors

Portions contributed by
David W. Cantrell
January 3, 2002

Plots

<<Utilities`Plot`
<<Utilities`Typesetting`

PlotDiscontinuous[Tan[x]/x,{x,-10,Sequence@@(Range[-5,5,2]Pi/2),10},
VerticalAsymptotes->Range[-5,5,2]Pi/2,
PlotRange->{-1,1}5,
AxesLabel->TraditionalForm/@{x,tanc[x]}
]

ComplexPlot3D[Tanc[z],{z,-10,10},PlotPoints->150]//Timing

ComplexContourPlot[Tanc[z],{z,-10,10}]//Timing

Special Values

Limit[Tan[x]/x,x->0]

Derivative

D[Tanc[z],z]

Indefinfite Integral

Integrate[Tanc[z],z]

tanc(x)=x

PlotRoots[Tan[x]/x-1,{x,0,20},PlotRange->{-2,2}]

$Version

Plot[Tan[x]/x-1,{x,0,20}]

Plot[Tan[x]/x-1,{x,0,20},Exclusions->(Tan[x]==x)]

Plot[Tan[x]/x-1,{x,0,20},Exclusions->(Tan[x]==x),PlotRange->{-2,1}]

roots=Prepend[Select[x/.PlotRoots[Tan[x]/x-1,{x,0,20}],Abs[Tan[#]-#]<.01&],0]

Reduce[Tan[x]==x&&4<x<5,x,Reals]

Reduce[Tan[x]==x&&4<x<4+1/2,x,Reals]

FindRoot[Tan[x]==x,{x,4.5},WorkingPrecision->20]

Root[{Tan[#]-#&,4.49340945790906417530788108560456176951`20}]

PlotDiscontinuous[Tan[x]/x-1,{x,0,Sequence@@(Range[1,9,2]Pi/2),15},
PlotRange->{-5,5},
AxesLabel->TraditionalForm/@{x,tanc[x]-1},
Epilog->{Red,PointSize[.02],Point[{#,0}]&/@roots},
VerticalAsymptotes->Range[1,9,2]Pi/2]

Series

Contributed by David W. Cantrell (3 Jan 2003)

series=InverseSeries[Series[x+Cot[x],{x,0,7}],q]

Table[q-Normal[series]/.q->(2k+1)Pi/2,{k,5}]//N

Exact forms

Root[{# - Tan[#] &, 4.493409}]

Solve[Tan[x]==x&&0<x<5,x]

Root[{#-Tan[#]&,4.493409}]

(BesselJZero[3/2, 1])

Solve[BesselJ[3/2,x]==0&&0<x<5,x]//FullSimplify

N[BesselJZero[3/2,1],20]

0==BesselJ[3/2,x]//FunctionExpand//FullSimplify

Integer Values

Show[GraphicsArray[{
IntegerListPlot[Table[Tan[n]/n,{n,50}],
DisplayFunction->Identity,
PlotRange->{-3,2},
AxesLabel->TraditionalForm/@{n,tanc[n]}],
IntegerListPlot[Table[Tan[n]/n,{n,100}],PlotRange->.5{-1,1},PlotJoined->True,
PlotStyle->Red,
AxesLabel->TraditionalForm/@{n,tanc[n]},DisplayFunction->Identity]
}]]//Timing

Timing[values=Table[Tan[n]/n,{n,100000}];]

min=Min[values//N];
max=Max[values//N];

Position[values//N,#]&/@{min,max}

{min,max}

Contributed by David W. Cantrell (3 Jan 2003)

$MaxExtraPrecision=400;
min=0;
max=0;
mins={};
maxs={};
i=0;While[i<350,
i++;
n=Numerator[FromContinuedFraction[ContinuedFraction[(π/2),i]]];
v=N[((Tan[n])/n),70];
If[v<min,min=v;mins={mins,{n,N[min,6]}}];
If[v>max,max=v;maxs={maxs,{n,N[max,6]}}];
];
{mins,maxs}=Partition[Flatten[#],2]&/@{mins,maxs}