how can i implement integralN (given by Sir Mike Hosea)

조회 수: 7 (최근 30일)
Sourav Kumar
Sourav Kumar 2018년 1월 13일
답변: Star Strider 2018년 1월 14일
sir, i want to evaluate multiple integration of f(x,y,z,w)= xyzw w.r.t dxdydzdw from x=0 to 1 ,y=0 to 1 ,z=0 to 1 and w=0 to 1 ;by using integralN.m (given by Sir Mike Hosea) so how can i do so?

답변 (2개)

Birdman
Birdman 2018년 1월 13일
편집: Birdman 2018년 1월 13일
Why don't you try the following instead?
syms f(x,y,z,w)
f=x*y*z*w;
fX=int(f,x,0,1)
fY=int(fX,y,0,1)
fZ=int(fY,z,0,1)
fW=int(fZ,w,0,1)
or
syms f(x,y,z,w)
f=x*y*z*w;
res=int(int(int(int(f,x,0,1),y,0,1),z,0,1),w,0,1)
  댓글 수: 1
Sourav Kumar
Sourav Kumar 2018년 1월 14일
thanks Birdman, but for function like f(x,y,z,w)= 1/((x^x)*(y^y)*(z^z)(w*w)),your process will not be applicable; e.g: multiple integration of f(x,y,z,w)= 1/((x^x)*(y^y)*(z^z)(w*w)) w.r.t dxdydzdw from x=1 to 2 ,y=1 to 2 ,z=1 to 2 and w=1 to 2. so how will i evaluate its value?

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


Star Strider
Star Strider 2018년 1월 14일
This takes forever and may not converge (I did not let it complete), but at least appears to run:
f = @(x,y,z,w) 1./((x.^x).*(y.^y).*(z.^z).*(w.*w));
f1 = @(y,z,w) integral(@(x) f(x,y,z,w), 1, 2, 'ArrayValued',1);
f2 = @(z,w) integral(@(y) f1(y,z,w), 1, 2, 'ArrayValued',1);
f3 = @(w) integral(@(z) f2(z,w), 1, 2, 'ArrayValued',1);
Q = f3([1 2]);
Result = integral(f3, 1, 2, 'ArrayValued',1);
I will leave it for you to experiment with.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by