# How would one go about finding the area of functions such as y=x^3?

Hello.
For my computer engineering class, I was asked to write a C++ program to compute the area of y=0, y=x^3, and x=1 and display the results on the screen (And set a domain of x from 0 to 1 and intervals dx=0.001). How would one go about finding the area of the functions stated previously? Thank you.

0|0
17

• I assume you're talking about the AREA under the function? Functions themselves don't technically have an area.

The operation that gives you the area under a curve of a function is called integration. You might have heard of it if you've taken any calculus courses.

There are actually a few ways to compute the definite integral of a function (look up numerical integration if you want to know more). The easiest one to conceptualize, and the one your teacher probably had in mind to use was something called a Riemann Sum:
https://en.wikipedia.org/wiki/Riemann_sum
https://mathworld.wolfram.com/RiemannSum.html