7

Let

$$g(x)=\sqrt{\dfrac{4-x}{4+x}}.$$

I would like to find the primitive of $g(x)$, say $G(x)$.

I did the following: first the domain of $g(x)$ is $D_g=(-4, 4]$. Second, we have

\begin{align} G(x)=\int g(x)dx &=\int\sqrt{\dfrac{4-x}{4+x}}dx\\ &=\int\sqrt{\dfrac{(4-x)(4-x)}{(4+x)(4-x)}}dx\\ &=\int\sqrt{\dfrac{(4-x)^2}{16-x^2}}dx\\ &=\int\dfrac{4-x}{\sqrt{16-x^2}}dx\\ &=\int\dfrac{4}{\sqrt{16-x^2}}dx-\int\dfrac{x}{\sqrt{16-x^2}}dx\\ &=\int\dfrac{4}{\sqrt{16(1-x^2/16)}}dx+\int\dfrac{-2x}{2\sqrt{16-x^2}}dx\\ &=\underbrace{\int\dfrac{1}{\sqrt{1-(x/4)^2}}dx}_{\text{set $t=x/4$}}+\sqrt{16-x^2}+C\\ &=\underbrace{\int\dfrac{4}{\sqrt{1-t^2}}dt}_{\text{set $t=\sin \theta$}}+\sqrt{16-x^2}+C\\ &=\int\dfrac{4\cos\theta}{\sqrt{\cos^2\theta}}d\theta+\sqrt{16-x^2}+C\\ \end{align}

So finally, I get

$$G(x)=\pm\theta+\sqrt{16-x^2}+C'.$$

With wolframalpha I found some different answer. Could you provide any suggestions?

Also, multiplying by $4-x$ is it correct at the beginning? because I should say then that $x\neq 4$.

Integreek
  • 8,530
Zir
  • 557
  • 1
    At the least, tou need to put the $\pm\theta$ term back in terms of $x$. – hmakholm left over Monica Jan 08 '17 at 19:37
  • You have both $\theta$ and $x$ in your final solution. You should express it with the original variable ($x$) for consistency and clarity: $\theta=\arcsin(t)=\arcsin(\frac{x}{4})$ – user12345 Jan 08 '17 at 19:38
  • You don't need to consider $\pm\theta$. If you set $t=\sin\theta$ and $t\in\langle -1,1\rangle$, then $\theta\in\langle -\pi/2,\pi/2\rangle$. Cosine is positive there, so $\sqrt{\cos^2\theta} = \cos\theta$. Also, it should be $4\theta$, shouldn't it? – Ennar Jan 08 '17 at 19:58
  • $$\int\frac{4\cos(\theta)}{\sqrt{\cos^2(\theta)}},\mathrm{d}x=\pm4\theta+C$$ – robjohn Jan 08 '17 at 21:43
  • https://math.stackexchange.com/a/5002025/1361661 – Integreek Nov 23 '24 at 05:57

4 Answers4

5

First of all, you are right that there is trouble in multiplying by $\frac{4-x}{4-x}$ when $x=4$. But why bother with the domain $\langle-4,4]$ in the first place? You can change the integrand at one point without changing integral, so that one point is irrelevant. Thus, choose $D_g = \langle-4,4\rangle$.

The only other issue is the one that I already mentioned in the comments. If you substitute $t = \sin\theta \in\langle -1,1\rangle$, just choose $\theta$ to be in $\langle-\frac\pi 2,\frac\pi 2\rangle$ (substitution is natural bijection that way). Then you have that $\cos\theta>0$, and thus $\sqrt{\cos^2\theta}=\cos\theta$.

So, your final result should be $$4\theta + \sqrt{16-x^2} + C = 4\arcsin\frac x4 + \sqrt{16-x^2} + C$$ and if you differentiate it, you can see that the result is just fine.

Although your procedure is fine, in this case you might want to make trigonometric substitution much sooner:

$$\int\sqrt{\frac{4-x}{4+x}}\,dx = \int\frac{4-x}{\sqrt{16-x^2}}\, dx = [x = 4\sin t] =\int \frac{4-4\sin t}{4\cos t}\cdot 4\cos t\, dt=\\ = 4(t+\cos t)+C = 4\arcsin\frac x4 +4\cos(\arcsin\frac x4) + C = 4\arcsin\frac x4 +4\sqrt{1-\frac{x^2}4} + C$$

Ennar
  • 24,364
3

Solving a more general problem, using integration by parts:

$$\mathcal{I}_\text{n}\left(x\right)=\int\sqrt{\frac{\text{n}-x}{\text{n}+x}}\space\text{d}x=x\sqrt{\frac{\text{n}-x}{\text{n}+x}}+\text{n}\int\frac{x}{\left(\text{n}+x\right)^2\sqrt{\frac{2\text{n}}{\text{n}+x}-1}}\space\text{d}x$$

