4

I have a question on an integration exercise, which, upon further manipulation became: $$ \int x \tan(x) \ d\tan(x) $$ I substituted $\tan(x)$ with $u$ , so $x$ became $\tan^{-1}x$

On solving this, I got the correct answer. But later I realised that $x$ is not equal to $\tan^{-1} (\tan(x))$ , rather there will be an unknown constant added $\tan^{-1} (\tan(x))$.

So how did I get the correct answer,was it a coincidence? Is this substitution even valid because it will produce an unknown constant?

If I use this wrong "trick" in any other question, will it always work?

(I am sorry if the question is stupid or I have made a mistake)

I would be grateful for any help.

FD_bfa
  • 3,989
  • See this answere here. You can be a little loose with u-substitution when it comes to indefinite integration those substitutions not even being valid in some definite integration situations because indefinite integrals of the form $F = \int f$ are defined on some interval $I$ such that $F' = f$. Whatever that interval is doesn't really affect anything. The whole goal is to just find an antiderivative that works and write $+C$ at the end. – Accelerator Aug 12 '23 at 19:22

1 Answers1

2

I think the theoretical answer is the "uniqueness" statement in the Fundamental Theorem of Calculus, but I agree it that in the midst of calculations it can seem a bit unbelievable. Still in every example I've seen, the constants end up being a wash and the only danger is changing your mind halfway though about how careful you're trying to be with them.

For instance, if $u=\tan(x)$ then $\arctan(u)=x-n\pi$ for some $n$. (In general this $n$ depends on $x$, yes, but is locally constant; I'll address that later.)

$$\int x\tan(x) d\tan(x) = \int u(\arctan(u)+n\pi)du = \frac{n\pi}{2}\tan^2(x) +\int u\arctan(u)du$$

This looks bad, but let's continue:

\begin{align*} \int u\arctan(u)du &= \frac{-u+(1 + u^2)\arctan(u)}{2}+C \\ &= -\frac12\tan(x)+\frac12(1+\tan^2(x))(x-n\pi)+C \\ &= -\frac{n\pi}{2}\tan^2(x) -\frac12\tan(x)+\frac{x}{2}(1+\tan^2(x))+\left(C-\frac{n\pi}{2}\right)\\ ~\\ \int x\tan(x) d\tan(x) &= -\frac12\tan(x)+\frac{x}{2}(1+\tan^2(x))+C' \end{align*}

So it all plays nicely, at least if we're working in a small enough interval that $n$ is constant. For this particular example we don't have to worry about $n$ changing because the integral diverges if you try to integrate through a discontinuity of the integrand, so everything is undefined anyway. Even if the example were more subtle though, the same calculation would hold, and hence the terms with $n$ would vanish, in each region of continuity.

This issue of constants that look like they might cause problems pops up in Calculus classes in a couple other places that come to mind immediately:

  • A bunch of ordinary trigonometry problems where e.g. you get $\sec^2(x)+C$ and the book says gets $\tan^2(x)+C$
  • Integration by parts, where $u\int\! v\,dx$ sees the constant get multiplied by a whole function, which looks really concerning.
  • Those pesky absolute value bars. You might also be interested in this inverse trig question.
  • 1
    "If you don't have anything nice to say, say it in the footnotes." These issues tend to get glossed over because they never actually cause the problems that they look like they might. This is mostly because they are harmless, but is also because there is a tacit agreement in most Calculus texts to forget during the exercises that not all functions are defined on all of $\Bbb{R}$. And— cynically, because most students won't notice if they're swept under the rug; pragmatically, they take a long time to explain and have little impact, so the time is better spent elsewhere. – Eric Nathan Stucky Aug 11 '23 at 09:55
  • We only talk about diverging integrals when the integral has lower and upper bounds, so the divergence thing you mention doesn't seem to make sense. I think a better way of explaining it is that the antiderivative of $f$ is only defined if $f$ is defined on an interval, so it wouldn't make sense in the first place to find an antiderivative of a function $f$ if $f$ is on some connected component of its domain. – Accelerator Aug 11 '23 at 20:34
  • if $f$ is not on some connected component. Applogies for the bad typo. – Accelerator Aug 11 '23 at 20:43