Why does the SOLVE function return the wrong answers for some equations?
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Linear Algebra finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!