I have a real variable $t$ and a function $f(t)$ giving complex values. How to plot the function for $t$ in a given real interval? Also is there a way to do it in Wolfram Alpha website?

  • 1
    $\begingroup$ f[t_]:=2 t+I t^2; ParametricPlot[{Re[f[t]],Im[f[t]]},{t,-3,3}] works with Mathematica. ParametricPlot[{Re[2 t+I t^2], Im[2 t+I t^2]},{t,-3,3}] works with WolframAlpha. $\endgroup$
    – Bill
    Commented Dec 13, 2020 at 20:26
  • $\begingroup$ You can also use ReIm[f[t]] instead of {Re[f[t]], Im[f[t]]} in Mathematica, although it produces the same result and WA seems not to understand it. $\endgroup$ Commented Dec 13, 2020 at 20:26

1 Answer 1

ReImPlot[2 t + I t^2, {t, -\[Pi], \[Pi]}]

enter image description here

That is a new built-in in V12 and newer: ReImPlot

ReImPlot[{ArcSin[x], ArcCos[x]}, {x, -4, 4}, 
 PlotLabels -> "Expressions"]

enter image description here

The input that suffices for WolframAlpha is simpler

WolframAlpha["2 t+I t^2 plot -pi to pi"]

enter image description here

WolframAlpha["{ArcSin[x],ArcCos[x]} plot -4 to 4"]

enter image description here

has some unexpected behavior with the desired interval. It does not show the continuation.

An introductory example is

ReImPlot[{Sqrt[1 - x^2], -Sqrt[x^2 - 1]}, {x, -3, 3}]

enter image description here This separates the branches of roots very neat.

AbsArgPlot[1 + Exp[-Abs[x]] Sin[I Sin[5 x]], {x, -Pi, Pi}, 
 PlotRange -> Full]

enter image description here AbsArgPlot is an acompanying function suiting the given criteria too.

A Mathematica example is the Nyquist plot:

h = 1/(s - 1/2)^2 /. s -> Exp[I \[Omega]]
ParametricPlot[{Re[h], Im[h]}, {\[Omega], 0, 2 Pi}]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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