Azzera filtri
Azzera filtri

How do you integrate a very long equation on MATLAB?

2 visualizzazioni (ultimi 30 giorni)
I have a very long equation (yuse*p) that I need to integrate over. However, as you can see, the code is not returning my values, just regurgitate whatever I input in it. Could you guys help me find a way to integrate it?
syms x
y = 0.5+x^0.6532;
%incremental surface
yuse = sqrt(1+(diff(y))^2);
%pressure along the nozzle wall
p = 7.593*x^6 - 231*x^5 + 2316.1*x^4 - 10644*x^3 + 21966*x^2 - 16304*x + 1000000;
%integrate
int(yuse*p,0,10)
ans = 

Risposte (2)

David Hill
David Hill il 9 Set 2022
Numerical integration.
p=@(x)(7.593*x.^6 - 231*x.^5 + 2316.1*x.^4 - 10644*x.^3 + 21966*x.^2 - 16304*x + 1000000).*...
sqrt(1+2666689./(6250000*x.^(867/1250)));
I=integral(p,0,10)
I = 9.6221e+06

Star Strider
Star Strider il 9 Set 2022
Use the vpaintegral function —
syms x
y = 0.5+x^0.6532;
%incremental surface
yuse = sqrt(1+(diff(y))^2);
%pressure along the nozzle wall
p = 7.593*x^6 - 231*x^5 + 2316.1*x^4 - 10644*x^3 + 21966*x^2 - 16304*x + 1000000;
%integrate
Value = vpaintegral(yuse*p,0,10)
Value = 
9622050.0
.

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by