Triple integers (cylindrical method)

4 ビュー (過去 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 Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by