Trapeziodal & Simpson's (1 Viewer)

Brontecat

Member
Joined
Oct 21, 2008
Messages
784
Location
where i live
Gender
Female
HSC
2010
I just can't remember how to do Simpson's and Trapeziodal questions. It would be really helpful if somebody could please go through at least one of these questions step by step.

Trapeziodal Question
Use the trapeziodal rule with four function values to find an approximation to the indefinite integral 2^(x+1) bound by 4 and 1

Simpson's Question
Consider the function y=cotx

i) Complete the values of y: (this is a table)
x | pi/4 | 5pi/16 | 3pi/8 | 7pi/a6 | pi/2
y

ii) Apply Simpson's rule with 5 function values to find an approximation to the indefinite integral of cotx bound by pi/2 and pi/4

Thanks :D
 

Drongoski

Well-Known Member
Joined
Feb 22, 2009
Messages
4,249
Gender
Male
HSC
N/A
I'll illustrate both with the 2nd question


Call the values of y = cot x at the 5 equally-spaced x-values: y1, y2 y3, y4 and y5

.: the equal intervals h = (pi/2 - pi/4)/4 = pi/16 (remember only 4 intervals)

Then the required integral is approximated by:

Simpson's Rule:

h/3 { (1 y1 + 4 y2 + 1y3) + (1 y3 + 4 y4 + 1 y5) } = h/3{ 1 y1 + 4 y2+ 2 y3 + 4 y4 + 1 y5}


Trapezoidal Rule:

h/2{ (y1 + y2) + (y2+y3) + (y3+y4) + (y4+y5) } = h/2{ y1 + 2y2 + 2y3 + 2y4 + y5 }


Note that the function values are taken @ x = 4 pi/16, 5 pi/16, 6 pi/16, 7 pi/16 and 8 pi/16

Remember:

i) Simpson's and Trapezoidal's are numerical methods for finding integrals; in practice such approx would be done over 50 ( or way more) number of points to get more accurate values. For an HSC exam they can only test you over, maybe, at most 7 points. because you have only maybe 10 mins to do such questions.

ii) For Trapezoidal, you have min 2 points; Approx is therefore over 2, 3, 4, 5, . . . points

iii) For Simpson's, min is 3 points. So you do it over 3, 5, 7, . . . (i.e. 2n+1) points

iv) Because you are dealing with very few points, I personally find it useful to apply Trapezoidal as a sequence of: (1 + 1) + (1 + 1) + . . . + (1+1) function values. For Simpson's, as a sequence of: (1 + 4 + 1) + . . . . + (1 + 4 + 1) function values. Don't forget to multiply for Trapezoidal by h/2 and for Simpson's h/3. Instead of memorising the formulae for h, h is simply the full width divided by the number of interval (= no of points - 1).

v) Be careful: sometimes you are asked to do Simpson's over only 3 points (the bare minimum). You apply the weighting 1: 4: 1 and you are done. If you memorize the rule as, say: h/3{ 1 x end values + 4 x evens + 2 x odds } or whatever, you may, if you have not done this special case before, panic over where your evens and odds are.
 
Last edited:

mirakon

nigga
Joined
Sep 18, 2009
Messages
4,222
Gender
Male
HSC
2011
Remember h= (b-a)/n where b and a are the bounds of the area and n is the number of intervals (which is one less than the number function values. For example if you want 5 function values between x=2 and x=6 then h= (6-2)/4=1. So h in this case is equal to 1.

Simpson rule:

h/3(y0+4(y1+y3... all y such that subscript is odd)+2(y2+y3... all y such that subscript is even)+yn)

Trapezoidal Rule:

h/2(y0 +2(all other y) +yn)

Hope I helped.:cool:

 

Brontecat

Member
Joined
Oct 21, 2008
Messages
784
Location
where i live
Gender
Female
HSC
2010
thanks for the replies :)

i get the formulae, its just the implementing part that i'm still having trouble with, so if anybody could go through them explaining each step it would be really, really helpful :)
 

mirakon

nigga
Joined
Sep 18, 2009
Messages
4,222
Gender
Male
HSC
2011
Okay, my pleasure. As the Simpson's rule one is already accounted for (thanks Drongoski) I'll explain the Trapezoidal question.

The bounds are x=1 and x=4. There are 4 function values and therefore 4-1=3 intervals. Therefore h=(4-1)/3= (conveniently) 1

Now this means:
(The differences between functions is always equal to h) so y0=f(a) then y1=f(a+h) etc.

y0=f(1)=2^2=4
y1=f(2)=2^3=8
y2=f(3)=2^4=16
y3=f(4)=2^5=32

Sub these values into the formula h/2(y0 +2(all other y) +yn)

Area is approximately = 1/2(4+2(8+16)+32)

= 42 units squared.

Ans: 42 units squared

Hope I've helped.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top