I've derived this approximation: $$\int_a^b\frac{f(x)}{x}dx\approx f(\sqrt{ab})*\ln{\frac{b}{a}}$$ when $a$ and $b$ are close (I don't know how close). Here, close doesn't mean that the differnce between $a$ and $b$ should be 0.01. Here close could mean 'far'. I don't know what the difference should be. Here, close only means that this formula has a limitation. Is it something new? It could help in evaluating $Si(x)$ ( integral of $\frac{\sin{x}}{x}$), $Co(x)$ ( integral of $\frac{\cos{x}}{x}$), and many other integrals whose anti-derivatives are not elementary. I know you can do that by integrating Taylor series of those functions but this seems more compact. Does it work?
Is this a good approximation for $\int_a^b\frac{f(x)}{x}dx$?
3
$\begingroup$
integration
functions
definite-integrals
approximation
-
2I'm curious to see how you derived it... But if you're correct in saying that it works when $a$ and $b$ are close, it might not be so useful in evaluating Si and Ci, since for $a \approx b$, the integral is close to the integrand times $(b-a)$ – 2017-02-22
-
2Looks like you are just replacing $f(x)$ with $f(\sqrt {ab})$, no? After all, $\int_a^b \frac {dx}x=\log {\frac ba}$. Of course if $a$ and $b$ are very near each other then $f(x)$ is roughly constant on $[a,b]$, but I'm not sure why this one choice should be better than any other. – 2017-02-22
-
0@B.Mehta I said I don't know how close. Close could also be far. Here close only means that this formula has a limitation. – 2017-02-22
-
1@lulu: I said I don't know how close. Here close doesn't mean that the difference between a and b should be 0.01. I don't know what the difference should be. Here close ONLY means that this formula has a limitation. – 2017-02-22
-
1As I pointed out, you seem to simply be assuming that $f$ is roughly constant on $[a,b]$ and so you are evaluating $f$ at some point in the interval. Is there some reason you choose $\sqrt {ab}$ instead of $\frac {a+b}2$ (or any other point in the interval?) – 2017-02-22
-
1There's no particular reason to think that $\sqrt{ab}$ is the "best" middle value. But if you set $x=e^{u}$ then the integral becomes $$\int_{\log a}^{\log b} f(e^{u})\,du$$ then your value is estimating $f(e^u)$ using $u=\frac{\log a+\log b}{2}$. – 2017-02-22
-
0@lulu If I assume $f$ to be roughly constant on [a,b], with the average value being $\sqrt{ab}$, then the approximation of $\int_a^b\frac{f(x)}{x}$ would be $\frac{f(a)}{a}+f(\sqrt{ab})\cdot (b-a)$ instead. – 2017-02-22
-
0No. If I replace $f(x)$ with it's value at $\sqrt {ab}$ I get $\int_a^b \frac {f(x)}x dx \approx f(\sqrt {ab})\times \int _a^b \frac {dx}x = f(\sqrt {ab}) \times \log \frac ba$ which is what you wrote. I was puzzled as to why you chose the geometric mean instead of the arithmetic mean, but the posted solution clarifies that (it is the arithmetic mean, after a routine change of variables). – 2017-02-22
-
0@ThomasAndrews I've derived it, so I think $\sqrt{ab}$ is the best candidate for a middle value. And, you can't just substitute $x=e^u$ because if $a$ and $b$ are close according to my formula's limitations, then $e^a$ and $e^b$ may get far away. Just do the calculations for $Si(x)$ using all the middle values you can think of. $\sqrt(ab)$ will be the most close. – 2017-02-22
-
0@lulu I've derived it, so I think $\sqrt{ab}$ is the best candidate for a middle value. And, you can't just substitute $e^u$ because if a and b are close according to my formula's limitations, then e^a and e^b may get far away. Just do the calculations for Si(x) using all the middle values you can think of. (√ab) will be the most close. – 2017-02-22
-
0@Dove: the distance of $e^a$ and $e^b$ being large is not a real issue. By setting $g(t)=f(e^t)$ we get that if $f'$ is reasonably small on $(a,b)$ then $g'$ is reasonably small on $(\log a,\log b)$: the derivative "stretches" according to our substitution. Robert Israel's answer shows an explicit error term. – 2017-02-22
-
0And the approximations for $\int_{0}^{M}\frac{\sin x}{x}\,dx$ are usually performed by applying a step of integration by parts for first, in order to remove the oscillating behaviour of the integrand function. – 2017-02-22
-
0For instance, for large $M$s we have $$\int_{0}^{M}\frac{\left| \sin (x)\right|}{x}\,dx \approx \int_{0}^{M}\frac{\left| \cos (x)\right|}{x}\,dx \approx \frac{2}{\pi}\log(M) $$ and for values of $M$ close to zero we may use a termwise integration of a Taylor series. – 2017-02-22
1 Answers
4
With substitution $x=e^t$ and $f(x) = g(t)$, the integral becomes $$ \int_{\ln(a)}^{\ln(b)} g(t)\; dt $$ You can take the Taylor series of $g$ about $t=t_0 = (\ln(a)+\ln(b))/2 = \ln(\sqrt{ab})$: $$ g(t) = g(t_0) + (t-t_0) g'(t_0) + \frac{(t-t_0)^2}{2} g''(t_0) + \frac{(t-t_0)^3}{6} g'''(t_0) + \ldots $$ and integrate it: $$ \int_{\ln(a)}^{\ln(b)} g(t)\; dt = \ln(b/a) g(t_0) + \frac{\ln(b/a)^3}{3} g''(t_0) + \frac{\ln(b/a)^5}{60} g''''(t_0) + \ldots$$