I am trying to integrate x^3/(exp(x)-1)
in the limit 0 to infinity with respect to x,and it should answer pi^4/15
but it instead of this ocatve is printing original integral in symbolic form. How to resolve this issue? I tried same integral on MATLAB mobile and it is giving correct pi^4/15
Asked
Active
Viewed 1,805 times
0
1 Answers
1
First of all:
pi^4 / 15 = 6.4939
I tried the below code in octave online
fun = @(x) (x.^3)./(exp(x)-1);
q = integral(fun, 0, Inf)
The answer is:
q = 6.4939

Ahmet
- 7,527
- 3
- 23
- 47
-
But why this code is not working? syms x ; int(x^3/(exp(x)-1),0,inf) – Barry Aug 10 '20 at 16:55
-
From 0 to Inf, you want to calculate each variable value, i.e. from 0 to Inf calculate the integral based on the formula. To achieve this, you need to do an element-wise calculation. An element-wise calculation syntax is `.` You missed dots between the operations. So the correct formula is (x.^3) ./ (exp(x) - 1) – Ahmet Aug 10 '20 at 18:14