Message Boards Message Boards

0
|
803 Views
|
8 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Unexpected discontinuity plot

Posted 7 months ago

Hello Everyone!

I need help with this plot, which Mathematica is plotting it incorrectly, spitting out a discontinuous function. The function of interest is attached. It is simply unity, which should show a continuous and horizontal line.

I would be grateful if you'd help me see why Mathematica is plotting it incorrectly.

8 Replies

Hi Gianluca,

If you look at the attached file, using same g or corrfuc, there is not any discontinuity upon slightly changing one of the parameters.

Thanks!

MT

Your functions are discontinuous at t == 2000/3:

Plot[corrfunc // Re, {t, 2000/3 - .01, 2000/3 + .01}]
Plot[g // Im, {t, 2000/3 - .01, 2000/3 + .01}]

The value of t is found with this equation:

Solve[ComplexExpand[Im[1/g[[1]]]] == 0]
POSTED BY: Gianluca Gorni

Dear Gianluca Gorni,

Thank you for your response so promptly. I plotted the function g//Re and it was continuous. With Exp[g/2] you are basically taking the square root of g, and the Log is gone due to the exponential. As such, it is only square root of g with neither Log nor Exp.

Many thanks!

MT

Yes, that's another way to describe it. But now it is the Sqrt that is discontinuous.

POSTED BY: Gianluca Gorni

Hi Gianluca Gorni,

Thank you for your response. I was wondering you'd kindly help me fix the discontinuity in this function named "corrfunc" (attached) in the notebook. In numerous literature, corrfunc should be continuous, but as you can see Mathematica shows otherwise, which is wrong.

In the notebook, the pink colored input is just numbers (e.g., frequency, time, and temperature) in the right units. The blue colored cell represents parts of corrfunc. The yellow colored part defines corrfunc. My suspension is that Log expression "g" (turns into sqaure root when dividing by "2" in the exponential) in corrfunc. As you the notebook shows when removing the factor 2 from g, the discontinuity is lifted.

I would gratefully appreciate your input as to how to fix this.

With grateful thanks & kindest regards!

MT

Because of the complex Log, the function g is discontinuous. The discontinuity cancels out with Exp[g], but not with Exp[g/2].

POSTED BY: Gianluca Gorni

Thank you so much for your prompt response!

MT

You are problably under the delusion that E^(- I t/2) == Sqrt[E^(- I t)] for all real t. Try this:

{E^(- I t/2), Sqrt[E^(- I t)]} /. t -> 2 Pi

The square root is discontinuous on the complex plane:

ComplexPlot[Sqrt[z], {z, -1 - I, 1 + I}]
FunctionDiscontinuities[Sqrt[z], z]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract