<s>[INST] What are the valors of $4x_1-x_1^2+x_3^2$? $x_1$ and $x_2$ $x_3$ real numbers such that 
$x_1<x_2<x_3$ are solutions of the equation : 
$x^3-3x^2+(a+2)x-a=0$ where a is real 
What are the valors of $4x_1-x_1^2+x_3^2$
After factorizing i get : 
$(x-1)(x(x-2)+a)=0$
The problem is that i don't know relation of solutions like in seconde degree of equation ( viet relation of solution ) 
Can someone give hint !
 [/INST] From what you get $(x−1)(x(x−2)+a)=0$, we can find the other two roots, which satisfy $$x^2-2x+a=(x-1)^2-(1-a)=0$$ Since all roots are real, hence we have $a\leq 1$ ($a\neq1$ since the roots are distinct) then $x_1=1-\sqrt{1-a},x_3=1+\sqrt{1+a}$.
Hence, $$4x_1−x^2_1+x^2_3=4(1-\sqrt{1-a})-(1-\sqrt{1-a})^2+(1+\sqrt{1-a})^2$$
$$=4(1-\sqrt{1-a})+2\cdot(2\sqrt{1-a})=4$$
</s>