Triple integers (cylindrical method)

조회 수: 6 (최근 30일)
Ibraheem
Ibraheem 2022년 11월 6일
편집: Torsten 2022년 11월 6일
I am trying to write a code for a triple integral with function of r (radius) t (theta) z
xy/2 <= z <= (x^2+2y^2) 1/2
x = rcos theta
y = r sin theta
r^2sin(theta)*cos(theta) <= z <= r^2 cos^2 theta + 2*r^2 sin^2 theta
0<= r <= 1
0 <= theta <= pi/2
I tried this to get my answer
%%% computing the integral to find the actual volume of the region
% we know our theta (t) is bounded by 0 and pi/2
% we know the radius is bounded by 0 and 1
syms r t z
theta = t;
x = @(r,t) r*cos(t);
y = @(r,t) r*sin(t);
zmin = @(x,y) x*y/2;
zmax = @(x,y) sqrt (x.^2+2*y.^2);
rmin = 0;
rmax = x.^2 + y.^2 ==1;
% rmax is 1
% since we are finding the volume with triple integral the function would
% be 1
fun = @(z,r,t) r
volumee = integral3(fun,zmin,zmax,0,1,0,pi/2)
I am trying to get this
  댓글 수: 1
Ibraheem
Ibraheem 2022년 11월 6일
No matter what i do i keep geting an error

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

채택된 답변

Torsten
Torsten 2022년 11월 6일
편집: Torsten 2022년 11월 6일
lower_z = @(r,theta) 0.5*r.^2.*sin(theta).*cos(theta);
upper_z = @(r,theta) r.*sqrt(cos(theta).^2+2*sin(theta).^2);
fun = @(r,theta,z) r;
value = integral3(fun,0,1,0,pi/2,lower_z,upper_z)
value = 0.5742

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by