# Challenging integral

1. Jun 18, 2008

### dirk_mec1

$$\int \frac{x^2-1}{(x^2+1) \sqrt{x^4+1} }\ \mbox{d}x$$

I know I have to use some substitution but I can't figure out which one can someone help me?

2. Jun 18, 2008

### Defennder

Try it out on the online integrator, there's no elementary solution for the indefinite integral.

3. Jun 18, 2008

### Gib Z

Sometimes the Integrator gets it wrong. If the OP knows for a fact it is do-able, we should wait a little longer before dismissing it. Perhaps he missed limits on the integral. At first sight I might try somethings with u=x^2+1.

4. Jun 18, 2008

### dirk_mec1

Strange... indeed the online integrator gives an elliptic integral. By the way I found out that they say use

$$u = \sqrt{x^2 +x^{-2}}$$

But I can't simplify the integral.

5. Jun 18, 2008

### fantispug

I don't think I would have ever thought of that substitution personally, but it works like a charm. Where do you get stuck?

6. Jun 18, 2008

### dynamicsolo

This is an interesting substitution, and du alone gets you

$$du = \frac{x^4-1}{\sqrt{x^4+1} }\ \mbox{d}x$$.

That $$x^4 - 1$$ in the numerator would be perfect, if we could just get
an $$(x^2 + 1)^{2}$$ into the denominator. I'm not seeing how that's going to happen...

Alas, there are a number of substitutions that get one tantalizingly close. I also tried rationalizing the denominator of the integrand first as one tack and tried using the substitution $$tan \theta = x^2$$ as another. If the differentials cooperate, then one of the factors doesn't, and vice versa...

Last edited: Jun 18, 2008
7. Jun 19, 2008

### Gib Z

Ahh After I get that (x^2+1)^2 term in the denominator in terms of you, I end up with something like $$\int \frac{1}{(u^2 + \sqrt{u^4-4} + 2)^2} du$$.

It doesn't look like that will turn out nice.

8. Jun 19, 2008

### dirk_mec1

Really? Works like a charm? Please show me I get the same problem as dynamicsolo.

@Gib Z how did you get that form of the integral?

9. Jun 19, 2008

### dirk_mec1

With huge help form an expert:

The integrand is $$\frac{x^2 -1 }{(x^2 + 1) \sqrt{x^4 + 1}}.$$

We then "extract" x^2 from the second term in the denominator to get

$$\frac{x^2 - 1}{x(x^2 + 1) \sqrt{x^2 + 1/x^2}}$$, which can then be written as

$$\frac{1 - 1/x^2}{(x + 1/x) \sqrt{(x + 1/x)^2 - 2}}.$$

Now use the substitution t = x + 1/x and not that dt = (1 - 1/x^2) dx to find:

$$\int \frac{dt}{t (t^2-2)}$$

Use $$t= \sqrt{2} \sec( \theta)$$ to find:

$$I = \frac{1}{\sqrt{2}} \cdot \int\ 1\ \mbox{d} \theta = \frac{1}{\sqrt{2}} \theta +C$$

Now can someone explain to me why the online integrator gives an incorrect answer!

Last edited: Jun 19, 2008
10. Jun 19, 2008

### m_s_a

11. Jun 19, 2008

### dirk_mec1

So the online integrator splits the integral and encounters an integral that cannot be expressed in elementary functions?

12. Jun 19, 2008

### m_s_a

I do not know

13. Jun 19, 2008

### dynamicsolo

It strikes me that integration software works in a similar way to translation software: it finds a particular way to parse a statement and then proceeds to work with the decomposition it created. If the choice made by the analysis strategy is a poor one, the translation will be rather weak. (Analogously, the integrand may be broken into forms of which some give unsatisfactory results.) The options will be limited by the situations that the programmers considered in preparing the code.

I've seen a page of integration problems and solutions given to students by one instructor where they used software to provide the answers. A few of the solutions were a little... odd. We've run into similar integration difficulties on other occasions on this Forum when someone tried an exotic integral with software...

Wow, my hat is off to the person who spotted that approach!

This line should be

$$\int \frac{dt}{t \sqrt{t^2-2}}$$ ,

though, shouldn't it?

Last edited: Jun 19, 2008
14. Jun 19, 2008

### fantispug

You do a similar thing to factoring out the x^2 to what dynamicsolo did in their final solution:

As
$$\ \mbox{d}u = \frac{x^4-1}{ \sqrt{x^4+1} }\ \mbox{d}x = \frac{x^2-1}{\sqrt{x^4+1}}\frac{x^2+1}{x^2}\ \mbox{d}x$$
Substituting this into the integral:
$$\int{\frac{x^2-1}{\left(x^2+1\right)\sqrt{x^4+1}}\ \mbox{d}x}=\int{\frac{x^2}{\left(x^2+1\right)^2}\ \mbox{d}u}$$
Expand and simplify the bottom line to find a pleasant surprise, and an equivalent answer.

Last edited: Jun 19, 2008
15. Jun 20, 2008

### Gib Z

Yes it should, I got that one as well before but it didn't turn out so good.

16. Jun 20, 2008

### dirk_mec1

@fantisplug what happened in the second Latex formula?

17. Jun 20, 2008

### dynamicsolo

The numerator is, of course, a difference of two squares, and factors as you've shown it. Where does the x^2 in the denominator come from (without affecting the radical at all)...?

18. Jun 21, 2008

### ace123

The integrand is $$\frac{x^2 -1 }{(x^2 + 1) \sqrt{x^4 + 1}}.$$

We then "extract" x^2 from the second term in the denominator to get

$$\frac{x^2 - 1}{x(x^2 + 1) \sqrt{x^2 + 1/x^2}}$$, which can then be written as

$$\frac{1 - 1/x^2}{(x + 1/x) \sqrt{(x + 1/x)^2 - 2}}.$$

Does my algebra suck or is that not possible? How would extract the x^2 from the second term. Wouldn't that change it?

19. Jun 21, 2008

### Gib Z

We divided both numerator and denominator by x^2. For the denominator that meant dividing each factor by x. Which, when dividing the sqrt, is dividing by sqrt(x^2).

20. Jun 21, 2008

### dynamicsolo

I think this has been a case of everyone not showing important steps, making algebra errors or typos in key places, and not spotting other people's mistakes (myself and my own included...).

As a reminder, here's the integral:

$$\int \frac{x^2-1}{(x^2+1) \sqrt{x^4+1} }\ \mbox{d}x$$

In discussing the substitution

$$u = \sqrt{x^2 +x^{-2}}$$ ,

I flubbed the distribution of factors in the denominator in reducing the radical, so my result in post #6 is wrong; I now agree with fantispug in the result for du. However, fantispug in turn made a typo in the first equation in post #14, which should read:

$$\ \mbox{d}u = \frac{x^4-1}{x^2 \sqrt{x^4+1} }\ \mbox{d}x = \frac{x^2-1}{\sqrt{x^4+1}}\frac{x^2+1}{x^2}\ \mbox{d}x$$ ;

the result is correct, but the typo made in the first half of the equation made it look like there was a factorization error.

I'm still unclear for this substitution though, fantispug, how the remaining segment of this integrand turns out nicely in terms of u:

$$\int{\frac{x^2}{\left(x^2+1\right)^2}\ \mbox{d}u}$$

It still seems like there is an excess term left over when transforming from a function of x to a function of u... May I ask that you show this?

It also seems that we never actually said what the integral is. Using the substitution in post #9 that dirk_mec1's expert provided:

t = x + 1/x ,

I agree with the intermediate result

$$I = \frac{1}{\sqrt{2}} \theta +C$$ .

Since theta is related to an arcsecant, I figure it is better to square the trig substitution relation first:

$$sec^{2} \theta = \frac{t^2}{2}$$

and use the Pythagorean Identity to get

$$tan^{2} \theta = \frac{t^2 - 2}{2}$$ .

We already used $${t^2 - 2} = \frac{x^4 + 1}{x^4}$$ , so we have

$$tan\theta = \sqrt{\frac{x^4 + 1}{2x^4} }$$,

giving us

$$I = \frac{1}{\sqrt{2} } arctan[ \sqrt{\frac{x^4 + 1}{2x^4} } ] + C$$ .

You could also flip over the secant-squared expression to make it cosine-squared, use the Pythagorean identity to get

$$sin^{2} \theta = \frac{t^2 - 2}{t^2}$$ ,

$$sin \theta = \frac{\sqrt{x^4 + 1} }{x^2 + 1}$$