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

You are not logged in.

## #1 2012-12-26 00:42:08

Serj
Member

Offline

### Calculation with a given accuracy

Hello, guys! Plzz help me out here..

The proplem:

Real numbers X, ε given (X not equal to 0, ε > 0). Calculate the sum of the series  with the accuracy ε (ε = 10^-3, 10^-4, 10^-5, 10^-6) and specify the number of summands. Put results into columns ε, sum, N. Run the calculation only for the first 10 terms. Numerical part of the problem is attached.

This actually is a problem for my programming class, but I can't understand math behind the problem. What is X here? How can I perform these calculations with the given accuracy. Pls. advice if possible. Thanks!!

## #2 2012-12-26 00:57:30

bobbym

Online

### Re: Calculation with a given accuracy

Hi Serj;

Usually you are given the function first and then you use a Taylor series to determine what the error will be. Here you are deprived of that. Do you know what x is?

But since it appears to be an alternating series I will play with it because there are other ways to bound this.

I latexed the series for you

In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

## #3 2012-12-26 01:16:49

Serj
Member

Offline

### Re: Calculation with a given accuracy

Unfortunately I do not know what X is and this makes  it more confusing. Two things I am currently confused about are what I should do with X here and how to determine the level of accuracy. Can you pls. formulate what I should search for to find some information on solving for this kind of problems. Thanks!

## #4 2012-12-26 01:23:35

bobbym

Online

### Re: Calculation with a given accuracy

Okay I have identified the function and it is
1 - Jo which is a Bessel function of the first kind.

You might not need to know what x is because convergence for series like that are usually when -1 < x < 1.

As a programming problem it is too tough because it is much better formulated and solved in Numerical Analysis.

I will need some time to work on it.

Okay, we are in luck. The Bessel function converges for all values of x. This is not difficult to see.

In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

## #5 2012-12-26 01:38:38

Serj
Member

Offline

### Re: Calculation with a given accuracy

bobbym,

Thank you for your help! I will read up on that. Too hard to get it right away. I've been trying to understand this problem for a couple of days already. (( Your help is highly appreciated!!

## #6 2012-12-26 01:41:40

bobbym

Online

### Re: Calculation with a given accuracy

I have the answer that you require it will take some time to post and to check. Please hold on.

In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

## #7 2012-12-26 01:49:43

Serj
Member

Offline

### Re: Calculation with a given accuracy

OK. thanks! I'll be around.))

## #8 2012-12-26 01:56:29

bobbym

Online

### Re: Calculation with a given accuracy

Hi;

Now we come to the first problem.

and specify the number of summands. Put results into columns ε, sum, N. Run the calculation only for the first 10 terms.

They obviously want a table. And they only want you to run the series for the first 10 terms. The problem is as x gets larger you will need more terms to meet the error.

To give the answer I would like to have what restrictions are on x. Is there more to the problem?

In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

## #9 2012-12-26 02:18:46

Serj
Member

Offline

### Re: Calculation with a given accuracy

The other variant states that absolute x is < 1. But on my variant there is no such a condition. They only require x not to be equal to zero. No other restrictions specified.

## #10 2012-12-26 02:24:50

bobbym

Online

### Re: Calculation with a given accuracy

Ahh! The other variant is correct! That is the bound you need to do what is expected.

I will post with

Basically without this constraint you would have x, ε, and the number of summands exceeding 10.

In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

## #11 2012-12-26 02:30:11

Serj
Member

Offline

### Re: Calculation with a given accuracy

Yeah, they apparently forgot to include this into my problem. Sorry.

## #12 2012-12-26 02:32:54

bobbym

Online

### Re: Calculation with a given accuracy

Hi;

Okay, I will solve with that constraint. If you need more later come back.

In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

## #13 2012-12-26 02:40:03

Serj
Member

Offline

### Re: Calculation with a given accuracy

Appreciate your help, bobbym! Thanks! Reading about Bessel function right now. darn, it is not fun at all)) Or may be I just need some sleep...

## #14 2012-12-26 02:53:29

bobbym

Online

### Re: Calculation with a given accuracy

Hi;

