numerical double integration, Exercises of Numerical Methods in Engineering

analytical and numerical integration of a double integral

Typology: Exercises

2016/2017

Uploaded on 12/06/2017

anil-horasan
anil-horasan 🇹🇷

1 document

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
clc, clear all
format long
%% part a
syms x y
I=int(int(log(y*y*x)*cos(exp(x^(1/2)))/(x*x*y*y*y+5),x,y,-y*y+4*y-2),y,1,2);
% We have obtained an analytical result. I is a symbolic number.
If=double(I) % Converting I to double-precision floating-point number
%% part b
% change variables to use integral2 function
f = @(x,y) log(x.^2.*y).*cos(exp(y.^(1/2)))./(y.^2.*x.^3+5);
ymin=@(x) x;
ymax=@(x) -x.^2+4*x-2;
xmin=1;
xmax=2;
In=integral2(f,xmin,xmax,ymin,ymax,'Method','iterated')

Partial preview of the text

Download numerical double integration and more Exercises Numerical Methods in Engineering in PDF only on Docsity!

clc, clear all format long

%% part a syms x y I=int(int(log(yyx)cos(exp(x^(1/2)))/(xxyyy+5),x,y,-yy+4*y-2),y,1,2); % We have obtained an analytical result. I is a symbolic number. If=double(I) % Converting I to double-precision floating-point number

%% part b % change variables to use integral2 function f = @(x,y) log(x.^2.y).cos(exp(y.^(1/2)))./(y.^2.x.^3+5); ymin=@(x) x; ymax=@(x) -x.^2+4x-2; xmin=1; xmax=2; In=integral2(f,xmin,xmax,ymin,ymax,'Method','iterated')