Question: 2 5 . 1 For the integral 0 2 1 5 x y 2 d y d x calculate the approximated values of integral (

25.1 For the integral 0215xy2dydx calculate the approximated values of integral (a) four-corners
method (by hand, but use a calculator and a lot of digits) using weight-matrix and formulas stated in the
class with m=5(numbers of grid on the x-axis) and n=4(number of grid on the y-axis)
(b) Find the percentage error of these approximations, using the exact value. (c) Then, Modify the local
function myDoubleIntegral. m to evaluate the integral using the four-corners method to evaluate
0215xy2dydx when (m,n)=(5,4),(m,n)=(10,8).
% myDoublelntegral.m local function is to evaluate function values of z=x2+y2
% along the x=0:5:10 and y=0:2:10.
% The ultimate goal is to evaluate the double integral of z over [0,10]x[0,10].
dx=5;
dy=2;
x=0:dx:10;
y=0:dy:10;
z=@(x,y)(x2+y2);
m= length (x);
n= length (y);
F=zeros(m,n);%m is the numbers of grid on the x-axis, n is the numbers of grid on the y-axis.
for j=1:n%j is the index of column
for i=1:m% is the index of row
F(i,j)=z(x(i),y(j));
end
end
u=2* ones (m,1);
v=2*ones (n,1);
u(1)=1;
u(m)=1;
v(1)=1;
v(n)=1;
A=u**v';
, "all");
I=T**dx**dy4
2 5 . 1 For the integral 0 2 1 5 x y 2 d y d x

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!