# Calculating magnetic moment given magnetization

## Homework Statement

Consider a square slab of magnetized material with sides ##2a##, and
thickness ##d##, as shown. The magnetization is not uniform: $$M = M_o cos(\frac{2πx}{ a}) \hat{z}$$

b) Calculate the total magnetic moment of this object. How would
you guess the magnetic field decreases with distance away from the object?

## Homework Equations

## M \equiv ## magnetic moment density

## The Attempt at a Solution

[/B]
Because it's a density, my first thought to find the overall ##\bar{m}## was to integrate ## \bar{M} ##over the volume ##dx dy dz##. This of course ends up as 0 because it's over two full periods of a cosine in x, so I got ## \bar{m} = 0. ## Of course with 0 magnetic moment a magnetic field far away will be 0, which jives with me because oh how the magnetization is 'cancelled' over the whole thing. However I then became a little unsure as the question asks "how" it would decrease which I would imagine would be like"as ## \frac{1}{r^{5}}##" or something like that. It occurred to me that maybe I should just multiply ## \bar{M} ## by the volume, to get a variable ## \bar{m} ## but... that just seems incorrect to me, especially since ## \bar{M} ## is not constant. Can anyone confirm that my method is correct to find ## \bar{m} ## and if so am I interpreting the question correctly?