2

Let $b-a=m$ and $b+a=n$, where $a$ and $b$ are real numbers. Then the following identities hold:

$$\frac{1-e^{\pm\text{i}\alpha}}{1+e^{\pm\text{i}\alpha}}=\tan{\left(\frac12\sec^{-1}\left(\frac{x+b}{a}\right)\right)}=\frac{\sqrt{x+b-a}}{\sqrt{x+b+a}}=\frac{\sqrt{x+m}}{\sqrt{x+n}},\tag{1}$$

$$e^{\pm\text{i}\alpha}=\tan\left(\frac{1}{2} \csc^{-1}\left(\frac{x+b}{a}\right)\right) = \frac{x + b - \sqrt{(x + b)^2 - a^2}}{a}\tag{2}$$

These identities are generalizations of identities $(1-2)$ and $(9-10)$ at "Integration using Euler-like identities" and can be derived similarly as shown in the linked blog. The general identities $(1)$ and $(2)$ lead us to the following general transformation formula:

$$\boxed{\int f\left(x,\tan{\frac{\beta}{2}}, \tan{\frac{\gamma}{2}} \right)\,dx=\int f\left(\frac{e^{i\alpha}+e^{-i\alpha}}{2}a, e^{\pm\text{i}\alpha}, \frac{1-e^{\pm\text{i}\alpha}}{1+e^{\pm\text{i}\alpha}}\right)\,\frac{e^{-\text{i}\alpha}-e^{\text{i}\alpha}}{2i}a\,d\alpha}\tag{3}$$ Where $\alpha=\cos^{-1}\left(\frac{x+b}{a}\right)$, $\beta=\csc^{-1}\left(\frac{x+b}{a}\right)$ and $\gamma=\sec^{-1}\left(\frac{x+b}{a}\right).$ Use the upper sign for the alternating signs $\mp$ when $\frac{x + b}{a} \geq 1$ and the lower sign when $0 \leq \frac{x + b}{a} \leq 1$.

To illustrate its usefulness, let's look at the following example taken from the YouTube channel Prime Newtons.

Example 1. Evaluate

$$\int \frac{\sqrt{x+1}}{\sqrt{x+2}}\,dx$$

Solution. First, we obtain the values of $a$ and $b$ by solving the following (simple!) system of equations:

$$\left. b-a=1\atop a+b=2\right\}$$

The solutions are $a = \frac{1}{2}$ and $b = \frac{3}{2}$. Applying formula $(3)$ for $x\geq-1$, the integral becomes

$$\begin{aligned}\int \frac{\sqrt{x+1}}{\sqrt{x+2}}\,dx&= -\frac{i}{4}\int \frac{(1 - e^{i\alpha}) (e^{-i\alpha} - e^{i\alpha})}{(e^{i \alpha} + 1)} \, d\alpha\\&=-\frac{i}{4}\int \frac{e^{-i\alpha} (e^{i\alpha} - 1) (e^{2i\alpha} - 1)}{e^{i\alpha} + 1} \, dx\\&=-\frac{i}{4}\int e^{-i\alpha}(e^{i\alpha}-1)^2\,d\alpha\\&=-\frac{i}{4}\int (e^{-i\alpha}+e^{i\alpha}-2)\,d\alpha\\&=\frac14(2i\alpha+e^{-i\alpha}-e^{i\alpha})+C\end{aligned}$$

To switch to real numbers, replace from $(2)$, then replace the values of $a$ and $b$ and simplify, obtaining

$$=\sqrt{x^2+3x+2} + \frac{1}{2} \log\left(2x - 2\sqrt{x^2+3x+2} + 3\right)+C$$

On the Prime Newtons YouTube channel, they first perform a variable change, followed by a trigonometric substitution, reducing the integral to integrals involving the secant and secant cubed. This integral calculator uses $u^2 = \frac{x+1}{x+2}$ and then (a complicated) partial fraction decomposition. This can be even more complicated for integral like this one:

$$\int \frac{x\sqrt{x+1}}{\sqrt{x+2}}\,dx$$

where as my method only requires a few lines of algebra and basic calculus, as in Example 1. So, here is my question:

Do you know of any other more straightforward method for this type of integrals? Thanks in advance.

2 Answers2

1

The substitution $u = \sqrt{\frac{x + m}{x + n}}$ (assuming $m \neq n$) gives $x = \frac{-n u^2 + m}{u^2 - 1}$ and thus transforms the integral as $$\int f\left(x, \sqrt{\frac{x + m}{x + n}}\right) dx = 2 (n - m) \int \frac{u f \left(\frac{-n u^2 + m}{u^2 - 1}, u\right) du}{(u^2 - 1)^2} .$$ If $f$ is rational, for example, so is the integral in $u$.

If $m < n$, then $u \in (0, 1)$, and we can apply the hyperbolic substitution $u = \tanh t$, $du = \operatorname{sech}^2 t \,dt$, which transforms the integral to $$2 (n - m) \int f\left(n \sinh^2 t - m \cosh^2 t, \tanh t\right) \sinh t \cosh t \,dt .$$ (This substitution is the hyperbolic analogue of the trigonometric substitution $u = \sin \theta$, which is presumably the one used in the linked video.)

