2

Integrals which involve $\sqrt{(cx + d)^2 - a^2}$ could often be simplified if we do a substitution $cx + d = a \sec t$. If we take a concrete example, $\int \frac{\sqrt{x^2 + x}}{x}dx$, then the substitution would be $$ x + \frac{1}{2} = \frac{1}{2}\sec t \\ dx = \frac{1}{2} \sec t \tan t dt \\ t = arcsec (2x+1) $$

If I carry on that substitution, I get to $$ \frac{1}{2} \int \frac{\sqrt{\tan ^ 2t}}{\sec t - 1} \sec t \tan t dt $$

As far as I understand, that is $$ \frac{1}{2} \int \frac{|\tan t|}{\sec t - 1} \sec t \tan t dt $$

Now, there are two cases, $\tan t \ge 0$ and $\tan t < 0$.

$\tan t \ge 0$ case leads me to the solution also written in the book (and here):

$$ \frac{1}{2} \int \frac{1 + \cos t}{\cos ^ 2 t} dt = \\ \frac{1}{2} \tan t + \frac{1}{2} \log{\frac{1 + \tan \frac{t}{2}}{1 - \tan \frac{t}{2}}} + C = \\ \sqrt{x^2 + x} - \frac{1}{2}\log{|2\sqrt{x^2 + x} + 2x + 1|} + C $$

But if I try the second case (i.e. $\tan t < 0$), I get to the negation of the previous case, so I wonder where did I go wrong? Should I maybe not even consider the negative case?

Thanks!

