Numerical Integration in Matlab

2 次查看(过去 30 天)
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.

请先登录,再进行评论。

更多回答(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