We can back-substitute efficiently using the identities: $$\sinh t = \sqrt{\frac{x + m}{n - m}} \qquad \textrm{and} \qquad \cosh t = \sqrt{\frac{x + n}{n - m}} .$$

For the function in Example 1 ($f(p, q) = q$) the hyperbolic substitution yields \begin{align} \int \sqrt{\frac{x + m}{x + n}} \,dx &= 2 (n - m) \int \sinh^2 t \,dt \\ &= (n - m) (\sinh t \cosh t - t) + C \\ &= \boxed{\sqrt{(x + m) (x + n)} - (n - m) \operatorname{artanh} \sqrt{\frac{x + m}{x + n}} + C} . \end{align} The function $f(p, q) = p q$ is a more involved but still more than manageable by hand: \begin{align} \int x &\sqrt{\frac{x + m}{x + n}} \,dx \\ &= 2 (m - n) \int (m \cosh^2 t + n (1 - \cosh^2 t)) \sinh^2 t \,dt \\ &= \frac{2 x + m - 3 n}4 \sqrt{(x + m) (x + n)} + \frac{(3 m + n) (n - m)}{4} \operatorname{artanh} \sqrt{\frac{x + m}{x + n}} + C . \end{align}

If $m > n$, then $u \in (1, \infty)$, and we can apply the substitution $u = \coth s, du = \operatorname{csch}^2 s$ (alternatively, $u = \cosh s, du = \sinh s$; cf. $u = \sec \alpha$, $du = \sec \alpha \tan \alpha \,d\alpha$), which leads to analogous formulae.

Travis Willse
  • 108,056
  • USM reduces all integrals of this type to polynomial-like forms. I don't think your solution/method is simpler. See example 5 in the link provided. – Emmanuel José García Feb 08 '25 at 18:32
  • By the way, in the link to the article on USM, I have removed the complex exponentials and provided transformation formulas in the variable t, which immediately convert this class of integrals (and others) into rational or polynomial-like integrands. – Emmanuel José García Feb 08 '25 at 18:43
0

As you have already received an answer that explains a possible general method to deal with integrals of this type(I can't think of any other general method), I will share a simpler method to evaluate the integrals you stated as examples. Rationalizing the numerator and then breaking it up on the basis of the derivative of the quadratic in the denominator yields: $$\begin{align}\int\frac{\sqrt{x+1}}{\sqrt{x+2}}\mathrm dx&=\int\frac{x+1}{\sqrt{x^2+3x+2}}\mathrm dx\\&=\frac12\int\frac{\mathrm d(x^2+3x+2)}{\sqrt{x^2+3x+2}}-\frac12\int\frac{\mathrm dx}{\sqrt{x^2+3x+2}}\\&=\sqrt{x+1}\sqrt{x+2}-\frac12\cosh^{-1}|2x+3|+C\end{align}$$

Similarly, for the second integral, split the numerator in terms of the quadratic obtained in the square root and its derivative:

$$\begin{align}\int\frac{x\sqrt{x+1}}{\sqrt{x+2}}\mathrm dx&=\int\frac{x^2+x}{\sqrt{x^2+3x+2}}\mathrm dx\\&=\int\sqrt{x^2+3x+2}\,\mathrm dx-\int\frac{\mathrm d(x^2-3x+2)}{\sqrt{x^2-3x+2}}+\int\frac{\mathrm dx}{\sqrt{x^2+3x+2}}\\&=\frac{2x-5}4\sqrt{x+1}\sqrt{x+2}+\frac78\cosh^{-1}|2x+3|+C\end{align}$$

Integreek
  • 8,530
  • I don't think none of this is simpler than the solution provided by USM. See example 5 at A Unified Substitution Method for Integration. USM reduce all integrals of that form to polynomial-like form only requiring power rule (except, of course, when the exponent is $-1$). – Emmanuel José García Feb 08 '25 at 17:50
  • Well, I suppose which method is simpler for each person is a subjective matter. However, saying that it is more intuitive for you is not a strong argument. In fact, I think you used a standard formula for the form $\frac{1}{\sqrt{P(x)}}$. That is the problem I see with traditional methods: you have to memorize too much or, alternatively, integrate it from scratch. – Emmanuel José García Feb 08 '25 at 18:08
  • I also shared the draft of the USM with someone I consider a genius (and I'm not the only one who thinks so) in programming, and they concluded that USM is clearer and more efficient than Rubi's algorithm. I'm not the only one who sees the computational advantages of USM. – Emmanuel José García Feb 08 '25 at 18:13
  • @EmmanuelJoséGarcía but your question asks if there is any method more straightforward than complex exponentials and not the variable $t$ mentioned in the PDF on USM. – Integreek Feb 09 '25 at 05:34
  • After asking this question, I realized that the transformation formulas could be written in $t$-terms, which is clearer. But if you had clicked the link to my blog in my original question, you would have noticed that the transformations in $t$ are in the summary at the end of the post. – Emmanuel José García Feb 09 '25 at 17:13