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
2 次查看(过去 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!