suppose a uniform rod of mass M and lenght L is at an angle B to the x axis, one end of the the rod touching the axis. wish to find moment of inertia about x axis. let the rod touches the axis at x=0. let D=density=M/L, and I will integrate along x axis, that means that at a distance x from the the origin, the little mass dM = D*dx is at a distance x*tanB away from the axis. then the integral I get is I = D*(x^2)*[(tanB)^2] integrated from x=0 to x=L*cosB. the answer I got is (1/3)*m*(L^2)*cosB*(sinB)^2. I know this is different from the usual solution where one should integrate along the rod itself,but I dont understand which part of this argument went wrong? Thanks!