フィルターのクリア

Why does my code get stuck when trying to convert a double integral into a double?

1 回表示 (過去 30 日間)
syms x y z
f(x,y) = sqrt(1+((4*y)/(121*sqrt((4*x^2)/121 + (4*y^2)/121))^2)+((4*x)/(121*sqrt((4*x^2)/121 + (4*y^2)/121))^2))
minX= -sqrt(220.523)
maxX= sqrt(220.523) %input("Limite superior de X:")
intX = int(f,x,minX,maxX)
minY= -sqrt(220.523-x^2) %input("Limite inferior de Y:")
maxY= sqrt(220.523-x^2) %input("Limite superior de Y:")
intY = int(f,y,minY,maxY)
integralDobleTipoUno = int(intY,x,minX,maxX)
integralDobleTipoDos= int(intX,y,minY,maxY)
var = double(integralDobleTipoUno)
When reaching "var", it loads forever

採用された回答

Walter Roberson
Walter Roberson 2023 年 5 月 4 日
if you are after the numeric solution then switch to vpaintegral()
  8 件のコメント
Guillermo
Guillermo 2023 年 5 月 5 日
編集済み: Guillermo 2023 年 5 月 5 日
Crazy to think evven my CPU can make a difference, although it makes sense. Anyhow, thank you so much!
Walter Roberson
Walter Roberson 2023 年 5 月 5 日
format long g
syms x y z
magic_number = sym(220523)/1000;
f(x,y) = sqrt(1+((4*y)/(121*sqrt((4*x^2)/121 + (4*y^2)/121))^2)+((4*x)/(121*sqrt((4*x^2)/121 + (4*y^2)/121))^2));
maxX = sqrt(magic_number); %input("Limite superior de X:")
minX = -maxX;
intX = int(f,x,minX,maxX);
maxY = sqrt(magic_number-x^2); %input("Limite superior de Y:")
minY = -maxY;
intY = int(f,y,minY,maxY);
Sf = simplify(f, 'steps', 50)
Sf(x, y) = 
Tx = 0; Ty = -1/200;
combine(subs(maxY, x, Tx))
ans = 
That tells us that for x = 0, that y = -1/200 is well within range
temp = simplify(limit(f, x, Tx), 'steps', 50)
temp(y) = 
y_bound = solve(children(temp, 1))
y_bound = 
limit(limit(f, x, Tx), y, Ty)
ans = 
but we got a complex-valued result.
This tells us that the complex component we got was not an accident: there is a range of values where f goes complex.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumber Theory についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by