필터 지우기
필터 지우기

Struggling with integration.

조회 수: 2 (최근 30일)
Przemyslaw Trzybinski
Przemyslaw Trzybinski 2020년 10월 27일
답변: Divija Aleti 2020년 10월 30일
How would I integrate this equation in matlab? V=∫pi*(R1+R2-sqrt(R2^2-x^2))^2 dx with limits -0.5D and 0.5D.
I have V, R2, and a height, D.
R1 is an unknown which I have to solve for.
What I've tried so far.
syms r1 r2 d x;
f= (pi()*(r1+r2-sqrt(r2^2-x^2))^2)
F = int(f, x)
G= int(F,r2)
a=int(F, x,0.5,-0.5)
  댓글 수: 2
John D'Errico
John D'Errico 2020년 10월 27일
Why have you written a DOUBLE integration, when your question shows a single integral?
Przemyslaw Trzybinski
Przemyslaw Trzybinski 2020년 10월 27일
편집: Przemyslaw Trzybinski 2020년 10월 27일
I saw a post when I was searching for a solution, where someone also had a single integration, but was advised to first calculate undefinite integral using variable y (in his case).
And then integrate again using x.
So would I simply use
syms x r1 r2
f= (pi()*(r1+r2-sqrt(r2^2-x^2))^2)
F = int(f, x, -0.5,0.5) ?

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

채택된 답변

Divija Aleti
Divija Aleti 2020년 10월 30일
Hi,
I understand that you have the values of 'R2', 'V' and 'D', and you have to solve the equation, 'V=∫pi*(R1+R2-sqrt(R2^2-x^2))^2 dx' to find the value of 'R1'.
Take a look at the following code which shows how to solve for 'R1'. The values of 'R2', 'V' and 'D' are assumptions I made.
syms x R1
R2=3;
D=4;
V=25;
f = pi*(R1+R2-sqrt(R2^2-x^2))^2;
fint = int(f,x,[-0.5*D 0.5*D]);
eqn=V-fint==0;
sol_R1=vpa(solve(eqn,R1));
For additional information on the functions used, have a look at the following links:

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by