切割式積分──數值逼近法
原本的積分,是把被積分函式f(x) 的參數x 切到最小塊,我們稱之為dx。
微分公式裡,我們說f'(x) = lim(h→0) (f(x + h) - f(x)) / h。h 趨近於0,其實就是dx 的概念,因為h 就是切割的寬。
如果我們希望得到函式f(x) 在某一個區間與x 軸圍出的面積並取近似值,我們可以試著把切割的寬拉大一點,變成以一個一個矩形來拼湊該函式的面積。
]known.. f(x) = x^2 - 10
]Find.. Between 5 to 299, A_f
]f'(x) ≒ lim(h→1) (f(x + h) - f(x)) / h //(h→1) 正表示我們把她以1 為單位切割開來。
]A_f = Sigma(k = 5 to 299, lim(h→1) (f(k + h) - f(k)) / h)
]with k - 1 kill f(k) / h ...((1
]with k + 1 kill f(k + h) / h ...((1
]((1 speed = Sigma(k = 5 to 299, lim(h→1) (f(k + h) - f(k)) / h) = f(5) / 1 + f(299 + 1) / 1 = 15 + 89990 = 90005
我們也可以試著切割成非1 的單位。
]known.. f(x) = x^4
]Find.. Between -5 to 5, A_f
]f'(x) ≒ lim(x→5) (f(x + h) - f(x)) / h //每一份都是以5 為單位,可見能信度不高。
]A_f = Sigma(k = -5 to 5 step 5, lim(h→5) (f(k + h) - f(k)) / h)
]with k - 5 kill f(k) / h ...((1
]with k + 5 kill f(k + h) / h ...((1
]((1 speed = Sigma(k = -5 to 5 step 5, lim(h→5) (f(k + h) - f(k)) / h) = f(-5) + f(5 + 5) = 625 + 10000 = 10625