I have a simple quadratic (with $x^2$) equation, x can Be complex too:
$$x^2+x+1=0$$
But it could be any equation, the equation above is just an example. I need to compute $x_1^{10}+x_2^{10}$, but it could have another exponents (ex: $x_1^{50}+x_2^{50}$).
I need to know, on a general case, how to find $x_1^n+x_2^n,\ n\in\mathbb{N}\ ax^2+bx+c=0,\ a\ is\ not\ 0$?
I ask this because I have to create a software which computes this (user writes the equation and the number n = exponent) and I can't find the roots always, because sometimes are complex. I think I should make use of Viete, but I don't know how to compute $x_1^n+x_2^n$.
Thank you very much!!