5

just trying to solve a small example on integration by parts, and a weird thing happens: I come to an original expression increased by one. Please help me find out where the flaw is!

The task is to calculate the following indefinite integral: $$ \int\tan^{-1}x\text{d}x $$

Integration by parts formula (just in case): $$ \int f(x)g'(x)dx = f(x)g(x) - \int f'(x)g(x)\text{d}x $$

Let's expand our original integral: $$ \int\tan^{-1}x\text{d}x = \int\cos x \sin^{-1}x\text{d}x $$

If $$ f(x) = \sin^{-1}x $$ $$ g'(x) = \cos x $$ then $$ f'(x) = -\sin^{-2}x\cos x $$ $$ g(x) = \sin x $$

Applying integration by parts formula: $$ \int\cos x \sin^{-1}x\text{d}x = \sin^{-1}x\sin x - \int-\sin^{-2}x\cos x\sin x\text{d}x = 1 + \int\tan^{-1}x\text{d}x $$

So, where have I made a mistake?

Mutantoe
  • 714
  • 7
  • 16
weekens
  • 285
  • "Let's expand our integral". How did you do that expansion? –  May 16 '16 at 05:25
  • 12
    $\tan^{-1}(x)$ typically means $\arctan(x)$ –  May 16 '16 at 05:26
  • @ZacharySelk Well, $\tan x = \sin x / \cos x$, and then we just flip the fraction. – weekens May 16 '16 at 05:27
  • 3
    Is $\tan^{-1}x=\cot x$ here? $\sin^{-1}x$ and $\cos^{-1}x$ means $\arcsin x$, $\arccos x$ each, which are inverses, not reciprocals of them. – choco_addicted May 16 '16 at 05:28
  • 6
    I see you mean $(\tan(x))^{-1}$. That is an unusual notation –  May 16 '16 at 05:28
  • Note that even if you have written $\tan^{-1} x$ to mean $\cos x /\sin x$ you have defined $g'(x)=\cos x$ but later say then $g(x)=\cos x$ ... – coffeemath May 16 '16 at 05:30
  • 2
    @coffeemath Sorry, I mistyped! Let me do a correction. But in my calculations it's $\sin x$. – weekens May 16 '16 at 05:32
  • 3
    To avoid confusion, I suggest just writing $\frac1{\tan x}$ instead. – Asaf Karagila May 16 '16 at 05:35
  • 5
    Ok, so $f^{-1}(x)$ actually means an inverse function! Thanks guys for telling me that! Well, but in this example, let's take $f^{-1}(x)=1/f(x)$, just amongst friends! I will take this into account in future, promise! – weekens May 16 '16 at 05:37
  • @AsafKaragila You're right, but there are already a lot of comments regarding $f^{-1}(x)$ vs $(f(x))^{-1}$. They might be useful for someone like me. – weekens May 16 '16 at 05:39
  • 1
    Almost always, $f^n(x)$ refers to a function composed with itself $n$ times. (That is, $f^2(x)$ refers to $f(f(x))$, $f^{-1}(x)$ refers to the inverse of $f(x)$, $f^0(x)$ is the identity function of $x$...) The only exception is for positive powers of trig functions, in which case $\operatorname{trig}^n(x)$ = $(\operatorname{trig}(x))^n$. – Deusovi May 16 '16 at 05:41
  • @Deusovi Had no idea about $f^n(x)$. Was always thinking it's just a power of a result. Thanks for educating me! – weekens May 16 '16 at 05:47
  • 3
    To be frank, the notation you chose makes sense. It's just that the mathematics community as a whole has chosen the $f^{-1}(x)$ to denote the inverse, and not $f^I(x)$ or some other ilk of marking. – zahbaz May 16 '16 at 08:31

2 Answers2

25

You haven't made a mistake.

Remember how integrals have " ${}+C$ " at the end? This is why. The ${}+C$ 'absorbs' all constants together into an unknown constant. Indefinite integrals don't give you a single function: they give you a set of functions that differ by a constant.

Deusovi
  • 3,043
  • 1
    You're right! This makes sense. – weekens May 16 '16 at 05:29
  • 1
    This leads to seemingly absurd identity $\int f(x) dx - \int f(x) dx = C$, for any $C\in \mathbb{R}$ – tom May 16 '16 at 07:26
  • 5
    @tom That's because $\int f(x) dx$ isn't a single function, it's a family of functions, so you can't just equate it to a scalar constant and hope for any of it to make sense. Calculus notation can be rather treacherous due to this amorphous "+ C" constant so you need to be careful what you write. It's like the dx/dy of differential notation, it kinda behaves like a fraction but will mess you up if you forget what it really stands for. – Thomas May 16 '16 at 09:36
6

So, $\tan^{-1}(x)$ is not equal to $\dfrac{1}{\tan(x)}$. Instead, that is $\cot(x)$.

For the integration by parts, let $u=\tan^{-1}(x)$ and $dv=1\quad\!\!\!\!dx$

Remember that the formula is $uv-\int vdu$

Richard
  • 225