y-co-ordinate of centre of mass=

when integrating with respect to z, break the integral into two different integrals

in one integral, set the limits of y from 0 to 1

in other integral, sat the limit of y from 1 to 2.

in the first of the above max(1,y^2) will be 1

in the second of the above, it will be