OFFSET
1,1
COMMENTS
Let T be the branch of the graph of y = tan x that passes through (Pi,0). There is a unique point (u,v) on T that is closer to (0,0) than any other point on T. Let d = distance between (u,v) and(0,0). The first code in the Mathematica section gives
u = 2.319805307509200010738867057136510870483647988277... ;
v = -1.07556133564118881053529612226074179471679754375... ;
d = 2.557015614241358526013663541906771379699989089781... .
The second code shows (u,v) as the intersection of T and the circle centered at (0,0) with radius d.
The third code shows minimal distance-to-origin points on 16 branches of the tangent function.
FORMULA
u = - sin u sec^3 u.
v = tan u.
d = sqrt(u^2 + v^2).
EXAMPLE
minimal distance = 2.557015614241358526013663541906771379699989089781...
MATHEMATICA
(* This code computes (x, y) coordinates and the minimal distance. *)
x = x /. FindRoot[FullSimplify[D[Sqrt[x^2 + Tan[x]^2], x]] == 0, {x, 2},
WorkingPrecision -> 150]
y = Tan[x]
d = Sqrt[x^2 + Tan[x]^2]
RealDigits[x][[1]]
RealDigits[y][[1]]
RealDigits[d][[1]]
(* Peter J. C. Moses, May 04 2020 *)
(* This code shows the two points on the graph of y = tan x and on a circle whose radius is the minimal distance. *)
g1 = Plot[Tan[x], {x, -2 \[Pi], 2 \[Pi]}, AspectRatio -> 1];
g2 = Graphics[Circle[{0, 0}, Sqrt[Tan[#]^2 + #^2] &[x /. FindRoot[
FullSimplify[D[Sqrt[x^2 + Tan[x]^2], x]] == 0, {x, 2},
WorkingPrecision -> 30]]]];
Show[g1, g2]
(* Peter J. C. Moses, May 04 2020 *)
* This code shows minimal distance points on 16 branches of the tangent function. *)
max = 25;
ptX = Table[x /. FindRoot[# == 0, {x, nn}, WorkingPrecision -> 10], {nn, 2,
max, Pi}] &[FullSimplify[D[Sqrt[x^2 + Tan[x]^2], x]]];
Show[Plot[Tan[x], {x, -#, #}, PlotRange -> {-#, #}] &[max],
Map[Graphics[{Red, Circle[{0, 0}, Sqrt[Tan[#]^2 + #^2]]}] &, #],
Map[Graphics[{PointSize[Large], Point[-{#, Tan[#]}], Point[{0, 0}],
Point[{#, Tan[#]}]}] &, #], AspectRatio -> Automatic,
ImageSize -> 600] &[ptX]
(* Peter J. C. Moses, May 05 2020 *)
CROSSREFS
KEYWORD
nonn,cons
AUTHOR
Clark Kimberling, Jun 15 2020
STATUS
approved