# Hint solving hard Integral

## Homework Statement

Please tell me how to solve the below integral

##\int \frac{(1+x^2)}{(1-x^2)\sqrt{1+x^4}}dx##

## The Attempt at a Solution

This is beyond my imagination so, believe me or not, I can't attempt anything!

Give me hint please.

I guess the denominator can be solve by using trigonometric substitution but the x is in ##x^4## form, not ##x^2##. So, it can not be solved using the trigonometric substitution.

## Answers and Replies

SteamKing
Staff Emeritus
Homework Helper
What makes you think this integral has a simple anti-derivative?

Mathematica gives me the following:
$$\sqrt[4]{-1} \left(F\left(\left.i \sinh ^{-1}\left(\sqrt[4]{-1} x\right)\right|-1\right)-2 \Pi \left(i;\left.\sin ^{-1}\left((-1)^{3/4} x\right)\right|-1\right)\right)$$ where $F$ and $\Pi$ are elliptic functions. If this is correct than (to the best of my knowledge) this integral has no elementary anti-derivative (but, as any integral, can be approximated numerically to arbitrary precision if needed).

Ray Vickson
Homework Helper
Dearly Missed

## Homework Statement

Please tell me how to solve the below integral

##\int \frac{(1+x^2)}{(1-x^2)\sqrt{1+x^4}}dx##

## The Attempt at a Solution

This is beyond my imagination so, believe me or not, I can't attempt anything!

Give me hint please.

I guess the denominator can be solve by using trigonometric substitution but the x is in ##x^4## form, not ##x^2##. So, it can not be solved using the trigonometric substitution.

If I use Maple on the definite-integral version, I get a simple, closed-form answer involving only elementary functions, but if I ask Maple to perform the indefinite integral I get a nasty formula involving Elliptic functions, similar to what ELB27 obtained.

Here is the definite-integration version. If ##f(x)## is your integrand and ##F(x) = \int_0^x f(t) \, dt##, then
$$F(x) = \frac{1}{\sqrt{2}} \text{arctanh} \left(\frac{\sqrt{1+x^4}\sqrt{2}}{2x} \right) + \frac{1}{4} i \pi \sqrt{2}$$
Despite its complex appearance, the formula for ##F(x)## returns real numerical values for real values of ##x \geq 0##. Also: ##dF(x)/dx = f(x)##, as it should!

If I use Maple on the definite-integral version, I get a simple, closed-form answer involving only elementary functions, but if I ask Maple to perform the indefinite integral I get a nasty formula involving Elliptic functions, similar to what ELB27 obtained.

Here is the definite-integration version. If ##f(x)## is your integrand and ##F(x) = \int_0^x f(t) \, dt##, then
$$F(x) = \frac{1}{\sqrt{2}} \text{arctanh} \left(\frac{\sqrt{1+x^4}\sqrt{2}}{2x} \right) + \frac{1}{4} i \pi \sqrt{2}$$
Despite its complex appearance, the formula for ##F(x)## returns real numerical values for real values of ##x \geq 0##. Also: ##dF(x)/dx = f(x)##, as it should!
Interesting... Then it must be a matter of simplifying the elliptic functions somehow to get to your answer.

Ray Vickson
Homework Helper
Dearly Missed
Interesting... Then it must be a matter of simplifying the elliptic functions somehow to get to your answer.

I guess that must be what is happening, but I really don't know. In particular, the actual technique remains a mystery to me.

I guess that must be what is happening, but I really don't know. In particular, the actual technique remains a mystery to me.
I haven't attempted to solve it, but how I would start is maybe by looking at the denominator first. 1-x^2 is a difference of squares, so write it out as (1+x)(1-x) and cancelling the top and one of the factors on the bottom. Then, the integral becomes ∫1/[(1-x)(√1+x^4)]dx
Then, I would probably use trig sub and set x = to either sin(θ)^2 or tan(θ)^2, or maybe try using trig and then u sub, I haven't sat down to really look at it and try, I'm outta time, I'm sorry, but that should help a little at least.

