Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a function named gaussRule ( f , a , b , c , d ) . The function takes a bivariate function f ,
Create a function named gaussRulef a b c d The function takes a bivariate function represented as an anonymous function, and the numbers a b c defining the rectangle The function should calculate the integral of function over the given rectangle using the Gauss quadrature rule with three points, as presented in
Write a function named nIntegral f ab cd k h This function, similar to the previous one, takes a twovariable function represented as an anonymous function. Additionally, it takes two twoelement vectors and in which the intervals and are stored, respectively. Furthermore, it takes two natural numbers, and The function should calculate the integral of the function over the rectangle using a composite Gaussian rule with three points. This means the function should divide the interval into subintervals and the interval into subintervals. Then, on each smaller rectangle, apply the rule sum the results, and return an estimate for the integral
Let
where in are the last two digits of your enrolment number. Plot the graph of function on the rectangle Then numerically compute the integral
using the built in function integral On how many subdivisions should we divide the interval and on how many interval so that the composite Gauss rule with three points gives a result that differs by less than from the result obtained with the builtin function integral
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started