Solving erf(1.00) with Trapezoid Rule (n=6)

  • Thread starter Thread starter elemental_d
  • Start date Start date
  • Tags Tags
    Trapezoid
elemental_d
Messages
2
Reaction score
0
http://en.wikipedia.org/wiki/Error_function

If you have erf(1.00) and are asked to solve for the approximate value by using the trapezoid rule with n=6, how would you go about doing so?

Since the function is erf(x) the 'x' goes into the limits of integration but a 't' is used as a variable in the actula function. How do you know what to use for 'u'. Do you simply treat the function as an integral from 0 to 1 and evauluate 'u' from 0 to 1 as well?

thanks for any help?
 
Physics news on Phys.org
Basically the question is asking to approximate the definite integral:

\frac{2}{\sqrt{\pi}}\int_0^1 e^{-x^2} dx

They want you to do it with the trapezoidal rule. Basically construct 6 trapeziums, each with a width of 1/6. The height of the left side of the trapezium should be the same as e^{-x^2} at that point, and the height of the right side should do the same for its point.

Eg The First trapezium Will have a base from 0 to 1/6. At 0, e^{-x^2}=1. So the height at that point should be 1. At the other side of the trapezium, 1/6, sub in 1/6 into e^{-x^2}, and that's the height at that point. You have the two heights of the trapezium, and a base length, now you can find the area.

Repeat for the other 5 trapeziums.
 
Back
Top