Question: PLEASE USE MATLAB AND MAKE CODE COPYABLE Gauss - Legendre Consider the following integral. f ( x ) = - 2 3 - 0 .
PLEASE USE MATLAB AND MAKE CODE COPYABLE
GaussLegendre
Consider the following integral.
a Plot the function integrand over the interval. Include a solid black line for the axis do not
use the grid function You may need to use the axis function to make sure that the axis
line is visible.
b Calculate the exact value of the integral in MATLAB. Use an fprint f statement to print
your answer with digits after the decimal point.
c Use the threepoint GaussLegendre method to calculate the integral of the function. Show
all the steps in the method in your code. Do not use any functions you have written or the
builtin integration functions. Use an fprint f statement to print the result with digits
after the decimal point.
d Why is the true error nonzero for the GaussLegendre method? Explain in text.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
