This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: a) Standard Trapezoidal rule, with 2 function evaluations. b) Trapezoidal rule with 3 function evaluations. c) Simpon’s rule with 3 function evaluations. d) Two point Gaussian quadrature. The exact integral is approximately 0.83. How do you explain the differences between the 4 results above? 4. Consider the function f(x) = sqrt(x) * log(x) for x > 0 , and let f(0) = 0 . Implement code to calculate the integral of this function in the interval (0,1) using each of the following numerical methods: a) Adaptive quadrature, using the trapezoidal rule, until a relative precision of 10-5 is reached. b) Adaptive quadrature, using Simpson’s rule, until a relative precision of 10-5 is reached. c) Four point Gaussian quadrature. How many function evaluations where required in each case?...
View Full Document
This note was uploaded on 12/26/2011 for the course BIO 615 taught by Professor Abecasis during the Fall '10 term at University of Michigan.
- Fall '10