## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

# 10.3. Computing the Center of an Area Using Numerical Integration

## Problem

You need to integrate a function represented by tabular values to determine the area enclosed by the function and the center of that area.

## Solution

Apply a numerical integration technique in your spreadsheet (as discussed in earlier recipes) to compute the area, and take the first moment of the area to compute the centroid.

## Discussion

It often happens in science and engineering that you need to compute the area under a curve or the area of some nonprimitive geometric shape. Often the center of that area is of some significance. When working with probability distributions, the area and moments of the area yield important information. In structural mechanics, areas and moments of areas are important for computing stress. Naval architects compute areas and moments of areas to assess how ships float. These are just a few examples of how areas and moments of areas are commonly found in science and engineering.

In this recipe, we'll consider the first moment of an area, which is computed according to the formula:

This formula yields the first moment of the area about the y-axis. The center of area is computed according to the formula:

In this formula, M y is the first moment of the area and A is the area.

Now, let's consider ...

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required