How to determine $f(x)$ and $g(x) $for area between curves? So if I'm trying to figure out the area between two curves, I understand that the formula is:  $$\int f(x)-g(x) \mathsf dx.$$
But without them telling me which is $f(x)$ and $g(x)$, how do I tell which function is being subtracted and which is being subtracted from?
For example I have the equations:
$$x=2y^2$$ and $$x=4+y^2$$
In this case my textbooks shows that the second equation is $g(x)$ and the first is $f(x)$, but why?
 A: It essentially depends if $f\le g$ or $g\le f$ in your integration interval.
A: An area should be a positive real number (or maybe $+\infty$). $\int f(x) - g(x) \mathrm{d}x$ denotes (a set of) antiderivatives. To fix that you need to do apply two modifications to you formula:


*

*You need a start and an end point, let‘s call them $a$ and $b$. To qualify as these points they should fulfill $-\infty \le a \le b \le +\infty$. 

*You need to use the absolute value of the difference. This answers your question “how do I tell which function is being subtracted and which is being subtracted from“: $|f-g| = |g-f|$.


So the formula for the area between two curves from point $a$ to $b$ becomes
$$A = \int_a^b |f(x)-g(x)| \mathrm{d}x.$$
At last some notes:


*

*$A = \infty$ is a possible result – and worse: The integral does not exist for all functions $f, g$. (You should require integrability of some kind here.)

*It seems to be common notation to denote “area between two points” as “area between most left and most right intersection of the functions.”

*To actually calculate the area, you may find the absolute value annoying. You (probably) can tell me an antidervative of $x^2-5x+3$, but what‘s an antidervative of $|x^2-5x+3|$? One way to get around this is to calculate intersection points of the functions, splitting $[a,b]$ into smaller intervals where one function is larger (or equal) than the other one.
(Other answers focus just on this point, and while the information could be enough for you to solve exercises of this type, it might be a good idea to know why you do this.)

A: You first have to solve $f(x)=g(x)$ and there will be two solutions.  Between those two values of $x$ figure out which function is greater.