I am assuming N is the number of summands or terms. For Abs(x)<1, I have chosen x = 1. This way the error is even slightly less than in the table.

What this means is you need 2 terms for an error < .001 For .0001 and .00001, 3 terms will suffice. For .000001, 4 terms are needed.

In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

## #15 2013-02-11 19:57:39

Serj
Member

Offline

### Re: Calculation with a given accuracy

pls. don't judge me harshly, but the problem has not been completely solved yet (but the deadline is coming... uggg)

You can see what I got so far in the attached picture.

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.

What I cannot understand is the epsilon column. bobbym, can u pls. tell me what was the algorithm to find those errors in the table you posted. Shall I now, having my table, somehow derive them from the sums that I got? Thanks!

PS
I cannot upload the image, so it can be found here - master-chinese.ru/screen_shot.jpg

Last edited by Serj (2013-02-11 20:08:50)

## #16 2013-02-11 22:29:01

bobbym

Online

### Re: Calculation with a given accuracy

Hi;

There is no algorithm. I just summed the series.

In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

## #17 2013-02-11 22:35:27

Serj
Member

Offline

### Re: Calculation with a given accuracy

bobbym,

I mean the column "epsilon" . I believe that sum of the series is the "sum" column, isn't it?
What I mean is that I don't know what to put into the epsilon column.

Last edited by Serj (2013-02-11 22:40:11)

## #18 2013-02-11 22:44:03

bobbym

Online

### Re: Calculation with a given accuracy

Yes, epsilon is the estimate of the error between the truncated sum and the actual answer. Do you want to know how to calculate that?

In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

## #19 2013-02-11 23:03:09

Serj
Member

Offline

### Re: Calculation with a given accuracy

I would like to. Sorry, I really do not understand this.

## #20 2013-02-11 23:06:30

bobbym

Online

### Re: Calculation with a given accuracy

Hi;

First notice that the series you are working on

is an alternating series. There is a nifty way to get the error of those types of series.

Take a look at this table:

$\small \inline \bg_green \fn_cs \left( \begin{array}{cccc} n&Sum & alternating \ error & actual \ error \\ & & &\\ 1 & 0.250000000000 & 0.0156250 & 0.0151977 \\ 2 & 0.234375000000 & 0.000434028 & 0.000427313 \\ 3 & 0.234809027778 & \text{6.781684027E-6} & \text{6.714335744E-6} \\ 4 & 0.234802246094 & \text{6.781684027E-8} & \text{6.734828344E-8} \\ 5 & 0.234802313911 & \text{4.709502797E-10} & \text{4.68556829E-10} \\ 6 & 0.234802313440 & \text{2.40280754E-12} & \text{2.3934504E-12} \\ \end{array} \right)$

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

In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

## #21 2013-02-12 00:59:13

Serj
Member

Offline

### Re: Calculation with a given accuracy

bobbym,

thank you for the table. But what I need is the formula that will allow me to calculate those errors. I have figured out how to calculate sums, but do not now how I can get the error for each sum.

## #22 2013-02-12 01:21:36

bobbym

Online

### Re: Calculation with a given accuracy

but do not now how I can get the error for each sum.

Sometimes calculating the error can be quite difficult or perhaps impossible. In this case it is easy.

But what I need is the formula that will allow me to calculate those errors.

You do not need a formula for this particular problem we use the alternating series rule. If you look at the table you might see what it is. If not I will show you.

Last edited by bobbym (2013-02-12 02:22:16)

In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

## #23 2013-02-12 03:38:06

Serj
Member

Offline

### Re: Calculation with a given accuracy

It seems that to calculate the alternating error you go down the list and subtract the smaller number from the larger one. And as for the actual error - no idea. They seem to look just slightly different from alternating errors.

## #24 2013-02-12 03:40:56

Serj
Member

Offline

### Re: Calculation with a given accuracy

the actual error I guess supposed to be the difference between the number which the series converges to and the current sum.

## #25 2013-02-12 03:42:29

bobbym

Online

### Re: Calculation with a given accuracy

That is right. The actual error is always less then the first neglected term of an alternating series.

In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.