TransWikia.com

Plotting a function with large negative exponents

Mathematica Asked by Rodrigo Bernal on July 29, 2021

I am trying to plot the function:

f(x)=(1-exp(-Vx^m))/(1-(1-x^m)^V)-1

for various values of $V$ and $m$ ranging from 1 to 30, and from $0leq xleq1$. How can I avoid numerical evaluation errors near zero? I’ve tried:

LogLinearPlot[(1-Exp[-4*x^6])/(1-(1-x^6)^(4))-1,{x,10^-6,1},PlotRange->{-1,1}]

But get warnings and an oscillatory behavior of the plot which I am not sure is correct, because the limit of the function is 0 at $x=0$.

One Answer

Your function is numerically ill defined around zero. But you may replace the function by a limit. And you need to increase the working precision

f[x0_] := Limit[(1 - Exp[-4*xx^6])/(1 - (1 - xx^6)^(4)) - 1, xx -> x0]
LogLinearPlot[{f[x]}, {x, 10^-6, 1}, PlotRange -> {-.1, .1}, WorkingPrecision -> 20]

enter image description here

Correct answer by Daniel Huber on July 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP