Calculate double integrate of sin
조회 수: 2 (최근 30일)
이전 댓글 표시
I want to calculate this:

But I can't write it correctly. I get the gamma function all the time.
It seems to be something like this:
syms theta rho n
f = sin(rho)^(n + 2)*sin(theta)^(n + 1)
I1 = int(f,rho,0,pi)
I2 = int(I1,theta,0,pi)
But the answer is:
(2*2^(2*n)*gamma(n/2)^2*gamma(n/2 + 1/2)^2*(n/2 + 1/2)^2)/(gamma(n)^2*(n + 1)^2*(n + 2))
When, i hope the return was:
2pi/n+2
Thanks in advance.
댓글 수: 1
Sam Chak
2024년 1월 31일
@Ana Laura, Erm... I believe the Gamma Γ symbols (not gamma γ) are the Gamma function. I don't use it often, but I encountered it in the Riemann zeta function.
답변 (1개)
Dyuman Joshi
2024년 1월 31일
편집: Dyuman Joshi
2024년 1월 31일
syms theta rho n
f = sin(rho)^(n + 2)*sin(theta)^(n + 1);
I1 = int(f,rho,0,pi);
I2 = int(I1,theta,0,pi)
%Output
out = simplify(I2)
댓글 수: 2
Torsten
2024년 1월 31일
You can also write the double integral as the product of two one-dimensional integrals:
syms rho n
f = int(sin(rho)^(n + 2),rho,0,pi)*int(sin(rho)^(n + 1),rho,0,pi)
simplify(f)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

