Hi,
Could anyone tell me how to solve the following integral
:
First off, I don't know a neat way of
doing it, but here is a long winded way, I expect there is a very
clever way of doing this, but here goes anyway.
Do you know about partial fractions and complex numbers?
Partial fractions are those things where you write
1/(1-x2 )=0.5/(1-x)+0.5/(1+x) for instance. Then the
integral of 1/(1-x2 ) = integral of
(0.5/(1-x)+0.5/(1+x)) which is an easy integral.
Well, you can extend the idea of partial fractions so that you
can do partial fractions of things like 1/(1+x4 ) by
using complex numbers.
First of all, factorise 1+x4 . Let w=ei
pi/4 , then 1+x4 =(x+w)(x-w)(x+iw)(x-iw).
Therefore, 1/(1+x4 ) can be written as
A/(x+w)+B/(x-w)+C/(x+iw)+D/(x-iw). Solve this equation for A, B,
C and D (they'll probably be complex). Then, your integral will
be Alog(x+w)+Blog(x-w)+Clog(x+iw)+Dlog(x-iw). If you don't know
about complex numbers this won't work so wait and someone will
probably post another way of doing it. Otherwise, work out (I
suggest using geometric methods) what each of these logs are in
terms of x, and this should reduce to a real number, which will
be your integral. For this particular problem, I just plugged it
into "Derive" and got the following unpleasant result:
SQRT(2)*ATAN(SQRT(2)*x+1)/4+SQRT(2)*ATAN(SQRT(2)*x-1)/4+SQRT(2)*LN(x^2+SQRT(2)*x+1)/8-SQRT(2)*LN(x^2-SQRT(2)*x+1)/8
which suggests that there isn't going to be a nice way of doing
it.
If you're unclear about any of the steps I used here (for
instance writing it as a partial fraction, factorising with
complex numbers, integrating 1/x, evaluating Alog(x+w) and other
similar results using geometric methods) then ask and I'll try to
explain. However, if you don't know about complex numbers, then
it might be a bit too complicated, I suggest reading up on
complex numbers, they're pretty damn cool anyway.
Dan's right - there is another way of
doing it, but it involves contour integration in the complex
plane, so it's going to be a bit tricky unless you are up with
complex numbers, residues and Cauchy's Theorem.
In any case, there won't be a nice closed form solution for the
integral unless you integrate from -infinity to +infinity, in
which case the answer is pi x 2-1/2 . And since the
function is even, the integral from 0 to infinity will be half
that.
There's some more on contour integration under "Another
question on pi" , but if you want me to go on, then let me
know.
Alastair
Why not use the binomial expansion, and integrate all the
little individual parts (for a number of terms)
Neil M
The binomial expansion for (1 +
x4 )-1 goes something 1 - x4 +
x8 - etc. < i think > and so just putting
something like x=2 shows that this isn't going to converge to
1/17. It's only going to converge for |x4 | < 1, so
you can't integrate outside this range.
I'd be interested to know if you do get a convergent value of a
definite integral within this range though - I suspect you
probably would.
Best etc,
Alastair
Outside the range you could integrate it as
x-4 / (1+x-4 ) = x-4 -
x-8 + x-12 etc
Also you can factorise x4 +1 as
(x2 + sqr(2)x + 1)(x2 - sqr(2)x + 1).
So I believe you can write 1/(x4 +1) as partial
fractions...? Is this right?
We can now integrate both these using partial fractions again or
arctans I think. And we would probably get what Dan said at the
end of his message.
Michael
Yes Michael, you can do partial fractions.
so now we have something to work with. When you take out
-1/(4root2) from the first fraction and 1/(4root2) from the 2nd,
the numerators are infuriatingly 2x - 2root2 and 2x + 2root2
respectively, which of course is almost what you want on the top
for a nice easy answer, but not quite. But still the fractions
look integrateable. If somebody else wants to try, here's where
I've got to:
Neil M
Evaluating these integrals is a good exercise in using
multiple substitutions.
The standard trick is to use a technique known as "completing the
square" to reduce any terms of the form (x2 + Ax + B)
at the bottom of the fraction to the form ((x+C)2
+D).
By multiplying out the latter, you can see that C=A/2, and
D=B-C2 .
Applying this to the first integral, we get We then make the
substitution
y=x+(1/sqr(2)) and get where I've set A=1/sqr(2) for
tidyness.
The difficult bit of this expression is the "y2
+A2 " bit, so we remember that tan2
+1=sec2 and set