Integrating both sides of an equation: what does it really mean?

The operation of integrating some equation up to some time $t$ from, say, $0$ or on a small interval is very common. But what does it really mean?

Adding +2 to both sides of an equation is rather straightforward, but integrating something is not all that clear.

My own answer is that we add the values of the equation on some interval. But I don't see how there is a 1-1 correspondence doing this. It should depend on some constant as well. Hence my own idea is not satisfactory.


Suppose you have $f(x)=g(x)$, it means $f(x)$ and $g(x)$ are the same function.

(To be more precise, it should be $f(x) \equiv g(x)$ or $\forall x, f(x) = g(x).$)

$\int_0^t f(x) \, dx$ computes the area under the curve for the function $f$.

We can do the same thing to $g$ as well, $\int_0^t g(x) \, dx$.

Since it is the same function, we should expect the area under the graph to be the same.

$$\int_0^t f(x) \, dx=\int_0^t g(x) \, dx$$

In general, if $A=B$ and $f$ is a function, we should expect $f(A)=f(B)$.


One possible answer has to do with the concept of a function, and its set-theoretic definition. I'm sure that you are familiar with functions, but for completion's sake,

Definition. let $A,B$ be two sets, and $A \times B$ their cartesian product. A function $f : A \rightarrow B$ is a subset $Gr(f) \subseteq A \times B$ so that for each $x \in A$, there exists a unique element $f(x) \in B$ such that $(x,f(x)) \in Gr(f)$.

We usually identify this with the rule $x \mapsto f(x)$, particularly when this assignment is related to a concrete formula.

It is useful sometimes, however, to go back to the set theoretic point of view. In this case, for example, the uniqueness of $f(x)$ given $x$ tells us that if $x = y$, necessarily $f(x) = f(y)$. That is, there is no ambiguity when applying $f$: since $x$ and $y$ are the same element, there is a unique element that will correspond to it.

In more concrete terms, the assignment $\Gamma_t(f) := \int_0^tf(x)dx$ for a fixed $t \in \mathbb{R}$ is a function from the real valued, integrable functions (with a common domain containing $[0,t]$) to the real numbers. Thus, if two functions $f$ and $g$ are equal, necessarily we must have $\Gamma_t(f) = \Gamma_t(g)$.

Edit: note that this does not mean that we have a one-to-one correspondence. For example, from the equality of two differentiable functions $F,G : [a,b] \to \mathbb{R}$ we can deduce $F' = G'$, but the converse is not true. For example, if $F(x) = x$, then $(F+1)' = F'$ but $F + 1 \not\equiv F$. In particular, this example motivates why primitives differ up to a constant: if $F' = G'$, then $(F-G)' = 0$ and so $F-G = c$ for some $c \in \mathbb{R}$ (the latter being a consequence of the mean value theorem).


The trick is to remember, or understand, better, two principles: one, the fundamental principle behind why you need to "do the same thing to both sides" in algebra, and another, exactly what you have an equation of - which is not necessarily clear: that is, the type information about what kinds of things are on each side. Moreover, perhaps, we need to better understand what an equation is. A good understanding of basic foundations, I believe, is really vital for understanding maths - and that means at the least simple classical logic - and, or, not, true/false and the idea of a statement and a predicate. There is a lot of conceptual clarity that comes about from parsing these things out and a lot of conceptual confusion that results when they are not suitably treated, and resolving that is what I'm going to attempt below. Sadly I believe the formal education system tends to blur and smear all this together and results in no end of confusion for many a student and learner. And it's appalling.

