Matlab Q, if I use the following code I get a diffrent answe than if I extractd
ID: 2997139 • Letter: M
Question
Matlab Q,
if I use the following code I get a diffrent answe than if I extractd the Coeffs manually and asked for roots any ideas?
cd=fliplr(coeffs(2*s^4+s^3+5*s^2+36)) % extract Coefficents and flip array name it cn
roots(cd)
ans =
(44869^(1/2)/24 - 475/54)^(1/3) - 29/(36*(44869^(1/2)/24 - 475/54)^(1/3)) - 1/6
29/(72*(44869^(1/2)/24 - 475/54)^(1/3)) - (3^(1/2)*(29/(36*(44869^(1/2)/24 - 475/54)^(1/3)) + (44869^(1/2)/24 - 475/54)^(1/3))*i)/2 - (44869^(1/2)/24 - 475/54)^(1/3)/2 - 1/6
(3^(1/2)*(29/(36*(44869^(1/2)/24 - 475/54)^(1/3)) + (44869^(1/2)/24 - 475/54)^(1/3))*i)/2 + 29/(72*(44869^(1/2)/24 - 475/54)^(1/3)) - (44869^(1/2)/24 - 475/54)^(1/3)/2 - 1/6
>>
Explanation / Answer
use
vpa(roots(cd))
or
simplify(roots(cd))
or
double(roots(cd))