Unable to find explicit solution
3 ビュー (過去 30 日間)
古いコメントを表示
How can I get around this problem, it looks like Matlab is unable to solve the analytical expression. I need to express b in terms of other symbolic variables.
%% Symbolic variables
syms h1 h2 b k r_1
V3=((-2*b*h2^2+4*b*h1*h2-2*b*h1^2)*r_1^2+sqrt(-h2^2+(2*h1-2*b)*h2-h1^2+2*b*h1)*((6*b^2*asin((h2-h1+b)/b)-3*pi*b^2)*k*r_1+(3*pi*b^2-6*b^2*asin((h2-h1+b)/b))*k^2)+(-2*b*h2^2+(4*b*h1-12*b^2)*h2-2*b*h1^2+12*b^2*h1)*k*r_1+(4*b*h2^2+(12*b^2-8*b*h1)*h2+4*b*h1^2-12*b^2*h1)*k^2)/(6*h2^2+(12*b-12*h1)*h2+6*h1^2-12*b*h1);
solx = solve(V3, b);
0 件のコメント
採用された回答
John D'Errico
2023 年 11 月 2 日
It is not just that MATLAB could not solve it. In fact, it is trivially easy to write down equations where there is no algebraic solution possible, and it can be proved that no such solution can ever be written down.
This problem easily moves into that domain, where I can be quite confident that no solution could be found. Only if you have numerical values for ALL of the other parameters will you be able to find a solution, and even then, it is highly likely that no analytical solution will exist. As well, it is also likely that multiple solutions exist, IF you had numerical values for all of the other parameters.
For example, I'll pick some random values for all of the parameters.
syms b
h1 = rand
h2 = rand
k = rand
r_1 = rand
V3=((-2*b*h2^2+4*b*h1*h2-2*b*h1^2)*r_1^2+sqrt(-h2^2+(2*h1-2*b)*h2-h1^2+2*b*h1)*((6*b^2*asin((h2-h1+b)/b)-3*pi*b^2)*k*r_1+(3*pi*b^2-6*b^2*asin((h2-h1+b)/b))*k^2)+(-2*b*h2^2+(4*b*h1-12*b^2)*h2-2*b*h1^2+12*b^2*h1)*k*r_1+(4*b*h2^2+(12*b^2-8*b*h1)*h2+4*b*h1^2-12*b^2*h1)*k^2)/(6*h2^2+(12*b-12*h1)*h2+6*h1^2-12*b*h1);
vpa(V3,4)
It is still an ungodly mess. See that b appears inside and outside of square roots, It apears both inside and outside of asin. Not ever going to have a solution.
fplot(V3)
So it appears, for this set of random parameters, that a solution exists for b a little less that zero. But that changes when I randomly allow the parameters to change.
Just wanting something to exist does not make it happen, no matter how badly you want that. I recall an old saying: "If wishes were horses, beggars would ride."
0 件のコメント
その他の回答 (1 件)
Torsten
2023 年 11 月 2 日
移動済み: Torsten
2023 年 11 月 2 日
An analytical expression for b as a function of the other variables is impossible to find. If you give numerical values to the other parameters, "fzero" or "fsolve" might be able to find a numerical solution for b as a solution of the equation
V3 - right-hand side = 0.
1 件のコメント
Dyuman Joshi
2023 年 11 月 2 日
solve() can be used to obtain a (symbolic) numerical value for b as well.
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