SammyS
Staff Emeritus
Homework Helper
Gold Member
I haven't attempted to solve it, but how I would start is maybe by looking at the denominator first. 1-x^2 is a difference of squares, so write it out as (1+x)(1-x) and cancelling the top and one of the factors on the bottom. Then, the integral becomes ∫1/[(1-x)(√1+x^4)]dx
Then, I would probably use trig sub and set x = to either sin(θ)^2 or tan(θ)^2, or maybe try using trig and then u sub, I haven't sat down to really look at it and try, I'm outta time, I'm sorry, but that should help a little at least.
Um ... ##1+x^2## is not cancelled by ##1+x## .

Um ... ##1+x^2## is not cancelled by ##1+x## .
Oh shoot, I misread that... my bad.

OK, i figured it out. It's partial fraction decomposition bro. First, split up (1+x^2) as
∫ 1 / [ (1+x) (1-x) (1+x^4)^1/2] dx and do partial fraction decomposition for that.
Then, do ∫ x^2 / [(1+x) (1-x) (1+x^4)^1/2] dx and do partial fractions again.
Then, add the results.
Let me know if that works, yeah?

Ray Vickson
Homework Helper
Dearly Missed
OK, i figured it out. It's partial fraction decomposition bro. First, split up (1+x^2) as
∫ 1 / [ (1+x) (1-x) (1+x^4)^1/2] dx and do partial fraction decomposition for that.
Then, do ∫ x^2 / [(1+x) (1-x) (1+x^4)^1/2] dx and do partial fractions again.
Then, add the results.
Let me know if that works, yeah?

You cannot "split up" ##1+x^2## into partial fractions, because it is in the numerator (although, of course, it is already "split up" because it consists of two terms added together, and you can write two separate integrals). You can split up ##1-x^2## into partial fractions, because it is in the denominator. However, whether or not that helps is the real issue. It was your suggestion, so why don't you try it and report back on whether it works?

You cannot "split up" ##1+x^2## into partial fractions, because it is in the numerator (although, of course, it is already "split up" because it consists of two terms added together, and you can write two separate integrals). You can split up ##1-x^2## into partial fractions, because it is in the denominator. However, whether or not that helps is the real issue. It was your suggestion, so why don't you try it and report back on whether it works?
not

because it's not my homework. i thought about it, i don't know why i said split it up, just straight up use partial fractions. worked for me.

vela
Staff Emeritus
Homework Helper
I worked backwards from the answer Ray posted above, and I found the substitution
$$u = \frac{\sqrt{2} x}{\sqrt{1+x^4}}$$ will result in
$$\frac{1}{\sqrt{2}} \int \frac{1}{1-u^2}\,du.$$ The integral ends up equal to
$$\frac{1}{2\sqrt 2} \log\frac{1+\frac{\sqrt 2 x}{\sqrt{1+x^4}}}{1-\frac{\sqrt 2 x}{\sqrt{1+x^4}}}.$$

Last edited:
Ray Vickson
Homework Helper
Dearly Missed
not

because it's not my homework. i thought about it, i don't know why i said split it up, just straight up use partial fractions. worked for me.

The statement "worked for me" means that you actually did it and so obtained a final formula for the integral. Right?

I'm just tryna give insight. and yeah, i got an answer.

