Error using mupadmex Error in MuPAD command: symbolic:sym:isAlways:LiteralCompare|0 < root(z^20 - (555455*z^19)/28224 + (21279533*z^18)/112896 - (524070713*z^17)/451584 + (331
1 回表示 (過去 30 日間)
古いコメントを表示
syms r;
eq = (3040*r^6 - 12432*r^4 + 18544*r^2 - 18592)^4 * sqrt(((1/2) + 1)^2 - r^2)^4 * sqrt(((1/2) - 1)^2 - r^2)^4 ...
- 2 * (3040*r^6 - 12432*r^4 + 18544*r^2 - 18592)^2 * (768*r^8 - 768*r^6 + 288*r^4 - 304*r^2 + 69)^2 ...
* sqrt(((1/2) - 1)^2 - r^2)^2 * sqrt(((1/2) + 1)^2 - r^2)^4 * r^4 ...
- 2 * (3040*r^6 - 12432*r^4 + 18544*r^2 - 18592)^2 * (768*r^8 - 6912*r^6 + 23328*r^4 - 35248*r^2 + 33081)^2 ...
* sqrt(((1/2) - 1)^2 - r^2)^4 * sqrt(((1/2) + 1)^2 - r^2)^2 * r^4 ...
+ (768*r^8 - 768*r^6 + 288*r^4 - 304*r^2 + 69)^4 * sqrt(((1/2) + 1)^2 - r^2)^4 * r^8 ...
- 2 * (768*r^8 - 768*r^6 + 288*r^4 - 304*r^2 + 69)^2 * (768*r^8 - 6912*r^6 + 23328*r^4 - 35248*r^2 + 33081)^2 ...
* sqrt(((1/2) + 1)^2 - r^2)^2 * sqrt(((1/2) - 1)^2 - r^2)^2 * r^8 ...
+ (768*r^8 - 6912*r^6 + 23328*r^4 - 35248*r^2 + 33081)^4 * sqrt(((1/2) - 1)^2 - r^2)^4 * r^8;
sol = solve(eq, r);
positive_solutions = sol(sol > 0);
disp(['q: ', num2str(length(positive_solutions))]);
0 件のコメント
採用された回答
Dyuman Joshi
2024 年 1 月 2 日
編集済み: Dyuman Joshi
2024 年 1 月 2 日
solve() is unable to find an explicit solution to the given equation, which is expected given the degree of the polynomial - on simplifying the equation, you can observe that the highest power is 40.
There is no known method to find explicit solution for a polynomial of that degree.
Also, you should update the condition to check for non-complex roots as well.
syms r;
eq = (3040*r^6 - 12432*r^4 + 18544*r^2 - 18592)^4 * sqrt(((1/2) + 1)^2 - r^2)^4 * sqrt(((1/2) - 1)^2 - r^2)^4 ...
- 2 * (3040*r^6 - 12432*r^4 + 18544*r^2 - 18592)^2 * (768*r^8 - 768*r^6 + 288*r^4 - 304*r^2 + 69)^2 ...
* sqrt(((1/2) - 1)^2 - r^2)^2 * sqrt(((1/2) + 1)^2 - r^2)^4 * r^4 ...
- 2 * (3040*r^6 - 12432*r^4 + 18544*r^2 - 18592)^2 * (768*r^8 - 6912*r^6 + 23328*r^4 - 35248*r^2 + 33081)^2 ...
* sqrt(((1/2) - 1)^2 - r^2)^4 * sqrt(((1/2) + 1)^2 - r^2)^2 * r^4 ...
+ (768*r^8 - 768*r^6 + 288*r^4 - 304*r^2 + 69)^4 * sqrt(((1/2) + 1)^2 - r^2)^4 * r^8 ...
- 2 * (768*r^8 - 768*r^6 + 288*r^4 - 304*r^2 + 69)^2 * (768*r^8 - 6912*r^6 + 23328*r^4 - 35248*r^2 + 33081)^2 ...
* sqrt(((1/2) + 1)^2 - r^2)^2 * sqrt(((1/2) - 1)^2 - r^2)^2 * r^8 ...
+ (768*r^8 - 6912*r^6 + 23328*r^4 - 35248*r^2 + 33081)^4 * sqrt(((1/2) - 1)^2 - r^2)^4 * r^8;
disp(simplify(eq))
sol = vpasolve(eq, r)
%Update the condition
positive_solutions = sol(real(sol) > 0 & imag(sol) == 0 );
disp(['q: ', num2str(length(positive_solutions))]);
その他の回答 (1 件)
Walter Roberson
2024 年 1 月 2 日
Your equality is equivalent to a polynomial of degree 20.
MATLAB is not able to find a closed form solution for the roots (which is not surprising -- theory says that degree 4 is the largest degree that can routinely be solved algebraically.) So MATLAB returns a form that "stands in" for the polynomial roots.
You then ask to reduce the solutions to the positive numbers. That requires being able to prove that particular solutions are positive... which is difficult when you cannot express the solutions explicitly.
2 件のコメント
Walter Roberson
2024 年 1 月 2 日
syms r;
eq = (3040*r^6 - 12432*r^4 + 18544*r^2 - 18592)^4 * sqrt(((1/2) + 1)^2 - r^2)^4 * sqrt(((1/2) - 1)^2 - r^2)^4 ...
- 2 * (3040*r^6 - 12432*r^4 + 18544*r^2 - 18592)^2 * (768*r^8 - 768*r^6 + 288*r^4 - 304*r^2 + 69)^2 ...
* sqrt(((1/2) - 1)^2 - r^2)^2 * sqrt(((1/2) + 1)^2 - r^2)^4 * r^4 ...
- 2 * (3040*r^6 - 12432*r^4 + 18544*r^2 - 18592)^2 * (768*r^8 - 6912*r^6 + 23328*r^4 - 35248*r^2 + 33081)^2 ...
* sqrt(((1/2) - 1)^2 - r^2)^4 * sqrt(((1/2) + 1)^2 - r^2)^2 * r^4 ...
+ (768*r^8 - 768*r^6 + 288*r^4 - 304*r^2 + 69)^4 * sqrt(((1/2) + 1)^2 - r^2)^4 * r^8 ...
- 2 * (768*r^8 - 768*r^6 + 288*r^4 - 304*r^2 + 69)^2 * (768*r^8 - 6912*r^6 + 23328*r^4 - 35248*r^2 + 33081)^2 ...
* sqrt(((1/2) + 1)^2 - r^2)^2 * sqrt(((1/2) - 1)^2 - r^2)^2 * r^8 ...
+ (768*r^8 - 6912*r^6 + 23328*r^4 - 35248*r^2 + 33081)^4 * sqrt(((1/2) - 1)^2 - r^2)^4 * r^8;
sol = solve(eq, r);
dsol = double(sol);
positive_solutions = sol(imag(dsol)==0 & real(dsol) > 0)
disp(['q: ', num2str(length(positive_solutions))]);
disp(double(positive_solutions))
参考
カテゴリ
Help Center および File Exchange で Special Values についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!