(* 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]]
(* 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]
(* 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]