trapsimp

trapsimp - Week 7 Upper/Lower sums Trapezoidal rule...

This preview shows pages 1–12. Sign up to view the full content.

Week 7 - Upper/Lower sums ? - Trapezoidal rule - Simpson's rule - Adaptive Simpsons

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Upper and Lower sums Are silly
f(1) = 1, f(2) = 2, f(4) = -2

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Upper Bound [1,2] = [2,4] = M (x - x ) 2 1 U(f;P) = ∑ i=0 n-1 M (x - x ) i i+1 i M (x - x ) 2 3 2 2(2 - 1) 1 2(4 - 2) U(f;P) = 2 + 4
f(1) = 1, f(2) = 2, f(4) = -2

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Lower Bound [1,2] = [2,4] = m (x - x ) 2 1 L(f;P) = ∑ i=0 n-1 m (x - x ) i i+1 i m (x - x ) 2 3 2 1(2 - 1) 1 -2(4 - 2) L(f;P) = 1 - 4
f(1) = 1, f(2) = 2, f(4) = -2

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
f(1) = 1, f(2) = 2, f(4) = -2
Trapezoid rule ∫f(x) dx ½∑(x - x )[f(x ) + f(x )] ~ ~ i+1 i i i+1 n-1 i=0 ½{(x 1 -x 0 )*[f(x 0 )+f(x 1 )] + (x 2 -x 1 )*[f(x 1 )+f(x 2 )]} = ½{(2-1)*[1+2] +(4-2)*[2+(-2)]} = 3/2

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Composite Trapezoid rule [f(a)+f(b)+2*∑f(a+ih) ∫f(x)dx h 2 a b ∫x = 4 1 2 Real Answer: 6.200000 h = 0.1 i=1 n-1 1/20[1 4 +2 4 + 2*(1.1 4 +1.2 4 +1.3 4 +1.4 4 + 1.5 4 +1.6 4 +1.7 4 +1.8 4 +1.9 4 )] =6.223330
Trapezoid rule error ∫x 4 1 2 Real error: 0.023330 h = 0.1 |Error| = -1/12 * (b-a) * h 2 * f''(ζ) b=2, a=1 f''(x) = 12x 2 |Error| < 1/12 * (2-1) * 0.1 2 * 12(2) 2 |Error| < 0.04

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 25

trapsimp - Week 7 Upper/Lower sums Trapezoidal rule...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online