# How to solve these indefinite integrals of composite functions

1. Jul 23, 2012

### lo2

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

Well I have these three different integrals:

$\int{\frac{1}{\sqrt{4x^2-1}}dx}$

$\int{\frac{1}{4-x^2}dx}$

$\int{\frac{1}{x^2+4x+8}dx}$

2. Relevant equations

Yeah well not exactly sure how to approach this...

Do you use integration by substitution, where you come up with some clever substitution? And can you use the same approach for these different integrals?

3. The attempt at a solution

Yeah well I wanted to hear your take on this, as I do not really have a clue how you do this stuff. At the moment I am self studying, so I do not really have a teacher to ask...

Hope you can and will help me!

Last edited: Jul 23, 2012
2. Jul 23, 2012

### unscientific

hint: partial fractions, completing the square, look up formulas for differentiating sin/cos/tan inverses

3. Jul 23, 2012

### HallsofIvy

Staff Emeritus
$sec^2(t)- 1= tan^2(t)$ so you can use 2x= sec(t) to get rid of the square root.

$4- x^2= (2- x)(2+ x)$ so you can use partial fractions to write
$$\frac{1}{4- x^2}= \frac{A}{2- x}+ \frac{B}{2+ x}$$
for appropriate A and B.

$x^2+ 4x+ 8= x^2+ 4x+ 4+ 4= (x+ 2)^2+ 8$ so start with the substitution u= x+ 2.

4. Jul 23, 2012

### Curious3141

I agree with HallsofIvy's suggestion for the middle one - do a partial fraction decomposition as he advised.

For the first one, I would prefer to use a hyperbolic trig substitution. Try $2x = \cosh y$, the integral will fold much faster.

For the third one, I agree with completing the square. There's a typo in Halls' post, and the denominator should be ${(x+2)}^2 + 4$. However, after this point, I suggest immediately substituting $x + 2 = 2\tan \theta$.

5. Jul 24, 2012

### lo2

Ok well might be a bit in over my head, as I do not really understand any of those tips.

But well let us try and start with the first one:

If I make this substitution I get this integral:

$\int{\frac{1}{\sqrt{2cosh^2(y)-1}}dx}$

And I guess this has got some useful connection with some of the derivatives of these inverse trigonometric functions, right? I just do not really know of them...

So can I request for yet another hint?

6. Jul 24, 2012

### Curious3141

Actually, if $2x = \cosh y$, then $4x^2 = {(2x)}^2 = \cosh^2 y$.

So the integral becomes $\int{\frac{1}{\sqrt{cosh^2(y)-1}}dx}$ actually.

The hyperbolic trig functions have identities that are similar to, but NOT identical to the ordinary (circular) trig identities. One such identity is $\cosh^2 y - \sinh^2 y = 1$. Use this to simplify the integrand further, removing the square root.

Now you need to express $dx$ in terms of $dy$. Can you do that? You might need to look up the derivatives of the hyperbolic trig functions. You'll find that they're again similar to, but subtly different from the way you differentiate the circular trig functions.

With regard to your reference to inverse trig functions, you might have a misconception. Please remember we're talking about hyperbolic trig functions here. A different ball game, really. So feel free to use these substitutions if you're acquainted with them, but if you're not, you might be better off with a simple trig substitution as HallsofIvy proposed. The advantage of the hyperbolic trig sub here is that you end up with a completely trivial integral very quickly, but the ordinary trig substitution lands you with an integral of secant, which is slightly tricky to integrate from first principles.

Last edited: Jul 24, 2012
7. Jul 24, 2012

### lo2

Ok I think I have nailed the second one:

$\int{\frac{1}{4-x^2}dx}$

Ok so now I am looking at the inside part of the integral:

$\frac{1}{4-x^2}=\frac{1}{(2-x)(2+x)}=\frac{A}{(2-x)}+\frac{B}{(2+x)}=$

$\frac{A(2+x)}{(2-x)(2+x)}+\frac{B(2-x)}{(2+x)(2-x)}=\frac{A(2+x)+B(2-x)}{(2+x)(2-x)}=\frac{1}{(2+x)(2-x)}=$

As the denominator is the same we can write the following equation:

$A(2+x)+B(2-x)=1$

And we then find A and B, by respectively giving x a value so that first A equals 0 and then B equals 0. First we find B for x = -2:

$A(2+(-2))+B(2-(-2))=1 \Leftrightarrow 4B=1 \Leftrightarrow B=\frac{1}{4}$

We then find A in the same fashion, we obtain that:

$A=\frac{1}{4}$

We now have the following integral:

$\int{\frac{1}{4(2-x)}+\frac{1}{4(2+x)}dx}=\int{\frac{1}{4(2-x)}dx}+\int{\frac{1}{4(2+x)}dx}$

I then use the substitutions:

$u=2-x$ and $t=2+x$

Where:

$\frac{du}{dx}=-1$ and $\frac{dt}{dx}=1$

So we get these integrals now:

$\int{\frac{1}{4u}du}+\int{\frac{1}{4t}dt}=-4 \ln{|u|}+4\ln{|t|}+C=-4 \ln{|x-2|}+4\ln{|x+2|}+C$

I might have to add that $x>2$ or how?

8. Jul 25, 2012

### lo2

Ok I guess the solution should look like this:

$-\int{\frac{1}{4u}du}+\int{\frac{1}{4t}dt}=\frac{-1}{4} \ln{|u|}+\frac{1}{4} \ln{|t|}+C=\frac{-1}{4}\ln{|x-2|}+\frac{1}{4} \ln{|x+2|}+C$

9. Jul 25, 2012

### HallsofIvy

Staff Emeritus
Yes, that last is correct. And while x clearly cannot be equal to 2, it does NOT have to be larger than 2.

10. Jul 25, 2012

### lo2

Thanks for the feedback! And yeah I guess you do have a point about x being able to be less than 2... :D

It is not easy to be a mere mortal among all these math geniuses ^^

11. Jul 25, 2012

### Ezio3.1415

As you are a beginner you can use this http://www.wolframalpha.com/ ... If u can't solve a problem(after trying let's say half an hour) enter the function there... scroll down and click 'show steps' of indefinite integral... The thing is you will see how to approach a problem... This way you will learn much more techniques... But I would suggest you not to use the site later very much cause that would stop you from brain storming...