11

$$\int \frac{\mathrm{d}x}{x}$$ If I integrate this by parts ($\displaystyle u=\frac{1}{x}, \mathrm{d}u = -\frac{\mathrm{d}x}{x^2}, \mathrm{d}v= \mathrm{d}x, v = x$), then why does this happen?

$$\int \frac{1}{x} \: \mathrm{d}x = u v - \int v \:\mathrm{d}u = \frac{x}{x} - \int x\left(\frac{-1}{x^2}\right) \:\mathrm{d}x=1+\int \frac{1}{x}\:\mathrm{d}x$$

So $\displaystyle\int \frac{1}{x}\:\mathrm{d}x = 1 + \int \frac{1}{x} \:\mathrm{d}x$ and cancel out both sides of $\displaystyle\int \frac{1}{x} \:\mathrm{d}x$ and I get $0=1$. How can I find the error in the process because right now I cant see it.

Teoc
  • 8,700
  • 11
    The mistake is in forgetting that indefinite integration (in fact, antidifferentiation) is defined only up to a constant . Taking this into account you get no cotnradiction at all. – Timbuc Dec 23 '14 at 19:49

3 Answers3

8

The antiderivative is well-defined only up to adding in a local* constant. To be more precise, we might explicitly specify an equivalence relation rather than writing equality. That is, we might write something like

$$ \int \frac{1}{x} \, \mathrm{d}x \equiv \ln x $$

where the equivalence sign means

$ f \equiv g$ if and only if there exists a local constant $C$ such that, for all values of $x$, $g(x)-f(x) = C$

(note that a single value of $C$ is supposed to work for all $x$)

Now, with this convention, your equation should be written

$$ \int \frac{1}{x} \, \mathrm{d}x \equiv 1 + \int \frac{1}{x} \, \mathrm{d}x $$

And then when we subtract off the integral from both sides (which we can do, because $\int f \mathrm{d}x \equiv \int f \mathrm{d}x$), we get

$$ 0 \equiv 1 $$

And this is true: e.g. we could pick $C=1$ if we substitute in the definition of equivalence.

By convention we know that if an antiderivative appears in an equation, that equation is supposed to be an equivalence, not an equality. By writing the equivalence relation explicitly, it helps us avoid a mistake -- when we cancel out the antiderivative, we might mistakenly forget that the result is still only supposed to be an equivalence.


*: In many situations, "local constant" simply means "constant". However, in situations where we are interested in a domain that is made up of disconnected intervals -- e.g. when considering the function $1/x$ on the domain of all nonzero real numbers -- there can be different constants on each interval. e.g. $f'(x) = 1/x$ if and only if there are constants $A$ and $B$ such that

$$ f(x) = \begin{cases} \ln(x) + A & x > 0 \\ \ln(-x) + B & x < 0 \end{cases} $$

or put differently, $ f(x) = \ln |x| + C(x)$, where $C$ is the function

$$ C(x) = \begin{cases} A & x > 0 \\ B & x < 0 \end{cases} $$

The terminology "local constant" is in reference to the idea that near any particular point in the domain -- i.e. 'local' to that point -- the function actually is constant. e.g. near $a = 0.01$, $C(x)$ is simply the constant value $A$ for any $x$ with $|x-a| < 0.01$.

5

You cannot cancel out $\int \frac{1}{x}dx$ on both sides, because $\int \frac{1}{x}dx$ is a family of functions (up to a constant factor $C$).

John Smith
  • 1,017
  • 7
  • 16
  • In particular, I'd recommend to try this with the definite integral $\int_1^x\frac1t\mathrm dt$ instead. – Math1000 Dec 23 '14 at 19:57
  • 1
    Why is it then that we usually denote the antiderivative $F(x)=\int 1/x dx + C$? Then $F$ is a function, because I thought it was an addition of two functions, $C$ and $\int 1/x dx$. But you say $\int 1/x dx$ is not a function but a family of functions. – user202937 Dec 23 '14 at 20:15
0

Integration by parts is based on the product rule: $$ (f(x)\cdot g(x))'=f'(x)g(x)+f(x)g'(x)\\ $$ Integrate both sides: $$ \int(f(x)\cdot g(x))'\,dx=\int[f'(x)g(x)+f(x)g'(x)]\,dx\implies\\ f(x)\cdot g(x)+C=\int f'(x)g(x)\,dx+\int f(x)g'(x)\,dx\implies\\ \int f'(x)g(x)\,dx=f(x)\cdot g(x)-\int f(x)g'(x)\,dx+C,\ C\in\mathbb{R}. $$

$\int(f(x)\cdot g(x))'\,dx=f(x)\cdot g(x)+C$ because if $f'(x)=F(x)$, then $\int F(x)\,dx=f(x)+C$ since $(f(x)+C)'=F(x)$ (note that this is not the same $f(x)$ as in the example above). In other words, $\int f'(x)\,dx=f(x)+C$.

There is always that constant of integration which they always drop in that integration by parts formula that you see in textbooks.

So, your problem really should look like this:

$$\int\frac{1}{x}\,dx = 1 + \int\frac{1}{x}\,dx+C,\ C\in\mathbb{R}.$$

And that is a true equality statement if $C=-1$.

Michael Rybkin
  • 6,646
  • 2
  • 11
  • 26