# Integral substitution help

1. Jan 1, 2008

### Himanshu

1. The problem statement, all variables and given/known data

$$\int1/[Sin[x]\sqrt{}((Sin[x])^2+k)]$$

3. The attempt at a solution

I dont have any idea of the solution. Mathematica gives the answer as

-(1/sqrt(k))ArcTanh[(Sqrt(2k)Cos(x))/sqrt(1+2k-cos(2x)]

Last edited: Jan 1, 2008
2. Jan 1, 2008

### rocomath

That is the most ambiguous Integral I've ever seen. Re-type plz.

3. Jan 1, 2008

### HallsofIvy

Staff Emeritus
You forgot the "dx"! That is important if only to remind you that you need to substitute for that as well as for x.
My first thought would be to make the substitution u= Sin(x). The du= cos(x) dx and, since $cos(x)= \sqrt{1- sin^2(x)}$, $du= \sqrt{1- u^2}dx$ so $du/\sqrt{1-u^2}= dx$. $1/(sin(x)\sqrt{sin^2(x)+ k})$ becomes $1/(u\sqrt{u^2+ k})$ an so the integral becomes
$$\int \frac{du}{u\sqrt{1- u^2}\sqrt{u^2+ k}}$$
It's not at all clear now how to reduce that! Probably some kind of, or sequence of, trig substitutions now.

4. Jan 1, 2008

### arildno

Well I thought of trying sin(x)=sqrt{k}Sinh(u), or something.
Haven't gone through the calculations yet.

5. Jan 1, 2008

### Gib Z

arildno's substitution reduces it to $$\frac{1}{\sqrt{k}} \int \frac{1}{\sinh u \sqrt{1-k\sinh^2 u}} du$$. I can't immediately see how to do that either.

6. Jan 1, 2008

### Rainbow Child

The substitution

$$\sin x=\sqrt{k\,\frac{u^2-1}{k\,u^2+1}}$$

reduces it to

$$\int\frac{d\,u}{\sqrt{k}\,(1-u^2)}=\frac{1}{\sqrt{k}}\,\text{arctanh} u$$

Last edited: Jan 2, 2008
7. Jan 2, 2008

### unplebeian

Only if it were rescpect to anything other than dx or dk, eh HallsOfIvy!

Rainbow_Child, may I ask you what inspiration led you for such a asubstitution? I mean what insight did you have (not joking, I am serious...assuming your steps are correct that's an incredible that you could 'see' that substitution was going to work)

I tried the following and it seems to work out.

Let u= sin^2(x) +k, to get sin^2(x)= u-k and hence cos(x)= sqrt(1-u+k)
dx= cosec(x)/(2 x cos(x)) which yields in

int (du/sqrt(1-u-k)) From there it's easy.

8. Jan 2, 2008

### Rainbow Child

I didn' t "saw" the transformation from the begging, even though I would like to!
I construct it. The integral was not fitting in any "recipe" I know, so I started like looking for a transformation

$$\sin x=\sqrt{k\,f(u)},\quad d\,x=\frac{\sqrt{k}\,f'(u)}{2\,\sqrt{f(u)\,(1-k\,f(u))}}\,d\,u$$

and now the integral becomes

$$\int \frac{f'(u)}{2\,\sqrt{k}\,f(u)\,\sqrt{(1-k\,f(u))\,(1+f(u))}}\,d\,u$$

Now I want to get rid of the square root $\sqrt{(1-k\,f(u))\,(1+f(u))}$, so the easy way is to set it equal to $u^2$, but that will produce additional square roots if we solve for $f(u)$.

The "trick" is to the set $u^2$ the fraction $$\frac{1+f(u)}{1-k\,f(u)}$$, so $$f(u)=\frac{u^2-1}{k\,u^2+1}$$ and

$$(1+f(u))\,(1-k\,f(u))=\frac{1+f(u)}{1-k\,f(u)}\,(1-k\,f(u))^2=u^2\,\left(\frac{k+1}{k\,u^2+1}\right)^2$$

Putting all these together you have the answer! Maybe there is a quicker way, but I could think only that!

$$\int \frac{1}{\2\,(u-k)\,\sqrt{u\,(-u+k+1)}}\,du$$

if I did correctly the calculations.

9. Jan 6, 2008

### coomast

@ Rainbow Child, I think you made a small mistake by evaluating the final integral. The substitution was:

$$u^2=\frac{k+sin^2(x)}{k\cdot cos^2(x)}$$

And because $$sin^2(x) \leq 1$$ and $$cos^2(x) \leq 1$$ the value of $$u^2 \geq 1$$ therefore the integral should read:

$$I=-\frac{1}{\sqrt{k}}\int\frac{du}{1-u^2}=-\frac{1}{\sqrt{k}}arctanh\left(\frac{1}{u}\right)+C$$

This gives then the result from mathematica as described in the original post.

It is a very nice substitution, one I think is certainly comparable to the ones of Euler or the substitution of Sommerfeld.

10. Jan 6, 2008

### Rainbow Child

Thanks, coomast! :shy:

My calculations is always a drawback to me!

11. Jan 6, 2008

### Gib Z

$$\int \dfrac { \sin \, x \; dx } { \sin^2 \, x \cdot \sqrt { a^2 + \sin^2 \, x } } \;=\; \int \dfrac { \sin \, x \; dx } { ( 1 - \cos^2 \, x ) \cdot \sqrt { (a^2 + 1) - \cos^2 \, x } }$$

$$=\; \int \dfrac { \sec^2 \, x \;\tan\, x \; dx } { ( \sec^2 \, x - 1 ) \cdot \sqrt { (a^2 + 1 ) \sec^2 \, x - 1} }$$

Letting $u^2 \;=\;(a^2 + 1 ) \sec^2 \, x - 1$,

$$I\; =\;\dfrac { 1 } { a^2 + 1} \; \int \dfrac { u\; du } { ( \dfrac { u^2 + 1} { a^2 + 1} - 1 ) \cdot u } \;=\; \int \dfrac { du } { u^2-a^2}$$

$$\;=\; \dfrac {1} {2a} \ln \bigg| \dfrac {u-a} {u+a } \bigg | \qquad \text{or} \qquad - \frac {1}{a} \text{coth}^ {-1} \; \dfrac { u} { a}$$

$$\;=\; \dfrac {1} {2a} \ln \bigg| \dfrac { \sqrt { a^2 + \sin^2 \, x } -a\cos\, x } {\sqrt { a^2 + \sin^2 \, x } +a\cos\, x } \bigg | \qquad \text{or}$$

$$- \frac {1}{a} \text{coth}^ {-1} \left( \dfrac { \sqrt { a^2 + \sin^2 \, x } } { a \cos\, x } \right)$$.

12. Jan 6, 2008

### rocomath

wtf ... wowz0r :O

13. Jan 7, 2008

### coomast

@ Gib Z, you also made the mistake I mentioned earlier, the value of $$u^2 \geq 1$$, so the final integral is equal to:

$$\int \frac{du}{u^2-a^2}=-\frac{1}{a}arctanh \left( \frac{a}{u} \right)+C$$

giving the mathematica result from the first post:

$$I=-\frac{1}{a}arctanh \left( \frac{\sqrt{2}\cdot a\cdot cos(x)}{\sqrt{2a^2+1-cos(2x)}} \right)+C$$

Very nice way of solving this integral.

14. Jan 8, 2008

### Gib Z

I over several days on finding this solution, I assure you there is no mistake =]

$$\tanh^{-1} x = \coth^{-1} \left(\frac{1}{x}\right)$$

To prove this, its a simple matter of looking at the definitions of those functions in terms of the natural logarithm.

15. Jan 8, 2008

### coomast

Gib Z, the result is indeed correct. I was a bit confused because of the following result:

$$\int \frac{dx}{a^2-x^2}=\frac{1}{2a}ln\left|\frac{a+x}{a-x}\right|+C$$

which is equal to:

$$\frac{1}{a}tanh^{-1}\left(\frac{x}{a}\right)+C \qquad x^2<a^2$$

$$\frac{1}{a}coth^{-1}\left(\frac{x}{a}\right)+C \qquad x^2>a^2$$

this together with:

$$\tanh^{-1}(x)=\coth^{-1}\left(\frac{1}{x}\right) \qquad |x|<1$$

made me mixing things. Never mind, the result is good, however it would have been nice that the conditions were checked for. I assume you did, but didn't mention them, from which my error. Again, a very nice way of solving the integral.

16. Jan 8, 2008

### Gib Z

I don't actually see why we need the |x|>1 condition for the 4th expression.

For any functions f(x), g(x) related as such ; $$f(x) = \frac{1}{g(x)}$$, we can see that $$x = f^{-1} \left( \frac{1}{g(x)} \right)$$, as well as $$x= g^{-1} (g(x))$$. Combining these results and letting u= g(x);

$$g^{-1} (u) = f^{-1} \left( \frac{1}{u} \right)$$. There is no need for |x| > 1, though one may state x can not be zero, but one soon realizes that when one tries to divide by it =]

17. Jan 11, 2008

### coomast

Isn't the function $$tanh^{-1}(x)$$ defined only for $$|x|<1$$?

18. Jan 12, 2008

### Gib Z

I am too rushed in my evaluations =] Sorry, the tanh function is defined for all values of x except for |x| > 1 the value is complex. Of course, we only deal with real values for real integrals =]