when is these rational function equal to zero?

6x^2/(x^3+1)^2=0

-2x/(x^2-1)^2=0

When x=0 because if you plug 0 in for x the result is 0.