Why must the area under a curve require a non-negative function? For context, this is the first math class in Bachelor's electrical engineering.
Our teacher has just given us a definition for the area under a curve as the following:

If $f(x)$ is an integrable and non-negative function on a closed interval $[a, b]$, then the area under the curve $y = f(x)$ in that range is the integral of $f(x)$ evaluated from $a$ to $b$.

I asked him why the non-negative condition is given, and we're a little stuck trying to find an answer.
In a real-life context, I understand that areas are negative. But when applied to stuff like physics, we'll have to account for the sign as it often denotes ideas like direction. Moreover, imo pure mathematics should allow for negative areas.
Does anyone have any answers?
 A: Areas are not ever negative, no matter how pure the mathematics.
The statement in the question defines what the area under a curve is for the case of a non-negative and integrable function. It doesn't say anything about what the area under a curve might be defined to be if the function is negative or not integrable.
The point here is that the area under the curve is the area of the geometric figure defined by the $x$ axis and two parallel vertical lines $x=a$ and $x=b$ and the function value. If you want to define "area under the curve" for negative functions, you'll have to think of another definition for that, presumably the area between the function and the $x$ axis. But it won't ever be negative.
Regarding negative areas, let's draw an analogy with a map. Suppose you draw a north-south line through Hamburg, and then you say "areas west of this line are negative", so areas in Berlin are negative, and areas in Paris are positive. Then you can take the area of the Brandenburg gate and add it to the area of the Arc De Triomphe and get a region with zero area.  That is clearly ridiculous, but it's no less ridiculous to claim that the region between the x axis and a negative function has a "negative area". The area of a bounded region is the amount of two-dimensional space it occupies, and that cannot ever become negative.
A: Usually, a geometrical area is always between two curves or more. Let us  consider the example of two curves  $y=f(x)$ and $y=g(x)$. Further, if $f(x)> g(x)$ or $f(x) < g(x)$ in $(a,c)$; at $x=a,c$ the two may be equal. Then the geometrical area is
$$A=\int_{a}^{c} |f(x)-g(x)|~ dx.$$
But if these two curves cross each other at a single point $x=b$, then the geometrical area is
$$A=\int_{a}^{b} |f(x)-g(x)|~dx+\int_{b}^{c} |f(x)-g(x)|~dx,$$
without  even knowing which one is more or less in $(a,b)$ or $(b,c)$.
In case there are more crossing points $b_1,b_2,b_3,...b_n$, the integral will be broken into $n+1$ integrals.
Most often it is asked to find area area projected on the $x$-axis  by a curve $y=(x)$ from $x=a$ to $x=c$. and the curve does not cross $x$-axis in the interval $(a,c).$ Then the geometrical area is
$$A=\int_{a}^{c} |f(x)-0|~dx.$$
If the curve crosses x-axis at $x=b$, the the geometrical area will be
$$A=\int_{a}^{b} |f(x)| dx+\int_{b}^{c} |f(x)| dx$$
There could also be a concept of vector area which could be positive or negative. So the integrals $\int_{a}^{c}f(x) dx$ and $\int_{a}^{c} (f(x)-g(x))~dx$ represent the vector area, which may not be the same as the geometrical area. For instance $$\int_{0}^{2\pi} \sin x dx=0$$  is the vector but the geometrical area made by $\sin x$ on $x-$axis  from $x=0$ to $x=2\pi$ is $$\int_{0}^{2\pi} |\sin x|~dx=2 ~\text{sq. units}$$
I hope that this discussion may be helpful.
A: This is a purely pedagogical gambit. The definition is phrased like that precisely to stop people like you asking awkward questions! Later, presumably, your course will introduce the idea that the area under the x-axis must be counted as negative. But for now, they are keeping it as simple as possible for people who may be unfamiliar with mathematical terminology.
A: When the function goes negative, you can still define the area under the curve -- but in this case the "area" evaluates as negative.
The teacher is simplifying the scenario so as not to confuse the students.
Finding "the area under the curve" is a basic application of the technique of integral calculus, and this is the usual way of introducing the concept to students.
However, there is a danger that unless this is followed up with a proper exposition of what calculus actually is, then students may believe that "the area under the curve" is all there ever is to integral calculus.
What is of deeper concern is that the lecturer was unable to explain the above.
