# Thread: Evaluating area under the curve

1. ## Evaluating area under the curve

Hi,

I have an area-under-the-curve problem. So, obviously, everyone knows that a definite integral is just a more accurate way of evaluating area under the curve, right?

So suppose you have your basic function f(x) = x^2. If you wanted to find the area under the curve from -3 to -2, you'd just integrate x^2.

Now, suppose you have the GRAPH for f(x), and you want to evaluate -3 to -2, but you don't know what the function is. Again pretty simple... you'd just evaluate from -3 to -2 with approximations as small rectangles/squares/etc.

My question is: what do you do if you have the graph of f(x), don't know what the function is, but you want to find the integral of f(x)^2dx? (Assume you don't know f(x) = x^2). What do you do in that case? Do you pick points (e.g. at -3, f(x) = 9, at -2, f(x) = 4, and then square these points? (I.e. f(-3)^2 = 81, f(-2)^2 = 16?) This might be accurate with a graph where f(x) = x^2, but what if f(x) = x^2 + 3? Can you apply the same methodology there?)

Thank you,
Gina

2. In general, it is probably impossible to express $\displaystyle \int_a^bf^2(x)\,dx$ through $\displaystyle \int_a^bf(x)\,dx$. However, what is the difference between having a formula and having a graph for f(x)? If having a graph means that you know f(x) for each x with a certain error, you still can calculate $\displaystyle f^2(x)$ with some error and then calculate $\displaystyle \int_a^bf^2(x)\,dx$.

3. Originally Posted by ginarific
My question is: what do you do if you have the graph of f(x), don't know what the function is, but you want to find the integral of f(x)^2dx? (Assume you don't know f(x) = x^2). What do you do in that case? Do you pick points (e.g. at -3, f(x) = 9, at -2, f(x) = 4, and then square these points? (I.e. f(-3)^2 = 81, f(-2)^2 = 16?) This might be accurate with a graph where f(x) = x^2, but what if f(x) = x^2 + 3? Can you apply the same methodology there?)
Yes, this is exactly how you'd do it. Of course it is an approximation, but it's about as good as you can do in that situation.

4. Originally Posted by ginarific
Hi,

I have an area-under-the-curve problem. So, obviously, everyone knows that a definite integral is just a more accurate way of evaluating area under the curve, right?
Well, no. Everyone doesn't know that. What everyone should know is that the definite integeral is, by definition, the area under the curve, exactly. It is NOT just "a more accurate way of evaluating the area under the curve" (more accurate than what, by the way?).

So suppose you have your basic function f(x) = x^2. If you wanted to find the area under the curve from -3 to -2, you'd just integrate x^2.

Now, suppose you have the GRAPH for f(x), and you want to evaluate -3 to -2, but you don't know what the function is. Again pretty simple... you'd just evaluate from -3 to -2 with approximations as small rectangles/squares/etc.

My question is: what do you do if you have the graph of f(x), don't know what the function is, but you want to find the integral of f(x)^2dx? (Assume you don't know f(x) = x^2). What do you do in that case? Do you pick points (e.g. at -3, f(x) = 9, at -2, f(x) = 4, and then square these points? (I.e. f(-3)^2 = 81, f(-2)^2 = 16?) This might be accurate with a graph where f(x) = x^2, but what if f(x) = x^2 + 3? Can you apply the same methodology there?)

If you have a graph of f(x) then you know the values of f(x) for given values of x and can calculate $\displaystyle f^2(x)$ for those same values of x. Put the values of $\displaystyle f^2(x)$ into whatever formula you would use to approximate $\displaystyle \int f(x)dx$ instead of f(x). (Simpson's rule is far more accurate than "small rectangles/squares/etc." for the same work.)