# Tangent point in Polar Coordinates

I don't know which command to determine the tangent lines that are parallel to the line $$x=0$$ (i.e. the y-axis) in Polar Coordinates. Can you help me please to give me some suggestions?

I attach some code which I have written:

theta = 45;
the = theta*Pi/180;
alp = 2;
gc = Sqrt[1 + alp*Sin[x - the]*Sin[x - the]];
yy = 1/gc;
PolarPlot[yy, {x, 0, 2*Pi}, PolarAxes -> True,
PolarTicks -> {"Degrees", Automatic}, PolarGridLines -> True,
Mesh -> 15, MeshStyle -> Directive[PointSize[Large], Red]]

• Why not switch to parametric equations? #2/#1 & @@ D[yy {Cos[x], Sin[x]}, x]? – J. M. will be back soon Oct 14 '18 at 1:31
• @J.M.issomewhatokay. YOU mean ff = #1/#2 & @@ D[yy {Cos[x], Sin[x]}, x]; mm = Solve[ff == 0, x]; here not #2/#1, Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. – ABCDEMMM Oct 14 '18 at 2:12

yy = 1 / gc;
f[x_] := Evaluate[yy {Cos[x], Sin[x]}]
tangent[x_] := Evaluate[Simplify@FrenetSerretSystem[f[x], x][[2, 1]]]

pts1 = N[x /. Solve[{Divide @@ tangent[x] == 0, 0 <= x <= 2 Pi}, x, Reals]]


{0.197395, 3.33898}

pts2 = N[x /. Solve[{Divide[#2, #1] & @@ tangent[x] == 0, 0 <= x <= 2 Pi}, x, Reals]]


{4.51499, 1.3734007}

epilog = {Text[Style[ToString[Round[#/Degree, .1]] <> "°", Black],
{.1, .05} + (f@#)] & /@ Join[pts1, pts2],
Thick, Purple, PointSize[Large] , Point[f /@ pts1],
Magenta, Point[f /@ pts2], Green, Point[f[#]],
Cyan, Line /@ ({{# - 1/3, #2}, {# + 1/3, #2}} & @@@ (f /@ pts2)),
Orange, Line /@ ({{#, #2 - 1/3}, {#, #2 + 1/3}} & @@@ (f /@ pts1)),
Red, Line[{f[#] - .5 tangent[#], f[#] + .5 tangent[#]}]} &;

Manipulate[PolarPlot[yy, {x, 0, 2 Pi}, Epilog -> epilog[-t]], {t, 0, 2 Pi, Pi/100}]


Using OP's code with the option Epilog:

PolarPlot[yy, {x, 0, 2*Pi}, PolarAxes -> True,
PolarTicks -> {"Degrees", Automatic}, PolarGridLines -> True,
Mesh -> 15, MeshStyle -> Directive[PointSize[Large], Red],
Epilog -> {Thick, Purple, PointSize[Large] , Point[f /@ pts1],
Magenta, Point[f /@ pts2],
Cyan, Line /@ ({{# - 1/2, #2}, {# + 1/2, #2}} & @@@ (f /@ pts2)),
Orange, Line /@ ({{#, #2 - 1/2}, {#, #2 + 1/2}} & @@@ (f /@ pts1))}]


Update: Starting with theta = 65; and going through the same steps:

PolarPlot[yy, {x, 0, 2*Pi}, PolarAxes -> True,
PolarTicks -> {"Degrees", Automatic}, PolarGridLines -> True,
Mesh -> 15, MeshStyle -> Directive[PointSize[Large], Red],
Epilog -> {Text[Style[ToString[Round[#/Degree, .1]] <> "°", Black],
{.1, .05} + (f@#)] & /@ Join[pts1, pts2] ,
Thick, Purple, PointSize[Large], Point[f /@ pts1],
Magenta, Point[f /@ pts2],
Cyan, Line /@ ({{# - 1/2, #2}, {# + 1/2, #2}} & @@@ (f /@ pts2)),
Orange, Line /@ ({{#, #2 - 1/2}, {#, #2 + 1/2}} & @@@ (f /@ pts1))}]


• search the node: the tangent of node is parallel to the line x=0 ... not tangent in every node... – ABCDEMMM Oct 14 '18 at 0:38
• @ABCDEMMM, please see the update. – kglr Oct 14 '18 at 2:22
• nice to see! thanks a lot! – ABCDEMMM Oct 14 '18 at 2:26
• is it possible that in the near of each node I can add the value of [Degrees], example: P1 = 10,33 Degree? P.S. I can do it in PPTX ... – ABCDEMMM Oct 14 '18 at 2:36
• you mean Text[Style[ToString[Round[#/Degree, .1]] <> "°", Black] in labels ? – ABCDEMMM Oct 14 '18 at 3:28