approxint1 - INTEGRATION > f1:=sqrt(1-x)/x; f1 := 1 - x...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: INTEGRATION > f1:=sqrt(1-x)/x; f1 := 1 - x x > int(f1,x); 2 1 - x + ln 1 - x- 1 ( ) - ln 1 - x + 1 ( ) > f2:=tan(x)^3*sec(x)^11; f2 := tan x ( ) 3 sec x ( ) 11 > g2:=int(f2,x); g2 := sin x ( ) 4 13 cos x ( ) 13 + 9 sin x ( ) 4 143 cos x ( ) 11 + 7 sin x ( ) 4 143 cos x ( ) 9 + 5 sin x ( ) 4 143 cos x ( ) 7 + 3 sin x ( ) 4 143 cos x ( ) 5 + sin x ( ) 4 143 cos x ( ) 3- sin x ( ) 4 143 cos x ( )- 1 143 sin x ( ) 2 cos x ( ) - 2 143 cos x ( ) > h2:= sec(x)^13/13-sec(x)^11/11; h2 := 1 13 sec x ( ) 13- 1 11 sec x ( ) 11 > simplify(h2-g2); APPROXIMATE INTEGRATION (1) Left endpoint and Right endpoint approximation > DELTAX:=(a,b,n)->(b-a)/n; DELTAX := a , b , n ( ) b- a n > XK:=(a,b,n,k)->a + DELTAX(a,b,n)*k; XK := a , b , n , k ( ) a + DELTAX a , b , n ( ) k > LEFTEND:=(f,a,b,n)->DELTAX(a,b,n)*add(f(XK(a,b,n,k)),k=0..n-1); LEFTEND := f , a , b , n ( ) DELTAX a , b , n ( ) add f XK a , b , n , k ( ) ( ), k = 0 .. n- 1 ( ) ( ) > ERRORLEFT:=(f,a,b,n)->evalf( int(f(x),x=a..b) - LEFTEND(f,a,b,n)); ERRORLEFT := f , a , b , n ( ) evalf a b f x ( ) dx- LEFTEND f , a , b , n ( ) > RIGHTEND:=(f,a,b,n)->DELTAX(a,b,n)*add(f(XK(a,b,n,k)),k=1..n); RIGHTEND := f , a , b , n ( ) DELTAX a , b , n ( ) add f XK a , b , n , k ( ) ( ), k = 1 .. n ( ) ( ) > ERRORRIGHT:=(f,a,b,n)->evalf( int(f(x),x=a..b) - RIGHTEND(f,a,b,n)); ERRORRIGHT := f , a , b , n ( ) evalf a b f x ( ) dx- RIGHTEND f , a , b , n ( ) EXAMPLE > f:=x->1/x; f := x 1 x > f(x); 1 x > f(2); 1 2 > plot(f(x),x=1..2); > LEFTEND(f,1,2,3); 47 60 > ERRORLEFT(f,1,2,3);-0.0901861527 > RIGHTEND(f,1,2,3); 37 60 > ERRORRIGHT(f,1,2,3); 0.0764805139 MIDPOINT RULE > XBARK:=(a,b,n,k)->1/2*(XK(a,b,n,k-1)+XK(a,b,n,k)); XBARK := a , b , n , k ( ) 1 2 XK a , b , n , k- 1 ( ) + 1 2 XK a , b , n , k ( ) > MIDPOINTRULE:=(f,a,b,n)->DELTAX(a,b,n)*add(f(XBARK(a,b,n,k)),k=1..n); MIDPOINTRULE :=...
View Full Document

This note was uploaded on 06/03/2011 for the course MAC 2312 taught by Professor Bonner during the Spring '08 term at University of Florida.

Page1 / 7

approxint1 - INTEGRATION > f1:=sqrt(1-x)/x; f1 := 1 - x...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online