Accuracy of numsolve in TI, CASIO

03262021, 07:35 PM
Post: #1




Accuracy of numsolve in TI, CASIO
I notice on my TI30X Pro MathPrint...if I solve d/dx to =0 for (x^2 +7x +3)/ ^2, the solution found is most accurate when choosing an epsilon of 1E05. Why is this the optimum choice? On my CASIO fx991EX, the solution is more accurate, last digit shown is correctly rounded...wonder what epsilon is used, and what is different in it’s solve methodology...


03262021, 09:55 PM
Post: #2




RE: Accuracy of numsolve in TI, CASIO
Assuming calculator use centraldifference derivative formula, this might answer your question.
Is there a general formula for estimating the step size h in numerical differentiation formulas ? Example, estimate (ln(x))' at x=2: lua> function D(x,h) return (log(x+h)log(xh))/(2*h) end lua> for i=4,8 do print(i, D(2, 10^i)) end 4 0.5000000004168335 5 0.5000000000088269 6 0.5000000000143777 7 0.49999999973682185 8 0.49999999696126407 Interestingly, optimal h for this example is also about 1e5: At the cost of more computation, we can use bigger h, and extrapolate for slope. (similar to Romberg's integration, extrapolate from raw trapezoids, or rectangles) lua> h = 1e3 lua> d1 = D(2,h) lua> d2 = D(2,h/2) lua> d1, d2, d2+(d2d1)/3 0.500000041666615 0.5000000104167235 0.5000000000000929 

03262021, 10:23 PM
(This post was last modified: 03262021 10:34 PM by robve.)
Post: #3




RE: Accuracy of numsolve in TI, CASIO
(03262021 09:55 PM)Albert Chan Wrote: Assuming calculator use centraldifference derivative formula, this might answer your question. Just my 2c. This is a very good question. With numerical differentiation and finite difference stencils I've always used the cuberoot of machine epsilon (MachEps). On 12 digit machines, this is 1E4 and for 15 digit machines (no surprise) this is 1E5. As Albert says, 1E5 should be about optimal. See also step size that explains the difficulty of choosing a step size. Let me add that an approximate to the optimal step can be empirically established.  Rob PS. (edit) you may also want to scale h with the magnitude of the point(s) you're differentiating, otherwise you will end up with a slope that is closer to zero. For a 10 digit machine, let's take 1E3, then what you want to do when differentiating at point A is something like this: h=1E3 IF abs(A)>1 THEN h=h*abs(A) The points X are at \( A\pm h \), but due to rounding you may want to do the following to get to XA and then adjust H so it is exact: X=Ah, h=AX "I count on old friends"  HP 71B,PrimeTi VOY200,Nspire CXII CASCasio fxCG50...Sharp PCG850,E500,2500,1500,14xx,13xx,12xx... 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)