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

You are not logged in.

#1 2012-12-25 01:42:08

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

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!!

View Image: problem.jpg

Offline

#2 2012-12-25 01:57:30

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 84,727

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Online

#3 2012-12-25 02:16:49

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

Re: Calculation with a given accuracy

bobbym, thank you for your reply!

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!

Offline

#4 2012-12-25 02:23:35

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 84,727

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Online

#5 2012-12-25 02:38:38

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

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!!

Offline

#6 2012-12-25 02:41:40

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 84,727

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Online

#7 2012-12-25 02:49:43

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

Re: Calculation with a given accuracy

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

Offline

#8 2012-12-25 02:56:29

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 84,727

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Online

#9 2012-12-25 03:18:46

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

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.

Offline

#10 2012-12-25 03:24:50

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 84,727

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Online

#11 2012-12-25 03:30:11

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

Re: Calculation with a given accuracy

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

Offline

#12 2012-12-25 03:32:54

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 84,727

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Online

#13 2012-12-25 03:40:03

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

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...

Offline

#14 2012-12-25 03:53:29

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 84,727

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Online

#15 2013-02-10 20:57:39

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

Re: Calculation with a given accuracy

pls. don't judge me harshly, but the problem has not been completely solved yet shamerolleyes (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

View Image: screen_shot.jpg

Last edited by Serj (2013-02-10 21:08:50)

Offline

#16 2013-02-10 23:29:01

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 84,727

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Online

#17 2013-02-10 23:35:27

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

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-10 23:40:11)

Offline

#18 2013-02-10 23:44:03

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 84,727

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Online

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

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

Re: Calculation with a given accuracy

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

Offline

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

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 84,727

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:

gif.latex?\small%20\inline%20\bg_green%20\fn_cs%20\left(%20\begin{array}{cccc}%20n&Sum%20&%20alternating%20\%20error%20&%20actual%20\%20error%20\\%20&%20&%20&\\%201%20&%200.250000000000%20&%200.0156250%20&%200.0151977%20\\%202%20&%200.234375000000%20&%200.000434028%20&%200.000427313%20\\%203%20&%200.234809027778%20&%20\text{6.781684027E-6}%20&%20\text{6.714335744E-6}%20\\%204%20&%200.234802246094%20&%20\text{6.781684027E-8}%20&%20\text{6.734828344E-8}%20\\%205%20&%200.234802313911%20&%20\text{4.709502797E-10}%20&%20\text{4.68556829E-10}%20\\%206%20&%200.234802313440%20&%20\text{2.40280754E-12}%20&%20\text{2.3934504E-12}%20\\%20\end{array}%20\right)

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


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Online

#21 2013-02-11 01:59:13

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

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.

Offline

#22 2013-02-11 02:21:36

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 84,727

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-11 03:22:16)


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Online

#23 2013-02-11 04:38:06

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

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.

Offline

#24 2013-02-11 04:40:56

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

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.

Offline

#25 2013-02-11 04:42:29

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 84,727

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.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Online

Board footer

Powered by FluxBB