croadden
(Yuri Pitushkevich)
December 14, 2020, 11:32am
1
Morning! Iβm trying to solve expression, using palette comands only. I want to get all roots of expression, than get sum of squared roots. But ^2 is not working at all. What am I doing wrong?
My code be like:
a = Solve[x^7-1==0,x];
res = \!\(UnderoverscriptBox[\(\[Sum]\), \(n = 1\), \(7\)]\(Power[\((x /. a[\([n]\)])\), 2]\)\)
Also is there any way to simplify result? FullSimplify returns 0 and Simplify is not working at all. Res is:
1-(-1)^(1/7)+(-1)^(2/7)-(-1)^(3/7)+(-1)^(4/7)-(-1)^(5/7)+(-1)^(6/7)
bmmmburns
(Marvin Ray Burns A.G.S. (cum laude))
December 14, 2020, 11:58am
2
There are 7 solutions for x they are
.
.Using N[a]
you get
{{x β 1.},
{x β -0.9009688679024191 - 0.4338837391175581 I},
{x β
0.6234898018587336 +
0.7818314824680298 I},
{x β -0.22252093395631445 -
0.9749279121818236 I},
{x β -0.22252093395631434 +
0.9749279121818236 I},
{x β
0.6234898018587335 -
0.7818314824680299 I},
{x β -0.900968867902419 +
0.43388373911755823 I}}
croadden
(Yuri Pitushkevich)
December 14, 2020, 12:20pm
3
Yes, and Iβm trying to get Sum of all roots^2
But as you can see on my screenshot, each root is not powered. And even after FullSimplity, roots are not 1 or -1, but (-1)^(1/7)
bmmmburns
(Marvin Ray Burns A.G.S. (cum laude))
December 14, 2020, 12:26pm
4
a = Solve[x^7 - 1 == 0, x]
Out[42]= {{x β 1}, {x β -(-1)^(1/7)}, {x β (-1)^(
2/7)}, {x β -(-1)^(3/7)}, {x β (-1)^(
4/7)}, {x β -(-1)^(5/7)}, {x β (-1)^(6/7)}}
t = N[Total[x^2 /. a]]
Out[53]= 1.1102230246251565*10^-16 + 0. I
Chop[t]
Out[54]= 0
danl
(Daniel Lichtblau)
December 14, 2020, 2:13pm
5
If you check e.g. the Wikipedia page for resultants you find that this sum-of-squared-roots can be found using the computation below.
In[810]:= Coefficient[Resultant[x^2 - y, x^7 - 1, x], y^6]
(* Out[810]= 0 *)
Also there is a more direct method using RootSum (which may well use the above approach under the hood).
In[815]:= RootSum[#^7 - 1 &, #^2 &]
(* Out[815]= 0 *)
croadden
(Yuri Pitushkevich)
December 15, 2020, 3:59pm
6
Does anyone can explain, whyn am I getting 0 as a result of FullSimplify?
danl
(Daniel Lichtblau)
December 15, 2020, 4:44pm
7
The result is zero and FullSimplify manages to make that determination. This is a good outcome. If FullSimplify gave, say, Pi^2+EulerGamma`, that would indicate it was having a very bad day.
croadden
(Yuri Pitushkevich)
December 15, 2020, 5:06pm
8
But as I can see, the result should be equal to 1. Or not?
danl
(Daniel Lichtblau)
December 15, 2020, 5:14pm
9
Iβd go with the βor notβ option on that.