Strange plotting behaviour- Mathematica 8

1 reply · 2K views · last reply
muppet
Messages
602
Reaction score
0
I'm confused by Mathematica's behaviour when plotting some functions I've constructed by interpolating functions. I have three graphs (attached). The first is a plot of the family of functions; they're negative, and decreasing to zero. I tried to do a LogLogPlot to look at their behaviour as they decay, and it looks as if the functions decay to one, as if I was actually plotting Log(f(x)) for small f.

I was looking to see if these functions behaved like 1/x^n for large x, and when comparing one function to x^(-4) it doesn't look as if I'm getting the straight line I expect on a LogLogPlot.

Can someone please explain why? I should point out that my functions are on the order of 10^(-10) over the region I'm plotting.

Thanks in advance.
 
Attachments
  • Mathematica notebook output: a plot of four negative curves decaying toward zero from x = 0 to 10, and below it a LogLogPlot of the negated curves over 1 to 10, which levels off near 1.0.
    Screenshot from 2012-09-13 19:30:07.png
    21.1 KB · Views: 581
  • Mathematica LogLogPlot of a wavy blue curve with decaying oscillations and a smooth red curve decreasing monotonically, plotted over b from 30 to 100 with WorkingPrecision 50.
    loglogplot2.png
    5.8 KB · Views: 559
It is possible that Mathematica is plotting Log(f(x)) instead of Log[f(x)]. This could be due to the fact that f(x) is very close to 0 for the range you are plotting. Mathematica may be interpreting your input as Log(f(x)) instead of Log[f(x)] because it is more numerically stable. If this is the case, then you will need to adjust your plotting range so that f(x) is greater than 0. This should reduce the numerical instability and allow Mathematica to interpret your input correctly.