1

methods used for solving the integral, a^x/√(1-a^2x) dx . The first method has u=1-a^2x and the second u=a^x

Solving the integral $$ \int\frac{a^x}{\sqrt{1-a^{2x}}}\ dx $$ method1: Let $u=1-a^{2x}$ \begin{align} \frac{\mathrm du}{\mathrm dx} &= -a^{2x} \ln a \\ {\mathrm dx} &= \frac{-\mathrm du}{a^{2x} \ln a} \\[.8ex] a^x &= \sqrt{1 - u} \\[.8ex] \int\frac{a^x (-\mathrm du)}{\sqrt u \ a^{2x} \ln a} &= \frac{-1\phantom{-}}{\ln a} \int\frac{\mathrm du}{\sqrt u \sqrt{1 - u}} \\ &= \frac{-1\phantom{-}}{\ln a} \int\frac{\mathrm du}{\sqrt u \sqrt{1 - u}} \\ &= \frac{-1\phantom{-}}{\ln a} \int\frac{\mathrm du}{\sqrt{-u^2 + u - \frac14 + \frac14}} \\ &= \frac{-1\phantom{-}}{\ln a} \int\frac{\mathrm du} {\sqrt{\left(\frac12\right)^2 - \left(u - \frac12\right)^2}} \\ &= \frac{-1\phantom{-}}{\ln a} \left[\sin^{-1}\left(\frac{u - \frac12}{\frac12}\right)\right] \\ &= \frac{-1\phantom{-}}{\ln a} \Big[\sin^{-1}\left(2u - 1\right)\Big] \\ &= \frac{-1\phantom{-}}{\ln a} \sin^{-1}\left(1 - 2a^{2x}\right) + C \end{align}

method2: Let $u=a^x$ \begin{align} \frac{\mathrm du}{\mathrm dx} &= a^x \ln a \\ \int\frac{u}{\sqrt{1 - u^2}} \frac{\mathrm du}{u \ln a} &= \frac{1}{\ln a} \int\frac{\mathrm du}{\sqrt{1 - u^2}} \\ &= \frac{1}{\ln a} \sin^{-1}(u) + C \\ &= \frac{1}{\ln a} \sin^{-1}\left(a^x\right) + C \end{align}

I've still not studied calculus from my teachers, but Im making an effort to learn it on my own. I don't understand why there are two different probable answers for this question (reference book goes by method 2). Can someone explain why this happened?

David K
  • 108,155
  • 1
    Welcome to MSE. It is in your best interest that you type your posts (using MathJax) instead of posting links to pictures. – José Carlos Santos Mar 11 '25 at 13:26
  • 4
    Without checking your work, maybe they just differ by a constant? – Randall Mar 11 '25 at 13:27
  • 3
    Also without checking your work -- you should double check both answers by differentiating to see if you get the original integrand in both cases. There could be a mistake somewhere. – MPW Mar 11 '25 at 13:30
  • Potentially of interest, "method3: $u=\sqrt{1-a^{2x}}$" – abiessu Mar 11 '25 at 13:41
  • One thing I noted is that you made an error while differentiating. By chain rule there should be a 2 in front of your expression. – Random Math Enthusiast Mar 11 '25 at 13:41
  • I think you will find that method1 does not have a derivative that varies by a constant from the remainder of the expression. Hence it will not generate a matching derivative anyway! – String Mar 11 '25 at 13:43
  • 1
    Given $u=1-a^{2x}$ and the chain rule, we get $\frac{du}{dx}=-2a^{2x}\ln(a)$. And note how $a^x$ and $a^{2x}=a^x\cdot a^x$ are not a constant factor apart. When you divide them, you get $\frac{a^{2x}}{a^x}=a^x$ so the outcome still depends on $x$. This means that this substitution cannot succeed! – String Mar 11 '25 at 13:47
  • You can click on the MathJax-link above - or right click on math on this site - to see how you can encode mathematical expressions to be shown in a professional manner on this site. – String Mar 11 '25 at 13:48
  • @RandomMathEnthusiast: That sounds intriguing, although I am confident someone will spot an error or a way to rewrite it. Please do, and please include the work then! – String Mar 11 '25 at 13:50
  • 1
    @RandomMathEnthusiast A quick hack is to plot both answers in Desmos and see if they differ by a constant. That at least gives a hint about whether to look for an integration error or a proof of equality up to a constant. – David K Mar 11 '25 at 13:54
  • Just to say, aside from the chain rule error in the execution of method 1, this is an impressive effort for someone who has only self-studied calculus. Maybe it would have enough "details and clarity" if the handwritten notes were transcribed to mathjax and shown with commentary. – David K Mar 11 '25 at 17:18

2 Answers2

3

