# Average value of function

1. Feb 2, 2009

### Master J

To find the average value of a function of one variable, you integrate it and multiply it by 1/(b - a) , where b and a are the limits of integration , uper and lower, respectively.

But how does one do this for a function of two variables, defined on a rectangle?

2. Feb 2, 2009

### Dick

The same way, basically. Integrate the function over the rectangle and divide by the area of the rectangle.

3. Feb 3, 2009

### Master J

Thanks.

Well I am trying a question. The integrand is (x^2)y. The domain is [2,4] * [-6,6].

Now when I integrate it with respect to y first, it goes to zero. It does not go to zero when you start with x. How is this possible?

4. Feb 3, 2009

### gabbagabbahey

Bad math. ....It should be zero in both cases, try showing us what you are doing when you integrate it over x first....

5. Feb 3, 2009

### Master J

Possibly!

Ah I see what I've been doing wrong! I don't even need to work out the average value, since it integrates to zero, as it should, since it is evenly distributed in the positve and negative y areas!

Last edited: Feb 3, 2009