You are not logged in.

- Topics: Active | Unanswered

**Serj****Member**- Registered: 2012-12-25
- Posts: 24

Nice! I got it! Thank you for making it challenging!))

Since I cannot determine the number which this series converges to (I can run my summation script for only 9 terms), I'll modify my code to return only alternating errors.

I hope I won't run into any more difficulties with this problem. Thanks!!)

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 96,615

Hi;

Hold on, I have not shown you how to calculate the error, just prepared you for it.

Where did he go?

*Last edited by bobbym (2013-02-11 05:03:27)*

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

**If it ain't broke, fix it until it is.**

Offline

**Serj****Member**- Registered: 2012-12-25
- Posts: 24

LOL!)) I am back!!

It seems that to calculate the alternating error you go down the list and subtract the smaller number from the larger one.

Isn't this correct?

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 96,615

I am afraid not. It is even easier than that.

*Last edited by bobbym (2013-02-11 21:35:13)*

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

**If it ain't broke, fix it until it is.**

Offline

**Serj****Member**- Registered: 2012-12-25
- Posts: 24

how come it can be easier than subtracting two numbers?))

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 96,615

Because we do not need to subtract anything! Please hold on the answer is simple but to write it up takes time.

If we abandon the sigma notation and look at the series term by term it will be easier to understand.

Look at the RHS.

We see that the signs alternate that is why we call it an alternating series. Understand up to here?

*Last edited by bobbym (2013-02-11 21:41:14)*

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

**If it ain't broke, fix it until it is.**

Offline

**Serj****Member**- Registered: 2012-12-25
- Posts: 24

Yeah, seems to be clear so far. And what i see is that the first term = sum #1, and the following terms correspond to alternating errors from the table kindly provided by you.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 96,615

Hi;

Let's say we take the first 3 terms of the series

1/4, -(1/64), 1/2304

the error then is less than the absolute value of the next term. The one that is boxed. That is all there is to it when the series is alternating.

So the error from summing the first 3 terms is less than 6.78168402E-6.

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

**If it ain't broke, fix it until it is.**

Offline

**Serj****Member**- Registered: 2012-12-25
- Posts: 24

thank you, **bobbym**, it is quite clear now!

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 96,615

Hi;

Each time just get the next term and take the absolute value. If you sum 9 terms then check the 10 th. As the great Bill Hanlon used to say, "piece of cake!"

There are other interesting questions to answer. Why did I pick x = 1?

I am able to run summation only for its first 9 terms. Then the denominator apparently gets to large for Turbo Pascal and it returns me an error.

We can improve that easily. Are they still forcing people to use that language?

*Last edited by bobbym (2013-02-12 00:05:21)*

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

**If it ain't broke, fix it until it is.**

Offline

**Serj****Member**- Registered: 2012-12-25
- Posts: 24

We can improve that easily. Are they still forcing people to use that language?

yep, they are. ((

Why did I pick x = 1?

No idea. Maybe because it is short and simple!?))

Also, one more thing turned out to be wrong, I already edited my code so it returns K, sum and Error, but have just noticed that they do not want the actual error to be on the list, they want me to calculate sums with given accuracy (10^-3, 10^-4, 10^-5, 10^-6) and specify this accuracy in the error column. I guess I'm just gonna leave it as it is. I think the script currently does even more calculations than required.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 96,615

Hi;

The actual error is almost never available. I can compute it because I know what the answer is supposed to be. How many times does that occur?

I picked x = 1 because that is a Taylor's series expanded at 0. The error typically gets larger the further we get from the expansion point.

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

**If it ain't broke, fix it until it is.**

Offline

**Serj****Member**- Registered: 2012-12-25
- Posts: 24

sorry for an ambiguous post, you did not understand me right, in the previous post by "the actual error" I meant they do not want any error, they just require to specify accuracy (10^-3, 10^-4, 10^-5, 10^-6).

Offline

**Serj****Member**- Registered: 2012-12-25
- Posts: 24

The table should be like this:

Accuracy (they call it epsilon) | Sum | Term (K)

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 96,615

What do you want to use for epsilon, digits that match or the alternating error estimate?

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

**If it ain't broke, fix it until it is.**

Offline

**Serj****Member**- Registered: 2012-12-25
- Posts: 24

Epsilon is given:

10^-3

10^-4

10^-5

10^-6

So there is nothing to choose from, it's already known. As I said before the script already does more calculations than needed. What I am wondering about now is why there are only 4 "epsilons", although it is said that I should run the summation for the first 10 terms (what I can't technically do though :-) ).

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 96,615

We have to know what error we have from k terms to know when it is smaller than epsilon. Do we use the alternating series estimate of the error or matching digits?

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

**If it ain't broke, fix it until it is.**

Offline

**Serj****Member**- Registered: 2012-12-25
- Posts: 24

I do not really know, I guess I'll leave it as it is. Too much time has been spent on it. There are other problems to solve. Thank you for support, bobbym!

*Last edited by Serj (2013-02-12 03:27:04)*

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 96,615

Hi;

Your welcome! Let me know if you need more.

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

**If it ain't broke, fix it until it is.**

Offline