Moment of inertia bar variable density

1. Mar 19, 2011

chrisandmiss

1. The problem statement, all variables and given/known data
I think I solved this correctly, but im not sure.

Find the moment of inertia of a bar with density d=kx^2, where x is the distance from the center of the bar(find the moment of inertia at the center)

THe length of the bar is L

2. Relevant equations

d=kx^2

Moment of inertia=sum of mx^2

3. The attempt at a solution

FInd K. Well, the integral of density over a bar is the mass, so from the center, integrate kx^2 to half of the distance L, gives kx^3/(8*3)= M/2 k= 12M/(L^3)

To find the moment of inertia, sum m1x1^2+m2x2^2...mnxn^2= integral x^2dm

density =kx^2, so dm=kx^2dx

Integrate 2k *x^4(over L/2)which equals 2k* L^5/(32*5)

sub in k

Moment of inertia of the bar equals 3/20 L^2

Is this right? It seems low