Skip to content

Instantly share code, notes, and snippets.

@mick001
Created August 29, 2015 10:52
Show Gist options
  • Save mick001/64053deb77379173a16e to your computer and use it in GitHub Desktop.
Save mick001/64053deb77379173a16e to your computer and use it in GitHub Desktop.
# Output
# >>> ================================ RESTART ================================
# >>>
# Actual area: 5208.333333333333
#
# Approximating using rectangular rule...
# Percentage error: -0.0104123281966 %
# Approximation: (5207.7910245730936, -0.010412328196596356)
#
# Approximating using trapezoidal rule...
# Percentage error: 0.0208246563932 %
# Approximation: (5209.4179508538109, 0.020824656393175246)
# #############################################################
# Approximating using rectangular rule with: 15 points, percentage error: -1.5625 %
# Approximating using rectangular rule with: 25 points, percentage error: -0.127551020408 %
# Approximating using rectangular rule with: 35 points, percentage error: -0.0434027777778 %
# 5206.07277199
# Approximating using trapezoidal rule with: 15 points, percentage error: 3.125 %
# Approximating using trapezoidal rule with: 25 points, percentage error: 0.255102040816 %
# Approximating using trapezoidal rule with: 35 points, percentage error: 0.0868055555556 %
# Approximating using trapezoidal rule with: 45 points, percentage error: 0.0432525951557 %
# 5210.58607266
# >>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment