Numerical Integration in Matlab

조회 수: 1 (최근 30일)
Raj Patel
Raj Patel 2020년 10월 3일
댓글: Ameer Hamza 2020년 10월 4일
I wanted to solve a numerical integral of the following equation:
fun = ((x.^4 .* exp(x))) ./ ((exp(x) - 1) .* (exp(x) - 1) );
The limits are from: 0 to Inf
Can anyone ehelp me here?
Thanks in advance.

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 10월 3일
If you have symbolic toolbox
syms x
y = ((x.^4 .* exp(x))) ./ ((exp(x) - 1) .* (exp(x) - 1) );
I = int(y, x, 0, inf)
Result
>> I
I =
(4*pi^4)/15
>> double(I)
ans =
25.9758
  댓글 수: 4
Raj Patel
Raj Patel 2020년 10월 4일
Thanks Ameer. It helped me. Appreciate your efforts.
Ameer Hamza
Ameer Hamza 2020년 10월 4일
I am glad to be of help!

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

추가 답변 (1개)

Walter Roberson
Walter Roberson 2020년 10월 3일
integral(fun,0,683)
  댓글 수: 1
Ameer Hamza
Ameer Hamza 2020년 10월 3일
An alternative by rearranging the terms
fun = @(x) (x.^4) ./ (exp(x).*(1 - 1./exp(x)).^2 );
integral(fun, 0, inf)

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

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by