trekkiee Posted February 11, 2010 Report Posted February 11, 2010 I noticed some unexpected behavior in the real-valued f(x)=(1+x)^1/x, as a function of real numbers, when plotting it on wolfram alpha. I inputed: plot (1+x)^1/x from x=-0.0000001 to x=0.0000001 and saw that it unexpectedly seemed to oscillate near zero. I took a closer look with: plot (1+x)^1/x from x=-0.00000000001 to x=0.00000000001 and saw that it definitely seems to oscillate near zero. My original rough graph on paper using a hand calculator suggested the curve was smooth near zero, and even windows calculator's 32 decimal places were unable to reveal the oscillation when I manually calculated many different values near zero. I don't think f(x) is smooth near zero, though, since d/dx[f(x)]=f(x)d/dx[1/xln(1+x)] so all of f(x)'s derivatives have a discontinuity at zero. Since Leonhard Euler showed limf(x)=e as x approaches zero, and this limit is the same as you approach zero from the left or from the right, then the discontinuity of f(x) at zero is removable and the function f(x)=(1+x)^1/x, x not = 0f(0)=0 x=0 is continous. But the discontinuities in the derivatives don't appear to be removable. Each derivative will have a term containing the factor 1/x (not the 1/x in the exponent of f(x)) which cannot be removed. E.g. d/dx[f(x)]=f(x)[(1/x)(1/(1+x)+(-1/x^2)(ln(x+1))] the 1/x in the 1st term is not removable. I'm not saying it doesn't oscillate near zero, I'm just saying that this is unexpected. I need confirming opinions and confirming logic to explain it so I can believe it.So the questions are:1. Does f(x) oscillate near zero?2. Why does f(x) oscillate near zero?3. Why does this behavior not appear until |x|<~10^-7?4. Is it a glitch in Mathimatica? [doubt it]5. If it doesn't oscillate [which it probably does] then how is the behavior of the derivatives explained near zero?6. If it oscillates, then why is it so hard to replicate this oscillation manually on a calculator? Note#1: This behavior concerns the real-valued f(x). I don't think Re[f(z)] or Im[f(z)], z complex, are of interest here.Note#2: This behavior concerns (1+x)^1/x. I dont think either (1+1/x)^x or lim(1+1/x)^x as x goes to infinty are of interest here. Thx in advance and Kudos to the person with the explanation! Quote
Pyrotex Posted February 11, 2010 Report Posted February 11, 2010 Interesting problem!! :) I used Excel to plot the final 99 points counting down to X= zero. I set the difference between those points as 10^-5. It plotted a straight line.I set the difference between points as 10^-6. Straight line. Then I got down to the difference between points as 10^-9. This is what I got (attached). The X-axis should read 99 to 1 rather than backwards. My bad. Yes, the f(x) does oscillate near zero, and the nearer it gets, the worse it oscillates Quote
CraigD Posted February 11, 2010 Report Posted February 11, 2010 My guess is that the oscillation that wolframalpha.com’s and other plotting calculators show is a relic of using limited precision rational math to approximate real numbers. I wouldn’t call this a “bug in Mathematica”, rather a known limit of precision of the calculator used by its default plot feature. If [math](1+X)^{\frac1{X}}[/math] truly oscillated when X is near 0, it would have local maxima and minima there, and thus [math]\frac{d (1+X)^{\frac1{X}}}{dX} = 0[/math] there. However, per this wolframalpha page, its derivative has a zero only at [math]X = \infty[/math]. You can also get a slightly convincing demonstration of the smoothness of the function by considering only rational values of [math]X = \frac1{2^n}[/math] where n is an integer. [math](1+X)^{\frac1{X}} = \left( \frac{2^n+1}{2^n} \right)^{2^n}[/math], which can be fairly easily calculated and shown to never be further from [math]\lim_{X \to 0} (1+X)^{\frac1{X}} = e[/math] for greater values of n. To discover the cause of the observed oscillations, you’d have to look in the details of the calculator, not the mathematics of the function. Quote
Jay-qu Posted February 12, 2010 Report Posted February 12, 2010 I just noticed Craig already pointed this out, but its an interesting connection. When x<1 you can expand this into a convergent series, which is badly approximated by: (1+x)^(1/x) ~ 1+(1/x)x=2 the decimal expansion of e: e = lim (1+1/n)^n as n->infinity and make the substitution n=1/x and then instead of taking the limit as n->inf, you take x->0 So what you have for very small x is the value of e. Cool. Quote
Pyrotex Posted February 12, 2010 Report Posted February 12, 2010 You guys are so smart. I wanna be just like you when I grow up. :naughty: Quote
A23 Posted February 12, 2010 Report Posted February 12, 2010 Hi, I found like Craig : if I let [math]f(x)=(1+x)^{(1/x)}[/math], took ln(f(x))=ln(1+x)/x, then limit with Hospital theorem : [math]\lim_{x->0}ln(f(x))=\lim_{x->0}\frac{\frac{d}{dx}ln(1+x)}{dx/dx}=\lim_{x->0}1/(1+x)=1[/math], hence f(x->0)->exp(1)=e. Quote
trekkiee Posted February 12, 2010 Author Report Posted February 12, 2010 Thx all for the replies. I should have known the problem was mathematica's [wolfram alpha] behavior when doing certain calculations. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.