Numerical Integration in Matlab

1 Ansicht (letzte 30 Tage)
Raj Patel
Raj Patel am 3 Okt. 2020
Kommentiert: Ameer Hamza am 4 Okt. 2020
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.

Akzeptierte Antwort

Ameer Hamza
Ameer Hamza am 3 Okt. 2020
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 Kommentare
Raj Patel
Raj Patel am 4 Okt. 2020
Thanks Ameer. It helped me. Appreciate your efforts.
Ameer Hamza
Ameer Hamza am 4 Okt. 2020
I am glad to be of help!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 3 Okt. 2020
integral(fun,0,683)
  1 Kommentar
Ameer Hamza
Ameer Hamza am 3 Okt. 2020
An alternative by rearranging the terms
fun = @(x) (x.^4) ./ (exp(x).*(1 - 1./exp(x)).^2 );
integral(fun, 0, inf)

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by