フィルターのクリア

How do you integrate a very long equation on MATLAB?

2 ビュー (過去 30 日間)
JingChong Ning
JingChong Ning 2022 年 9 月 9 日
回答済み: Star Strider 2022 年 9 月 9 日
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 = 

回答 (2 件)

David Hill
David Hill 2022 年 9 月 9 日
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 2022 年 9 月 9 日
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
.

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by