Not having Integration result
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mohammad Humaun Kabir
am 27 Mai 2022
Kommentiert: Torsten
am 27 Mai 2022
I am trying to integrate this function using the code -
----------------
syms x
xd = 700/319
fun = ((x^4)* exp(x))/((exp(x) -1)^2);
cv = int(fun,0,xd)
--------------
But, I am getting same form of the function like that -
>> Cv_calculatior
cv =
int((x^4*exp(x))/(exp(x) - 1)^2, x, 0, 700/319)
What's wrong here??
0 Kommentare
Akzeptierte Antwort
Torsten
am 27 Mai 2022
Bearbeitet: Torsten
am 27 Mai 2022
Using "int", MATLAB tries to find an analytical antiderivative for your function, but cannot find one.
Use numerical integraion using "integral" instead. Don't start at 0 since your function has a division by zero at this location.
fun = @(x) x.^4.*exp(x)./(exp(x) -1).^2;
xd = 700/319;
result = integral(fun,1e-16,xd)
2 Kommentare
Torsten
am 27 Mai 2022
fun = @(x) x.^4.*exp(x)./(exp(x) -1).^2;
T = [1e-16,2:2:800];
y(1) = 0;
for i = 2:numel(T)
y(i) = y(i-1) + integral(fun,T(i-1),T(i));
end
plot(T,y)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Calculus 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!