Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 92,921

Hi;

The evaluation numerically of this integral came up in a discussion with anonimnystefy:

This one can resist normal methods quite well. When we say evaluate numerically we typically mean 10 - 12 digits with a programmable calculator and at least 100 when using a CAS.

To start, although any CAS known will gag on this problem they are able to do pieces of so it is to our advantage to split the integral like this.

The first integral is not too difficult and any CAS can do it to 100 digits.

That is about 105 digits or so. This is the hard part:

we notice that asymptotically as x grows large the denominator will act like x^2. The x^2 term will completely drown out the cos(x). That suggests the following chain of moves,

Looking at the RHS we see the same idea works again. As x grows large the denominator acts like x^4 completely drowning out the x^2 cos(x) term. So let's add a cos(x) / x^4 to it, we get

As x grows larger the denominator acts like x^6 completely drowning out the x^4 cos(x) term. So let's subtract a cos(x)^2 / x^6 to it, we get

Two things should be apparent,

1) we can continue the series on the left indefinitely and the RHS is getting smaller and smaller for each term on the left. The RHS will eventually be 0 as we get an infinite series on the LHS.

This becomes:

What have we accomplished? We have replaced a tough integral with a sum of infinite number of hopefully easier to evaluate numerically integrals. The beauty is that although we have an infinite number of integrals we will only need a finite number of them for the accuracy required.

Actually we will only need the first 26 or so terms.

Now I am not proposing this method of evaluating that integral because in practice those 26 integrals can also pose problems and further work is needed. But you wanted to see how the acceleration works.

**In mathematics, you don't understand things. You just get used to them.**

**I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,889

How many terms would you need for 1000 digits?

Here lies the reader who will never open this book. He is forever dead.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 92,921

Hi;

I estimate about 255 terms. As I said this method is too weak for that many digits. I just showed it because the transformation is one of the weapons used in numerical work.

**In mathematics, you don't understand things. You just get used to them.**

**I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,889

Do sum accelerators work on it (like RRA and stuff...) ?

Here lies the reader who will never open this book. He is forever dead.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 92,921

I do not know the answer to that. I gave up on it when the 26 integrals were more difficult than they should have been.

Want to see another solution?

**In mathematics, you don't understand things. You just get used to them.**

**I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,889

Of course!

Here lies the reader who will never open this book. He is forever dead.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 92,921

This method was showed to me.

Divide the integration region into lengths of

2 π and use cos(x) = cos(x + n*2π) having n as an integer. Then

now according to him we can interchange the order of the sum and the integral to get:

Mathematica can get the sum.

Now you just numerically integrate

**In mathematics, you don't understand things. You just get used to them.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,889

Have you been able to get 1000 digits out of that?

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 92,921

I have not tried!

**In mathematics, you don't understand things. You just get used to them.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,889

Why not?

And, it seems to me that the point is to get the integral into a form with finite integration limits...

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 92,921

For several reasons I do not like that solution.

1) I do not understand it!

2) Different versions of Mathematica were unable to do the sum.

3) I suspect it would take too long.

**In mathematics, you don't understand things. You just get used to them.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,889

What do you not understand?

What can Mathematica do with the integral

*Last edited by anonimnystefy (2013-02-03 02:40:57)*

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 92,921

The first line, beats me.

That will not work.

**In mathematics, you don't understand things. You just get used to them.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,889

Well, if you do not understand it, there must be a part which you do not understand...

Why not?

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 92,921

The trig substitution that produced the series, I do not get.

I tried a million substitutions to get the interval from 0 to infinity down to 0 to 1. Each one failed. Examine your integrand around 1.

**In mathematics, you don't understand things. You just get used to them.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,889

He just splits it up in intervals and uses cos(x+2n*pi)=cos(x). I do not see what the big deal is...

The integrand of my integral tends to 1 at 1.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 92,921

The cos(x) does not change, the x^2 does. Why?

There is a big fat indeterminate at x = 1 for your function. Numerical techniques will have problems with that.

**In mathematics, you don't understand things. You just get used to them.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,889

Because cos(x+n*2pi)=cos(x).

Did you actually try entering the integral into Mathematica?

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 92,921

Hi;

Because cos(x+n*2pi)=cos(x).

I am not getting that.

Yes, I entered it into the built in command and one I wrote. Both could not deal with it.

**In mathematics, you don't understand things. You just get used to them.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,889

Cosine has a period of 2pi, that's why how ever many times you add 2pi to the argument of cosine you will get the same thing.

Interestingly enough, WA gives 5 digits for that integral...

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 92,921

I know that one but I still do not undertsand what he did.

Probably that is all the digits could get. That integral is very difficult to compute.

**In mathematics, you don't understand things. You just get used to them.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,889

Hi

What do you get when you substitute t=x+n*2pi into the integrals?

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 92,921

I get a big mess:

I left out the intervals of integration because they remain the same.

**In mathematics, you don't understand things. You just get used to them.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,889

What do you get as the differential of t, i.e. as dt?

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 92,921

I got dt = 2 π n dx

**In mathematics, you don't understand things. You just get used to them.**

Offline