Why does the SOLVE function return the wrong answers for some equations?
显示 更早的评论
Why does the SOLVE function return the wrong answers for some equations?
SOLVE returns incorrect symbolic solutions to some symbolic equations. For example, attempting to solve the equation z^6 = i results in incorrect answers:
solve('z^6-i')
ans =
[ (1/4*5^(1/2)-1/4+1/4*i*2^(1/2)*(5+5^(1/2))^(1/2))*(-i)^(1/2)]
[ (-1/4*5^(1/2)-1/4+1/4*i*2^(1/2)*(5-5^(1/2))^(1/2))*(-i)^(1/2)]
[ (-1/4*5^(1/2)-1/4-1/4*i*2^(1/2)*(5-5^(1/2))^(1/2))*(-i)^(1/2)]
[ (1/4*5^(1/2)-1/4-1/4*i*2^(1/2)*(5+5^(1/2))^(1/2))*(-i)^(1/2)]
[ 1/2*2^(1/2)-1/2*i*2^(1/2)]
[ -1/2*2^(1/2)+1/2*i*2^(1/2)]
Checking the accuracy of these values by performing
double(ans.^6)
shows that the first 4 answers are invalid:
ans =
-0.9511 + 0.3090i
-0.5878 - 0.8090i
0.5878 - 0.8090i
0.9511 + 0.3090i
0 + 1.0000i
0 + 1.0000i
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Linear Algebra 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!