Post Reply 
Sharp EL-W506T vs. Sharp EL-W516T
01-31-2020, 12:21 AM (This post was last modified: 01-31-2020 12:58 AM by Mjim.)
Post: #33
RE: Sharp EL-W506T vs. Sharp EL-W516T
(01-30-2020 02:44 PM)Albert Chan Wrote:  Of course, easiest way is ∫ C/r^2 dr = -C/r + constant
With C=3.98589196e+17, and dr integral limit, a=6.371e6, b=9.4607304725808e+15

∫ (C/r^2 dr, r=a to b) = (-C/b) - (-C/a) ≈ 62563050656

Simpson's rule using your idea, we can automate it:

r = e^x → dr = e^x dx

∫ C/r^2 dr = ∫ C/e^x dx

dx integral (evenly spaced points) = dr integral (exponential scaled points).

Code:
n   Simpson's rule: ∫ C/e^x dx, x = log(a) to log(b)
2       220230813472
4       112353290079
8       71413173487
16      63433168508
32      62625715827
64      62567118731
128     62563307380
256     62563066741
512     62563051662
1024    62563050719

Many thanks for this neat little work around for calculators using the Simpson algorithm. It finally allows my humble fx-991W to return 6.25631*10^10 instead of throwing a math error (n=9 which is 2^9 = 512 divisions).

I thought I would try an even steeper exponential to see what would happen:
r = e^(x^2) -> dr = 2xe^(x^2) dx

integral(C/r^2, a, b) = integral(2Cx/e^(x^2), sqrt[ln(a)], sqrt[ln(b)] )

Code:
n
2      173988570100
4       91592348100
8       66372559190
16      62867878800
32      62583408450
64      62564344640
128     62563131870
256     62563055740
512     62563050970
1024    62563050680

It's pretty messy though compared to just e^x, though it does allow me to get an additional digit of accuracy on the fx-991W (6.256305 x 10^10). The Casio Simpson integration algorithm on the W/MS series has a built-in error bound checker which trims the digits it's unsure of. Don't really know how they do it, but it means I can trust the fx-991W Simpson integration, but not the Sharp EL-W516X Simpson integration.

I guess though if you are going through this much effort, you might as well just integrate the equation and solve it yourself, but this is a cool idea. Would love to be able to somehow automate a general algorithm on the EL-W516X, though without programability I'm not sure it is possible, and for the graphing calculators I have that can, they have Gauss-Kronrod algorithms removing much of the point of it.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Sharp EL-W506T vs. Sharp EL-W516T - Mjim - 01-31-2020 12:21 AM



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