I arrived at the answer given by your reference book by making a slight modification to what you did $$ \int\frac{a^x}{\sqrt{1-a^{2x}}}\ dx $$ Let $1-a^{2x} = u^\color{red}{2}$
$\implies -\color{red}{2}a^{2x}\ln a\ dx = \color{red}2\ u\ du $
$\implies \ dx = \frac{u\ du}{-a^{2x}\ln a}$

Substituting in the values, we get, $$\frac{-1}{\ln a}\int \frac{a^x. \color{red}{u}\ du}{\color{red}{u}. a^{2x}} $$ $$ = \frac{-1}{\ln a} \int \frac{du}{\sqrt {1-u^2}} $$ $$ = \frac{- \sin ^{-1}(u)}{\ln a} $$

Substituting in the value of $u$, we get: $$ \boxed {\color{blue}{\frac{- \sin ^{-1}(\sqrt{1-a^{2x}})}{\ln a} + C}} $$

If you want this in the form of your reference book(thanks to mathattack), $$-\frac{\sin^{-1}\left(\sqrt{1-a^{2x}}\right)}{\ln\left(a\right)}+\frac{\pi}{2\ln\left(a\right)}=\frac{\sin^{-1}\left(a^{x}\right)}{\ln\left(a\right)}$$ Hence, it can be written as, $$\boxed {\color{green}{\frac{\sin ^{-1}(a^{x})}{\ln a} + C'} }$$

1

The only error in method 1 is the initial calculation of $\frac{\mathrm du}{\mathrm dx}.$ The correct derivative is $$\frac{\mathrm du}{\mathrm dx} = \frac{\mathrm d}{\mathrm dx} (1 - a^{2x}) = -2a^{2x} \ln a.$$

Replacing $-a^{2x} \ln a$ with $-2a^{2x} \ln a$ in the rest of the calculations, we end up with an extra factor of $2$ in the denominator at the end: $$ \int\frac{a^x}{\sqrt{1-a^{2x}}}\ dx = \frac{-1\phantom{-}}{2\ln a} \sin^{-1}\left(1 - 2a^{2x}\right) + C. $$

This is actually the "same" answer as method 2 in every way that matters, because for all values of $x$ where the integral exists, $ \dfrac{-1\phantom{-}}{2\ln a} \sin^{-1}\left(1 - 2a^{2x}\right) $ and $ \dfrac{1}{\ln a} \sin^{-1}\left(a^x\right) $ differ by a constant. That is, the only actual difference in the results of the two methods is that in order to get the same representative function from the indefinite integral, you need to use a different constant of integration for each method.

In order to show this, first let $v = a^x.$ Note that $v > 0$ because $a^x > 0$ and $v \leq 1$ because otherwise $\sqrt{1 - 2a^{2x}}$ is undefined in the original integral. Therefore $0 < \sin^{-1}(v) \leq \frac\pi2.$ Now let $ y = \sin^{-1}\left(a^x\right) = \sin^{-1}(v). $

Then \begin{align} v &= \sin(y), \\ 1 - 2v^2 &= 1 - 2\sin^2(y) \\ &= \cos(2y) \\ &= \sin\left(\frac\pi2 - 2 y\right). \end{align} Now since $0 < y \leq \frac\pi2,$ we have $-\frac\pi2 <= \frac\pi2 - 2 y < \frac\pi2$ and therefore $$ \sin^{-1}\left(\sin\left(\frac\pi2 - 2 y\right)\right) = \frac\pi2 - 2 y. $$ So returning to the equation $$ 1 - 2v^2 = \sin\left(\frac\pi2 - 2 y\right), $$ we can take the inverse sine on both sides to get $$ \sin^{-1}\left(1 - 2v^2\right) = -2y + \frac\pi2. $$ Substituting back the original values of $v$ and $y,$ $$ \sin^{-1}\left(1 - 2a^{2x}\right) = -2\sin^{-1}\left(a^x\right) + \frac\pi2. $$ Multiply by $\dfrac{-1\phantom{-}}{2\ln a}$ on both sides: $$ \frac{-1\phantom{-}}{2\ln a} \sin^{-1}\left(1 - 2a^{2x}\right) = \frac{1}{\ln a}\sin^{-1}\left(a^x\right) - \frac{\pi}{4\ln a}. $$

Thats the result of method 1 on the left and the result of method 2 (minus a constant) on the right. So all we need to do to make the two methods agree perfectly is to add $ \dfrac{\pi}{4\ln a} $ to one of the constants of integration.


This is a recurring issue with integration. There is often more than one way to write a formula for the same function, for example when we start getting into trig functions and inverse trig functions. The formulas may look very different; this example is actually relatively mild, since at least it's the same function names on both sides. Different $u$-substitutions often lead to different formulas in the end, sometimes differing by a constant. There are many other examples of this phenomenon on this site, but every example has its own unique twists and turns as to why the two seemingly very different formulas only actually differ by a constant.

David K
  • 108,155