dividing integrals using vpaintegral and syms

조회 수: 1 (최근 30일)
Opariuc Andrei
Opariuc Andrei 2020년 12월 14일
편집: Opariuc Andrei 2020년 12월 14일
i'm supposed to do this
and i wrote
syms x r
G=vpaintegral(x*r,0,1)/vpaintegral(r,0,1) % supposed to be approximately =0.45
Y=1/2*vpaintegral(r^2,0,1)/vpaintegral(r,0,1) % supposed to be approximately =0.43
a=0;b=1;
and the result displayed is
G =2.0*vpaintegral(r*x, x, 0, 1)
Y =0.33333333333333333391157449199227

채택된 답변

Alan Stevens
Alan Stevens 2020년 12월 14일
편집: Alan Stevens 2020년 12월 14일
If f(r) = r and you are integrating wrt r (implied by your yG integral) then x = r and xG = 2/3 and yG = 1/3. If you are expecting something different it means you haven't yet specified x in terms of r..
  댓글 수: 1
Opariuc Andrei
Opariuc Andrei 2020년 12월 14일
편집: Opariuc Andrei 2020년 12월 14일
oh,yeah , i forgot to define the r function . thx :) ,now it functions.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by