Using the Viete expressions, which are the connection between roots and coefficients of an equation:

x1 + x2 + x3 + x4=0

x^2 + x2^2 + x3^2 + x4^2 = (x1 + x2 + x3 + x4)^2 - 2(x1*x2 + x1*x3 + x1*x4 + x2*x3 + x2*x4 + x3*x4)

x1*x2 + x1*x3 + x1*x4 + x2*x3 + x2*x4 + x3*x4= c/a=0/1=0

x^2 + x2^2 + x3^2 + x4^2 = 0 - 2*0=0

f(x) = x^4+1.

We pressume x1,x2,x3 and x4 are the roots of x^4 +1 = 0.

To calculate x1+x2+x3+x4.

By the relation between the roots and coeficints, x1+x2+x3+x4 = - (coefficientnt x^3/ coeficient of x^4).

So x1 +x2+x3++x4 = 0

and x1^2+x^2+x3^2+x4^2.

x1^2+x2^2+x3^2+x4^2 = (x1+x2+x3+x4)^2 - 2( sum of xixj) .....(1)

By the relation between roots and coefficients of the equation x^4+1=o,

sum of (xixj) i not equal to j = (coefficient of x^2)/coefficient of x^4) = 0.

Therefore x1^2+x2^2+x3^2+x4^2 = 0-2*0 = 0.