3
$\begingroup$

f1 and f2 are in fact the same function as f3. One contains + 2.7^x the other - 2.7^x but if we make replacement 2.7^x - > t we see that it is the same function.

f1 = (1 - 0.2 I) ((-1 - 6 I) ((-0.1 + 0.1 I) + 2.7^x))^(-0.1 + 0.3 I) // ReIm;
f2 = (1 - 0.2 I) ((-1 - 6 I) ((-0.1 + 0.1 I) - 2.7^x))^(-0.1 + 0.3 I) // ReIm;
p1 = ParametricPlot[{f1, f2}, {x, -8, 8}]

enter image description here

Since the two pieces are the same functions it should be possible to plot it in single piece:

f3 = f1 /. (2.7^x -> t)

p2 = ParametricPlot[{f3}, {t, -2.7^8, 2.7^8}, PlotRange -> 2, 
  PlotPoints -> 500, PlotStyle -> Directive[ColorData[97, 3], Dashed]]

{Re[(1. - 0.2 I) ((-1 - 6 I) ((-0.1 + 0.1 I) + t))^(-0.1 + 0.3 I)], 
 Im[(1. - 0.2 I) ((-1 - 6 I) ((-0.1 + 0.1 I) + t))^(-0.1 + 0.3 I)]}

enter image description here

Even tough PlotPoints -> 500 was used the plot is not correct around t=0 for obvious reason - sample points around t=0 are sparsely distributed. Because ParametricPlot distribute them not in range of x or y axis but in range of parameter t.

If we change plotting range so that it is near t=0 we get correct plotting near t=0 but we are missing the region on the left that can be seen on plot p1.

p3 = ParametricPlot[{f3}, {t, -30, 30}, PlotRange -> 2, 
  PlotPoints -> 100, PlotStyle -> Directive[ColorData[97, 3], Dashed]]

Show[p2, p3]

enter image description here

To see that f1 and f2 are same as f3:

Show[p1, p2, p3]

enter image description here

So the question is how to plot the function f3 in range {t, -2.7^8, 2.7^8} (with single definition and single plot) so that it is of quality of plot p1 (which consist of two separate pieces).

$\endgroup$
6
  • 3
    $\begingroup$ AI say: f1 = (1 - 0.2 I) ((-1 - 6 I) ((-0.1 + 0.1 I) + 2.7^x))^(-0.1 + 0.3 I) // ReIm; f3 = f1 /. (2.7^x -> t); boundary = ArcSinh[2.7^8]; ParametricPlot[f3 /. t -> Sinh[u], {u, -boundary, boundary}] $\endgroup$ Commented Feb 24 at 22:58
  • $\begingroup$ @MariuszIwaniuk My self-confidence has decreased to zero. :-D So AI is more clever than me? But can you ask your AI where it ripped that code off? I do not believe it invented it itself. Post as an answer and I will accept it if nothing better will be posted. $\endgroup$ Commented Feb 24 at 23:28
  • $\begingroup$ PlotPoints -> 10*Floor[2.7^8] $\endgroup$ Commented Feb 24 at 23:45
  • $\begingroup$ @cvgmt So if you wanted to plot it in range 2.7^50 you would use PlotPoints -> 10*Floor[2.7^50]? That is not a good solution. $\endgroup$ Commented Feb 24 at 23:51
  • $\begingroup$ Yes, that is why I only post a comment instead of an answer. I think we should edit the original question to add such restrict since the two answer below does not match the general cases. $\endgroup$ Commented Feb 25 at 11:27

3 Answers 3

3
$\begingroup$

Increase the PlotPoints even more

$Version

(* "14.3.0 for Mac OS X ARM (64-bit) (July 8, 2025)" *)

f1 = (1 - 0.2 I) ((-1 - 6 I) ((-0.1 + 0.1 I) + 2.7^x))^(-0.1 + 0.3 I) // ReIm;

f2 = (1 - 0.2 I) ((-1 - 6 I) ((-0.1 + 0.1 I) - 2.7^x))^(-0.1 + 0.3 I) // ReIm;

p1 = ParametricPlot[{f1, f2}, {x, -8, 8}]

enter image description here

pltRng = Values@AbsoluteOptions[p1, PlotRange][[1]]

(* {{-0.631168, 1.45261}, {-0.364975, 1.06244}} *)

p2 = ParametricPlot[f3, {t, -2.7^8, 2.7^8}, PlotRange -> pltRng, 
  PlotPoints -> 2000, PlotStyle -> Directive[ColorData[97, 3], Dashed]]

enter image description here

$\endgroup$
1
  • $\begingroup$ Using PlotPoints -> 2000 does not seem to solve anything. How many plot points would you use for {t, -2.7^50, 2.7^50} instead of {t, -2.7^8, 2.7^8}? $\endgroup$ Commented Feb 25 at 10:09
3
$\begingroup$
  • Use Sinh to re-parametric the curve is a good idea. There still another functions could be use to re-parametric the curve, but here we only use the discrete sample.
f[t_] := (1 - 
      0.2 I) ((-1 - 6 I) ((-0.1 + 0.1 I) + t))^(-0.1 + 0.3 I) // ReIm;
sample = Table[2.7^x, {x, Subdivide[-50, 50, 200]}];
lplot = ListLinePlot[f /@ Join[-Reverse@sample, sample], 
  PlotRange -> {{-1.5, 1.5}, {-1.5, 1.5}}, AspectRatio -> Automatic, 
  InterpolationOrder -> 3]
lplot /. Line -> Polygon

enter image description here

$\endgroup$
2
$\begingroup$

Increase MaxRecursion.

f1 = (1 - 0.2 I) ((-1 - 6 I) ((-0.1 + 0.1 I) + 2.7^x))^(-0.1 + 0.3 I) // ReIm;
f2 = (1 - 0.2 I) ((-1 - 6 I) ((-0.1 + 0.1 I) - 2.7^x))^(-0.1 + 0.3 I) // ReIm;
f3 = f1 /. (2.7^x -> t);

p2 = ParametricPlot[{f3}, {t, -2.7^8, 2.7^8}, PlotRange -> 2, PlotPoints -> 500, 
  MaxRecursion -> 15]

enter image description here

$\endgroup$
3
  • $\begingroup$ How high recursion would you use for {t, -2.7^50, 2.7^50}? $\endgroup$ Commented Feb 25 at 10:27
  • $\begingroup$ Your $t$ varies over several orders of magnitude, but the interesting behaviour happens on the order of 1. Apparently, adaptive sampling has troubles with this. Knowing the problem, I would simply manually sample my function: ListPlot[f3 /. t -> (Table[-2^b, {b, 50, -20, -0.1}]~Join~Table[2^b, {b, -20, 50, 0.1}]) // Transpose, Joined -> True, PlotRange -> All] $\endgroup$ Commented Feb 25 at 11:37
  • $\begingroup$ The point is that for f1 and f2 it varies only between -50, 50. But the solution is already mentioned in Mariusz Iwaniuk's comment - the variable should be substituted with Sinh like 2.7^x -> Sinh[u] and then plotted in the rage -50, 50 with very few plot points, say PlotPoints -> 100 and default MaxRecursion. $\endgroup$ Commented Feb 25 at 11:45

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.