3
$\begingroup$

From the origin(0,0) of the complex plane, draw two tangent lines to the circle (see plot (p1)).

The absolute value of a complex number is a vector from origin to complex number in complex plane.

p1 = ComplexContourPlot[Abs[z - 6*I] == 3, {z, -10 - 10*I, 10 + 10*I}, GridLines -> Automatic, PlotLabel -> Abs[z - 6*I] == 3]

I do want also show the two axis (Real and Imaginair) in the ComplexContourPlot, but how?

Two values are calculated by : Reduce[{Abs[z - 6*I] == 3, Arg[z] > 0}, z]

Solution: i do have two points, then show this line is a tangent of the circle? Perhaps there is formula for this ? .. or solving with circle math

Note: is there a better approach? using the geometric packages for this.

$\endgroup$
4
  • $\begingroup$ Have you seen Axes -> True and AxesStyle -> ...? $\endgroup$
    – Michael E2
    Mar 5 at 18:43
  • $\begingroup$ Technically, Reduce[{Abs[z - 6*I] == 3, Arg[z] > 0}, z] returns infinitely many points (all the points on the circle), with two points on the diameter Im[z] == 6 distinguished. The line through those two points is obviously not tangent to the circle, nor are the lines from the origin through each point. Your reduce command should include a condition of tangency... $\endgroup$
    – Michael E2
    Mar 5 at 18:59
  • $\begingroup$ @Michael E2, thanks. There are no tangent line(s) from the origin to the diameter of the circle to draw. $\endgroup$
    – janhardo
    Mar 5 at 19:56
  • $\begingroup$ Exactly my point. (And you're welcome! :) $\endgroup$
    – Michael E2
    Mar 5 at 20:01

2 Answers 2

4
$\begingroup$

Not sure how you want to compute tangency, but here's a way that works for the circle:

With[{
  center = 6 I,
  radius = 3,
  z0 = 0
  },
 ComplexContourPlot[
  Abs[z - center] == radius,
  {z, -10 - 10*I, 10 + 10*I},
  GridLines -> Automatic, PlotLabel -> Abs[z - center] == radius,
  Axes -> True, AxesStyle -> Thick,
  Epilog -> {Red, PointSize@Medium,
    {Point[#], InfiniteLine[{ReIm@z0, #}]} & /@
     ReIm@ SolveValues[{Abs[z - center] == radius, 
        Re[(z - center)/(z - z0)] == 0}, z]}]
 ]

Here's another way to compute tangency that works for equations like the one in the OP whose sides are real-valued and defined in terms of a complex z and functions that ComplexExpand will handle:

With[{
  z1 = 6 I,
  f1 = 3,
  z0 = 0,
  a = -5 (1 + I),
  b = 5 (1 + I)
  },
 With[{
   realeqn = Abs[z - z1] - Im[z^3] + 2 Re[z^2] == f1
   },
  ComplexContourPlot[
   realeqn, {z, a, b},
   GridLines -> Automatic, PlotLabel -> realeqn,
   Axes -> True, AxesStyle -> Thick,
   Epilog -> {Red, PointSize@Medium, Point[ReIm@z0], 
     {Point[#], InfiniteLine[{ReIm@z0, #}]} & /@
       ReIm@NSolveValues[
        Append[            (* appends domain restrictions *)
         NestList[         (* {eqn, Dt@eqn} *)
            Dt,
            ComplexExpand[ (* convert to z, Conjugate[z] *)
             realeqn,
             z,
             TargetFunctions -> Conjugate],
            1] /.          (* rewrite Conjugate'[z] *)
           Conjugate'[z] :> Conjugate[Dt[z]]/Dt[z] /.
          {Dt[z] -> (z - z0)}, (* z lies on TL through z0 *)
         Re[a] <= Re[z] <= Re[b] && Im[a] <= Im[z] <= Im[b]
         ],
        z]}]
  ]]
$\endgroup$
7
  • $\begingroup$ Maybe add Point[ReIm@z0] to the Epilog. $\endgroup$
    – Michael E2
    Mar 5 at 19:09
  • $\begingroup$ @ Michael E2 quote : "Here's another way to compute tangency that works for equations like the one in the OP.." Can you elaborate on your idea of handling it this way ? I don't see an intersection value yet. I think i do see a sort of general approach ...for the absolute value equation $\endgroup$
    – janhardo
    Mar 5 at 22:34
  • $\begingroup$ Interesting that this code of yours with an absolute equation, for different values yield curves to which tangents are drawn. To calculate the intersection points of the tangents that is another story $\endgroup$
    – janhardo
    Mar 5 at 22:51
  • $\begingroup$ @janhardo NSolveValues solves for the points of tangency by solving the system {eqn == 0, Dt[eqn] == 0} where eqn is first rewritten in terms of $z$ and its conjugate $\overline z$, and we take $d\overline z = \overline{dz}$ via Conjugate'[z] :> Conjugate[Dt[z]]/Dt[z] and $dz$ (= Dt[z]) is given by the change in $z$ along the desired tangent line via Dt[z] -> (z - z0). (For the circle in the first code, it's just geometry. Two complex-plane displacements $\Delta a,\ \Delta b$ are perpendicular if $\text{Re}(\Delta a/\Delta b) = 0$.) $\endgroup$
    – Michael E2
    Mar 5 at 23:02
  • $\begingroup$ You can wrap NSolveValues[..] in parentheses and save the points of tangency inside the contour plot function, like this: (tangentpts = NSolveValues[...]) $\endgroup$
    – Michael E2
    Mar 5 at 23:06
3
$\begingroup$

Let us call the parametric description of the circle:

circ[ph_] := 6 I + 3 Exp[I ph]

The derivative of circ is a tangent Further, the line from the origine to the circle point, where the tangent touches, is a multiple of the derivative.

Therefore, a circle-tangent point plus a multiple of the tangent must give the origin (0). We may then write:

circ'[ph] lam + circ[ph] == 0

Note further that lam and ph are real and we solve:

Reduce[{circ'[ph] lam + circ[ph] == 0, {  ph, lam} \[Element] 
   Reals}, { ph, lam}]

The information: ph= -Pi 5/6 and -Pi/6 is all we need to draw a graphics:

ParametricPlot[ReIm[circ[ph]], {ph, 0, 2 Pi}, 
 Epilog -> {Line[{{0, 0}, ReIm[circ[-Pi 5/6]]}], 
   Line[{{0, 0}, ReIm@circ[-Pi/6]}], 
   Point[{ReIm@circ[-Pi 5/6], ReIm@circ[-Pi/6]}]}, 
 PlotRange -> {{-3, 3}, {0, 9}}]

enter image description here

$\endgroup$
1
  • $\begingroup$ @ Daniel Huber thanks, got here a value for a tangent point Got here three other methods of solving this and all three are not yet clear for me. Also your solution must be studied further.. $\endgroup$
    – janhardo
    Mar 5 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.