S11n
  • 898
  • 2
    Notice that we can skirt this issue by using the branch of $\operatorname{arcsec}$ characterized by $t \in \left[-\pi, -\frac{\pi}{2}\right) \cup \left[0, \frac{\pi}{2}\right)$; for that choice, $\tan t \geq 0$ on both components of the domain. – Travis Willse Mar 23 '22 at 10:25
  • 3
    Actually you can ignore justifications of all the steps on the way. The most important issue is whether the derivative of the final result gives the integrated function – Ryszard Szwarc Mar 23 '22 at 15:41
  • @TravisWillse $arcsec x = arccos \frac{1}{x}$ (for $|x| \ge 1$), and the range of $arccos$ was already defined (in the Tom Apostol's book) to be $[0, \pi]$. How much freedom I have to choose the ranges of arc* functions? – S11n Mar 23 '22 at 16:38
  • @RyszardSzwarc That is counterintuitive to me, because the integral could have different values for different intervals, as long as the function is continuous at the endpoints. Here we might be ignoring all values for which $\tan t < 0$, and it seems that I computed only the primitive for the values when $\tan t \ge 0$. I would appreciate a more detailed explanation why your suggestion is justified... – S11n Mar 23 '22 at 16:44
  • 1
    The final result is given in terms of $x.$ If you differentiate that and get $\sqrt{x^2+x}/x$ on each interval then you are done. By the way you shouldn't add the constant $C$ at the end of the solution because the constant can be different for each interval $x<-1$ and $x>0.$ That's a common mistake – Ryszard Szwarc Mar 23 '22 at 17:44
  • 1
    @S11n It's conventional to impose the requirement that a branch ("choice") of, e.g., $\operatorname{arcsec}$ is a right inverse for $\sec$ continuous on its domain. Up to trivial adjustments, i.e., addition of integer multiples of $2 \pi$ on each connected subset of its domain, there are only a few different choices. The one Apostol uses is the most common, probably followed by the alternative I mentioned in my first comment above. – Travis Willse Mar 24 '22 at 03:33
  • @RyszardSzwarc Thank you. If the constant is omitted, isn't it then assumed to be 0, which is even more wrong, than a custom constant? Why don't you make a full answer, so I can accept it and close this question? – S11n Mar 24 '22 at 08:02
  • Ok, I will do that. I prefer not to add any constant assuming that the condition $ \int f(x),dx =F(x)$ is not equality of functions. It simply means that $F'(x)=f(x)$ for $x$ in the domain of the function $f(x).$ – Ryszard Szwarc Mar 24 '22 at 08:26

2 Answers2

3

In the first step we try to guess the result basing on our personal experience and check if the derivative gives back the integrand. If we miss, we can correct our guess and see what happens. In case we are unable to make a good guess, we try to simplify the integrand. In our case $$x^2+x=\left (x+{1\over 2}\right)^2-{1\over 4}={1\over 4}[(2x+1)^2-1]$$ It seems convenient to perform the substitution $u=2x+1.$ In this way we get $${1\over 2}\int {\sqrt{u^2-1}\over u-1}\,du$$ The integrated function is defined on two disjoint intervals $u<-1$ and $u>1.$ For $u>1$ it is tempting to make the substitution $u=\cosh t={1\over 2}(e^t+e^{-t}),$ for $t>0,$ having in mind that $\cosh ^2t-\sinh^2 t=1$ (where $\sinh t={1\over 2}[e^t-e^{-t}]).$ Then $du=\sinh t\,dt$ and we end up with the integral $${1\over 2}\int {\sinh ^2t\over \cosh t-1}\,dt={1\over 2}\int {\cosh^2t-1\over \cosh t-1}\,dt ={1\over 2}\int [\cosh t+1]\,dt={1\over 2}\sinh t +{1\over 2}t$$ Next we have to get back to the original variable $x.$ Solving $$u=\cosh t ={1\over 2}[e^t+e^{-t}],\qquad t>0$$ leads to the quadratic equation for $e^t$ $${1\over 2}\,(e^{t})^2-u\,e^t+{1\over 2}=0$$ from which we get $$e^t=u+\sqrt{u^2-1},\quad \sinh t=\sqrt{u^2-1},\quad t=\log (u+\sqrt{u^2-1}) $$ Remark There are two roots of the equation and their product is equal $1.$ We choose the greater greater root, as $e^t>1$ for $t>0.$

Eventually, as $u=2x+1>1, $ i.e. $x>0,$ we obtain $$\int {\sqrt{x^2+x}\over x}\,dx = {1\over 2}\log(2x+1+\sqrt{4x^2+4x})+{1\over 2}\sqrt{4x^2+4x}\\ ={1\over 2}\log (2x+1+2\sqrt{x^2+x})+\sqrt{x^2+x}\qquad \qquad (*)$$

It remains to consider the case left behind, when $u<-1,$ i.e. $x<-1.$ But since formula $(*)$ holds for $x>1$ and $2x+1+2\sqrt{x^2+x}<0,$ for $x<-1,$ we get the final result $$\int {\sqrt{x^2+x}\over x}\,dx ={1\over 2}\log \mid 2x+1+2\sqrt{x^2+x}\mid+\sqrt{x^2+x}\qquad x\notin [-1,0]$$ Remark Mind that if we are looking for a particular antiderivative $F(x),$ satisfying $F(1)=a $ and $F(-2)=b,$ we have to add to the solution above different constants, depending on the cases $x<-1$ or $x>0.$ Therefore I resist from writing $\int f(x)\,dx =F(x)+C,$ when $f(x)$ is defined on several disjoint open intervals. The formula $\int f(x)\,dx =F(x)$ is just equivalent to $F'(x)=f(x).$ For example $\int 2x\,dx =x^2$ and also $\int 2x\,dx =x^2+1,$ but it does not imply $0=1.$

  • Thank you Ryszard! It seems that the main point of your answer is that the derivative of the right-hand side is the integrand on the whole integrand's domain, and your "But since formula $(*)$ holds for $x>1$ and $2x+1+2\sqrt{x^2+x}<0,$ for $x<-1,$ we get the final result..." mentions very briefly, without any justification, how the second case is treated, which is actually the main question here (and the one I am not sure about). I would appreciate if you could justify that addition of the absolute sign for the negative case. – S11n Mar 24 '22 at 17:24
  • You welcome. A similar phenomenon can be explained on a simpler example. We have $\int {dx\over x}=\log x$ for $x>0.$ Since $\log(-x)$ for $x<0$ has the same (concerning the formula, not the domain) derivative, then we write $\int {dx\over x}=\log|x|,$ $x\neq 0.$ In general $\int {f'(x)\over f(x)},dx =\log |f(x)|,$ and that is exactly what I have used in my answer. Once you know that formula for $f(x)>0$ it automatically extends to $f(x)<0,$ as long as the algebraic formula for $f(x)$ is the same for $f(x)<0$ and $f(x)>0.$ – Ryszard Szwarc Mar 24 '22 at 17:29
2

You may avoid worrying about square-roots or absolute signs by integrating as follows \begin{align} \int \frac{\sqrt{x^2 + x}}{x}dx =& \int \frac{x+\frac12}{\sqrt{x^2 + x}}\>dx+ \int \frac{\frac12}{\sqrt{x^2 + x}}dx\\ =&\>\sqrt{x^2+x}+\frac12\tanh^{-1}\frac{\sqrt{x^2+x}}{x+\frac12}+C \end{align} which is valid for all domain $x$.

Quanto
  • 97,352
  • Thank you, Quanto, but my question was not to find a way which avoids the absolute-signs (in the initial post, I also linked a solution which avoids that), but I am instead curious in general if that is something to "worry" about or not. According to Ryszard Szwarc's answer, if the antiderivative is defined on the whole domain of the integrand, and it's derivative is the integrand on whole domain of the integrand, we do not have to go into the case analysis. Please let us know if that is not correct. – S11n Mar 24 '22 at 17:21
  • That being said, thank you for the very elegant solution! – S11n Mar 24 '22 at 17:27