Is desmos plotting this fuction incorrectly?

1.3k Views Asked by At

I was just plotting a function in desmos: $f(x) = \frac{a}{b+x}$. I wanted to plot the integral, but desmos doesn't support indefinite integrals of functions, so to model the integral I used Simpsons rule: $F(x) = \frac{x}{6} (f(0)+4f(\frac{x}{2})+f(x))$. You can check it out here.

$F(x)$ should be logarithmic since $f(x)$ is a $\frac1x$ function but desmos plots it as slant asymptotic. Did I use Simpsons rule incorrectly, or does desmos just fail to properly plot this? If so, is there an apparent reason why?

2

There are 2 best solutions below

0
On BEST ANSWER

I don't think there's anything wrong with Desmos here. Your expectation of what Simpson's rule is for is what appears to be off.

Simpson's rule is a method for approximating a definite integral. It will not give you the same thing as the anti-derivative.

The anti-derivative of $f(x)$ is $a \ln(b+x)$, so that's what you want to plot.

0
On

Actually you do get an approximately correct result. Note though that beyond the singularity of integrand, where $\ln$ (the exact antiderivative) has a branch point, Simpson's rule can't give you any valid information. And far from $x=0$ the result gets worse accuracy, since the step of Simpson integration, in the form you took it, increases. Compare the plots:

comparison of the functions in the OP with actual antiderivative