# Is it always true that integral of nonnegative function is non negative [closed]

If $$f(x)\geq 0$$, is it true that $$\int f(x)dx \geq 0$$?

## closed as off-topic by RRL, Lee David Chung Lin, Leucippus, verret, CesareoApr 17 at 7:14

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – RRL, Lee David Chung Lin, Leucippus, verret, Cesareo
If this question can be reworded to fit the rules in the help center, please edit the question.

• It’s kind of meaningless to ask whether a function is nonnegative when it’s only defined up to an arbitrary constant. You need to clarify what you mean by “the integral”. – Erick Wong Apr 15 at 17:14
• If f is a non negative function for all values of x in a domain D then is it necessary that the integral of f over D is nonnegative – Farah Apr 15 at 21:08
• As I said, “the integral” can mean many things. With no explicit reference to a domain of integration, the most common interpretation would be the indefinite integral. – Erick Wong Apr 15 at 21:28

To clarify, $$\int f(x) dx$$ denotes the primitive of $$f$$. That is, any function $$F(x)$$ such that $$F'(x)=f(x)$$. There are infinitely many such functions for any given $$f$$, since you may add any constant to one primitive to get another, and the constant you add can be negative and have arbitrarily large magnitude, so there exist infinitely many primitives of a given $$f$$ that are negative at some point. If you are asking about $$\int_a^bf(x)dx$$, then if $$b\geq a$$ and $$f(x)\geq0$$ for all $$x\in [a,b]$$ then $$\int_a^bf(x) dx\geq0$$ and $$\int_b^a f(x)dx\leq 0$$.
• Indeed, for the typical case, every primitive will be negative somewhere, like $x+C$. – Erick Wong Apr 16 at 17:18