# Need help to plot Talbot's Contour (Newbie question)

I would like to plot these following parametrizations:

$$s(\theta)=\sigma+\lambda s_{\nu}(\theta),\quad s_{\nu}(\theta)=\theta\cot(\theta) + i\nu\theta,\quad \theta\in(-\pi,\pi)$$

For more details, please see: The accurate numerical inversion of Laplace Transform by A. Talbot. The parameters $$\sigma$$, $$\lambda$$, and $$\nu$$ are adjustable. The Talbot's contour should looks like these two: Or

My attempt:

σ := 1
λ := 1/2
ν := 1
s1 := θ*Cot (θ) + (I ν θ)
eqn := σ + (λ s1), Assumptions -> -Pi <= θ <= Pi
ParametricPlot[{Re[eqn], Im[eqn]}, {f, -5, 2}, AspectRatio -> 1]


Sorry, I can't give further attempt since I'm not really familiar with Mathematica. Hope you can help me. Thanks in advance.

• 1. Use Set (=) instead of SetDelayed (:=) for assignments to constants. 2) Assumptions is an option of only certain functions. You can't use it that way. Didn't you see the error when you tried to execute your code? 3) Functions in MMA enclose their parameters in [], so Cot[theta] and not Cot(theta). 4) The variable in ParametricPlot should be the same as in your equation, i.e. theta, not f. – MarcoB Feb 23 at 15:13

Start from here:

σ = 1;
λ = 1/2;
ν = 1;
s1 = θ Cot[θ] + I ν θ;
eqn = σ + (λ s1);
ParametricPlot[{Re[eqn], Im[eqn]}, {θ, -3.5, 3.5}, AspectRatio -> 1]


• Wonderful. Thank you for your help!! – user516076 Feb 23 at 15:20
• In the current version, I would use ReIm[eqn] within ParametricPlot[]. – J. M.'s ennui Feb 23 at 21:35

Some bells and whistles.

Clear["Global*"]


Since the "parameters ... are adjustable" use Manipulate.

Manipulate[
Module[{s1, θ, eqn},
s1 = θ*Cot[θ] + I*ν*θ;
eqn = σ + (λ*s1);
ParametricPlot[
{Re[eqn], Im[eqn]},
{θ, -Pi, Pi},
PlotRange -> {{-5, 3.5}, {-4.25, 4.25}},
AspectRatio -> 1]],
{{σ, 1}, 0, 2, 0.01, Appearance -> "Labeled"},
{{λ, 0.5}, 0, 2, 0.01, Appearance -> "Labeled"},
{{ν, 1}, 0, 2, 0.01, Appearance -> "Labeled"}]


• Thanks. Another wonderful solution. By the way what does Clear[Global'*"]` do? – user516076 Feb 23 at 21:20
• It removes any prior definitions that might potentially interfere with the code, i.e., makes sure you are starting with a clean slate. – Bob Hanlon Feb 23 at 21:23