To understand this answer, you will first need a couple of simple concepts from logic. In logic, you deal in statements: things you can write down that can be assigned a value of true or false. Such as "The Moon is made out of rock and metal". This is an example of a proposition: it is one specific statement about one particular thing that is either true or not - in this case, this one is true (for the most part, but we're sticking to simple, un-nuanced Aristotelian logic here since that is the basis that mathematics works in, not real life.).

The other kind of statement is a predicate: such as "$x$ is made of rock and metal", where now $x$ is a placeholder that we can substitute for any object we would like, or at least from some set from which it would make sense to do so, which we call a variable. A predicate is also either true or false, but its truth or falsity may depend on what you put in for $x$. If $x$ is "The Moon", it's true, but if $x$ is "your computer's keyboard", probably not - at least I have not heard of any keyboard that incorporates rock into its construction but I could be wrong. They all have some metal in them, due to the electric circuits, but I said rock and metal. You could say a proposition is a predicate which has no variables in it, or a "nullary" predicate (where the term "arity", expressed as "$n$-ary", means "takes $n$ variables". The predicate I just gave is called a unary predicate, meaning it takes one variable.). We might write such a predicate in a function-like notation: $P(x) := \text{$x$ is made of rock and metal}$. The symbol "$:=$" here means that we are assigning or defining the symbol $P(x)$ to have the meaning on the right. This is not typically written but I write this in the interest of maximizing conceptual clarity throughout this answer and detailed explanation.

An equation is a logical statement that makes the assertion that two things are the same. $2 = 2$ is an equation that is a simple proposition, not a predicate. It is true. $x = 2$ in the sense of basic algebra is a predicate equation, which is the predicate $P(x) := (x = 2)$. In fact, it is not unreasonable to say that this $x = 2$ is an expression in the exact same way that a naked

$$2 + 2$$

is an expression, and to inquire as to its evaluation. It's just that the above expression has an evaluation that is a number, but the expression $2 = 2$ has a value that is a logical value of either "true" or "false".

Now here's the trick. In mathematics, contrary to what you might have been told, there is, sadly, still some level of ambiguity in what things mean, and it is often only implied or hinted at in context and for me I find this a bit of a shame. Perhaps because I have a lot of background in computer programming as well as mathematics, and in that, there is zero ambiguity in what a program means: ambiguity is an error, and I know of one who said programming tries to be like math and that's the idea, but in my mind, math should also try to be a little like programming - the ideal will be when the two meet each other in the middle.

And that's what's up here. When you have an equation like

$$x = 2$$

in a simple algebra context, i.e. early grade school algebra, it is clear that what is on the left is an (unspecified) number, and what is on the right is a number as well.

But when you get to a calculus equation like

$$y = x^2$$

where we are now to differentiate each side, now here things get to be a little ambiguous. In fact, there are actually three possible conceptually distinctive interpretations of what the above thingy can mean:

  1. One of these is that it is the equation between the unknown number $y$ and the unknown number $x$, in which case it is an algebraic equation of two variables - or in our little bit of logic a binary predicate $P(x, y) := (y = x^2)$, to which we can inquire as to tis solutions: one of these may be $(0, 0)$, another may be $(1, 1)$, another $(2, 4)$, etc. (the first value is $x$, the second is $y$, as we've written it in the predicate and as in the order you'd be familiar with from the Cartesian coordinate system viewing this in terms of its graph or plot of the solution set upon a plane.)

  2. The second interpretation is that $=$ is being sloppily used for $:=$ and what we mean is to define that $y$ should have the value $x^2$, i.e. $$y := x^2$$. The distinction between definition or assignment and assertion of equality - i.e. forming a predicate versus an action to be taken - is another conceptually important distinction that can get glossed over by ambiguity.

  3. The third interpretation - and the one germane to the calculus situation - is that the left hand side $y$ is a function, here at least the unary function of one variable $x$, and the right hand side is also another function - here the anonymous function that takes the numerical variable $x$ into $3x$, which we may write as $x \mapsto 3x$ (by "anonymous function" I mean a function which is specified without defining a specific symbol or name (the word anonymous means nameless, just as when you use it in an everyday life context), like $f(x)$, to specify it, i.e. not appearing in an $f(x) := ...$ construction. The notation $x \mapsto 3x$ instead of $f(x) := 3x$ is analogously to functions what me writing $3$ instead of $a := 3$ is to numbers.). If we were being sane and wanted to make the concepts abundantly clear, we would write this as

$$y = (x \mapsto 3x)$$

(Note of course whether this is a predicative or declarative equation, i.e. $=$ vs. $:=$ effectively conceptually splits this last point in two as well.)

So now you may ask about differentiation or integration on each side. To understand that, we now have to understand why we need to "do things on both sides" of an equation and it's this: First, anything you "do" to "both sides" of an equation is and must be a function. When you "add 2 to both sides" what you are really doing is applying the function $x \mapsto x + 2$ to both sides. The defining property of a function $f$ is that if $a = b$ then $f(a) = f(b)$. This is what is meant by the somewhat circumlocutory language "a function assigns only one output to each input." If a function were to assign two values, say $2$ and $3$, to some output, then we cannot know that $f(a) = f(b)$ - what if the first $f(a)$ assigned $2$ but the second assigned $3$? That would be consistent with what is written, and would make the equation false, and we would thus be wrong to deduce (and that's yet another conceptual bit: that you are deducing when you move from one equation to the next) from $a = b$ that $f(a) = f(b)$: "applying $f$ to both sides" would not be a valid move to make in the game.

With all this put together, we are now finally in a position to ask what is meant by integrating both sides of an equation.

The first part is getting the meaning of integration right. What "integration" is is an operator: it is a function that eats other functions and spits out functions. In particular, the integration operator

$$I_x[f] := \int_{0}^{x} f(\xi)\ d\xi$$

eats a function $f$ and returns a function that is its integral with lower bound $0$. Namely, being again very careful and precise with notation, $I_x[x \mapsto x] = \left(x \mapsto \frac{1}{2}x^2\right)$ (the function $x \mapsto x$ is technically called the identity function and denoted $\mathrm{id}$, by the way), $I_x[\sin] = \left(x \mapsto \cos(x) - 1\right)$, etc. (note I did not write $\sin(x)$ - that would be the value of $\sin$ at $x$, not the function itself)

When you have the equation

$y = 3x$

and you are goign to integrate both sides, the two sides are NOT numbers, but rather functions - as written before,

$$y = (x \mapsto 3x)$$

and when you apply the integration operator it will eat the function on the side you applied it to and pump out another function, and since any function satisfies $a = b$ implies $f(a) = f(b)$ - even if $a$ and $b$ are themselves functions as they are in this case - then you have to also apply it to both sides like any other thing you'd do in algebra just same.

Which even allows us to say that one of the real conceptual leaps of calculus is not just the limit and the introduction of the continuum proper, but also the leap from thinking about functions of numbers to so-called higher-order functions or operators which are functions of other functions.


Let $a,b \in \mathbb{R}$, suppose we have :

$$\forall x \in [a,b], f(x)=g(x)$$

Suppose $a_i=a+\frac {i(b-a)} m$.

We have :

$$\sum_{i=0}^m f(a_i)=\sum_{i=0}^m g(a_i).$$

Then we have, for all $m$ :

$$\frac{b-a} {m+1}\sum_{i=0}^m f(a_i)=\frac{b-a} {m+1}\sum_{i=0}^m g(a_i).$$

But, by Riemann sums, if $f$ is Riemann integrable :

$$\frac{b-a} {m+1}\sum_{i=0}^m f(a_i) \underset{m \to \infty} \to \int_a^b f(x) dx$$

And the same goes for $g$.

Then :

$$\int_a^b f(x) dx=\int_a^b g(x) dx.$$