Now, substitute $\text{u}=\text{n}+x$ and $\text{d}\text{u}=\text{d}x$:

$$\int\frac{x}{\left(\text{n}+x\right)^2\sqrt{\frac{2\text{n}}{\text{n}+x}-1}}\space\text{d}x=\int\frac{\text{u}-\text{n}}{\text{u}^2\sqrt{\frac{2\text{n}}{\text{u}}-1}}\space\text{d}\text{u}$$

Seperate the integral:

$$\int\frac{\text{u}-\text{n}}{\text{u}^2\sqrt{\frac{2\text{n}}{\text{u}}-1}}\space\text{d}\text{u}=\int\frac{\text{u}}{\text{u}^2\sqrt{\frac{2\text{n}}{\text{u}}-1}}\space\text{d}\text{u}-\int\frac{\text{n}}{\text{u}^2\sqrt{\frac{2\text{n}}{\text{u}}-1}}\space\text{d}\text{u}=$$ $$\int\frac{1}{\text{u}\sqrt{\frac{2\text{n}}{\text{u}}-1}}\space\text{d}\text{u}-\text{n}\int\frac{1}{\text{u}^2\sqrt{\frac{2\text{n}}{\text{u}}-1}}\space\text{d}\text{u}$$

So:

  1. $$\int\frac{1}{\text{u}\sqrt{\frac{2\text{n}}{\text{u}}-1}}\space\text{d}\text{u}=\int\frac{1}{\sqrt{\text{u}}\sqrt{2\text{n}-\text{u}}}\space\text{d}\text{u}=2\arcsin\left\{\frac{\sqrt{\text{u}}}{\sqrt{2}\sqrt{\text{n}}}\right\}+\text{C}_1$$
  2. Substitute $\text{s}=\frac{2\text{n}}{\text{u}}-1$ and $\text{d}\text{s}=-\frac{2\text{n}}{\text{u}^2}\space\text{d}\text{u}$: $$\int\frac{1}{\text{u}^2\sqrt{\frac{2\text{n}}{\text{u}}-1}}\space\text{d}\text{u}=-\frac{1}{2\text{n}}\int\frac{1}{\sqrt{\text{s}}}\space\text{d}\text{s}=\text{C}_2-\frac{\sqrt{\frac{2\text{n}}{\text{u}}-1}}{\text{n}}$$
Jan Eerland
  • 29,457
  • If I understood correctly, OP wanted their solution to be inspected and suggested upon, not analyze another. But I might be wrong. – Ennar Jan 08 '17 at 20:40
3

Substitute $x=4\frac{1-y^2}{1+y^2}$ so that $y=\sqrt{\frac{4-x}{4+x}}$: $$ \begin{align} \int\sqrt{\frac{4-x}{4+x}}\,\mathrm{d}x &=4\int y\,\mathrm{d}\frac{1-y^2}{1+y^2}\\ &=-16\int\frac{y^2}{\left(1+y^2\right)^2}\,\mathrm{d}y\\ &=-16\int\frac{\tan^2(\theta)}{\sec^2(\theta)}\,\mathrm{d}\theta\\ &=-16\int\sin^2(\theta)\,\mathrm{d}\theta\\ &=-16\int\frac{1-\cos(2\theta)}2\,\mathrm{d}\theta\\ &=-8\theta+4\sin(2\theta)+C\\ &=-8\theta+8\frac{\tan(\theta)}{\sec^2(\theta)}+C\\ &=-8\tan^{-1}\left(\sqrt{\frac{4-x}{4+x}}\right)+\sqrt{16-x^2}+C \end{align} $$

robjohn
  • 353,833
  • If I understood correctly, OP wanted their solution to be inspected and suggested upon, not analyze another. But I might be wrong. – Ennar Jan 08 '17 at 20:41
1

As you have already received an answer regarding the confusion of $\theta$ and multiplying by $\frac{4-x}{4-x}$ in your solution, I would like to share an alternative method which is to substitute $x=4\cos2\theta, \theta\in\left[0,\frac\pi2\right)$ since the argument in the square root resembles the half-angle formula for tangent:

$$\sqrt{\frac{1-\cos2\theta}{1+\cos2\theta}}=|\tan\theta|$$

Hence,

$$\begin{align}\int\sqrt{\frac{4-x}{4+x}}\mathrm dx&=-8\int\tan\theta\cdot\sin2\theta \mathrm d\theta\\&=-16\int\sin^2\theta\mathrm d\theta\\&=8\int\cos2\theta-1\mathrm d\theta\\&=4\sin2\theta-8\theta+C\\&=\sqrt{16-x^2}+4\sin^{-1}\frac{x}4+C\end{align}$$

Integreek
  • 8,530