(√2 / 2) (ln|1+x|) - (1/2) (ln|1-x|) - (1/2 - √2/2) √{ [ ( 1 + ( √x ) ] ^2 + 1}

if this ain't right, there's nothing simple that can be done by hand. not all integrals have an antiderivative (for example, e^x^2)

Last edited:
Ray Vickson
Homework Helper
Dearly Missed
I'm just tryna give insight. and yeah, i got an answer.

(√2 / 2) (ln|1+x|) - (1/2) (ln|1-x|) - (1/2 - √2/2) √{ [ ( 1 + ( √x ) ] ^2 + 1}

if this ain't right, there's nothing simple that can be done by hand. not all integrals have an antiderivative (for example, e^x^2)

The answer is definitely not right: the derivative of the above does not match the original integrand.

Of course some functions do not have elementary antiderivatives; that was the main issue in this whole thread---the fact that some powerful integrators, such as Mathematica produce result involving Elliptic functions, while some runs of Maple produce Elliptic integral answers but others give an elementary antiderivative. However, none of the obvious elementary calculus tools suffice in this example. I am still trying to get Maple to spit out the algorithms it used to get an elementary answer; I think it at least started to use the initial portions of Risch's method, but I am not sure.

Last edited by a moderator:
The answer is definitely not right: the derivative of the above does not match the original integrand.

Of course some functions do not have elementary antiderivatives; that was the main issue in this whole thread---the fact that some powerful integrators, such as Mathematica produce result involving Elliptic functions, while some runs of Maple produce Elliptic integral answers but others give an elementary antiderivative. However, none of the obvious elementary calculus tools suffice in this example. I am still trying to get Maple to spit out the algorithms it used to get an elementary answer; I think it at least started to use the initial portions of Risch's method, but I am not sure.

Oh I didn't forget that, your moderator friend deleted it.

Mark44
Mentor
Oh I didn't forget that, your moderator friend deleted it.
I don't see that any of your work was deleted -- just your insult.

Vanadium 50, berkeman and SammyS
SammyS
Staff Emeritus
Homework Helper
Gold Member
Here is the definite-integration version. If ##f(x)## is your integrand and ##F(x) = \int_0^x f(t) \, dt##, then
$$F(x) = \frac{1}{\sqrt{2}} \text{arctanh} \left(\frac{\sqrt{1+x^4}\sqrt{2}}{2x} \right) + \frac{1}{4} i \pi \sqrt{2}$$
Despite its complex appearance, the formula for ##F(x)## returns real numerical values for real values of ##x \geq 0##. Also: ##dF(x)/dx = f(x)##, as it should!
The hyperbolic tangent (as a real valued function) has a range of (-1, 1) .

The argument of the above inverse hyperbolic tangent is strictly in the interval [1, ∞) . That helps explain the complex appearance even though the expression evaluates to a real result for any positive x.

If one uses the inverse hyperbolic cotangent rather than than tangent this works out a bit nicer. Notice that the derivatives of the two functions have the same form, but the domains are different.

Thus, the solution could be written:
##\displaystyle\ F(x) = \frac{1}{\sqrt{2}} \text{arccoth} \left(\frac{\sqrt{1+x^4}\sqrt{2}}{2x} \right) \ ##​

Ray Vickson
Homework Helper
Dearly Missed
The hyperbolic tangent (as a real valued function) has a range of (-1, 1) .

The argument of the above inverse hyperbolic tangent is strictly in the interval [1, ∞) . That helps explain the complex appearance even though the expression evaluates to a real result for any positive x.

If one uses the inverse hyperbolic cotangent rather than than tangent this works out a bit nicer. Notice that the derivatives of the two functions have the same form, but the domains are different.

Thus, the solution could be written:
##\displaystyle\ F(x) = \frac{1}{\sqrt{2}} \text{arccoth} \left(\frac{\sqrt{1+x^4}\sqrt{2}}{2x} \right) \ ##​

I also got this, but did not mention it before.

It is obtained automatically in Maple when we use the 'evalc' command on the previous result, under the assumption that z > 0 (which forces Maple to regard z as real rather than a general complex number). 'evalc' does a "complex evaluation", which means it finds the real and imaginary parts of a complex expression. This converts the preceding complex expression to another complex expression having zero imaginary part. The result is equivalent to yours, and the reasons are essentially the same.

You can rewrite it as (x^-2 + 1)/{(x^-1 - x)sqrt[(x^-1 - x)^2+2]}
Then, substitute (sqrt2)tan u=x^-1 - 1

SammyS
Momoko has the answer, just use his substitution then you will get it.

There was a typo and I am unable to edit on the phone. The substitution should be (sqrt2)tan u=x^-1 - x

SammyS
epenguin
Homework Helper
Gold Member
Yes, equivalently to momoko and in case you wonder however that substitution could be arrived at, then a key is a symmetry in the expression between x and 1/x

The integral is of (1 + 1/x2)dx/[(1/x -x)√(x2 + 1/x2)] =

= - d(x - 1/x)/[(1/x -x)√(x2 + 1/x2)] = - dz/[z√(z2 + 2)]. Where z = x - 1/x

Inviting another substitution y2 = z2 + 2
And we end up with essentially

∫dy/(y2 - 2) I think, which can then be expressed as partial fractions and integrated as a logarithmic or inverse hyperbolic function, I did a smilar one yesterday https://www.physicsforums.com/posts/5120268/ . Not sounding quite same as Momoko's but maybe there is a mistake of sign or something somewhere, at any rate you have enough to be able to work it out more carefully. (After you get and verify it we would be glad to see it here!).

Last edited:
Or just use a trigoniometric subtitution!