evaluate the double integration

조회 수: 5 (최근 30일)
john
john 2022년 9월 20일
댓글: john 2022년 9월 20일
May I know I would like to evaluate the double integral of the function and why this error happens and how do I perform the integration?

채택된 답변

Abolfazl Chaman Motlagh
Abolfazl Chaman Motlagh 2022년 9월 20일
You got 2 things wrong (i think) . the error you currently get is for second one. but you will get the error for first one eventually.
first, upper limit of integral shouldn't be function of variable a. because in that case the result of integral would be function of a.
and the other problem is in integral2 function the integration over y (second argument) is first integration so you should change the orders.
syms r theta;
a = 1; %%%%%%%%%%%%%%%%%%%%%%%%
theta_u = -(pi/2);
theta_v = pi/2;
r_u = 0;
r_v = @(theta) (a*cos(theta));
y = @(theta,r) (4 * r.^2 .* cos(theta));
integral2(y,theta_u,theta_v,r_u,r_v)
ans = 1.5708
  댓글 수: 1
john
john 2022년 9월 20일
thanks! you solved the problem

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by