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?
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:
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: