Math Is Fun Forum

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

You are not logged in.

#1 2014-07-01 02:51:55

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Bitter numerics:

C is trying to sum a series numerically. Here is the series.

He plows away with his favorite computer language ( C++ I think ) and comes up with 0.691363061604078 after 100000 terms.

E points out to him that there is a way to sum the series using generating functions and that it sums to ln(2).

C is happy, but he notices that his sum only got 2 correct digits and he was not able to guess at the true solution using his answer. C asks our distinguished panel how he could have done better numerically.

A says) I asked my department head and she said get a faster machine and use Micro$oft C.

C says) I tried it to much bigger numbers than 100000 and it still had trouble even getting 3 digits. I do not think a faster machine is the answer.

B says) You could have got much more accuracy with less terms using

A says) Now hold on B! You are not going to throw some of that computer garbage around are you? My department head makes 4 times what you do so she has to be right. You listen to me C!

D says) What is a department head?

E says) I can not believe that they let A on this panel. Why are you here?

A says) Genetics baby, pure and simple. Mine are better!

Can you help C with a numerical solution that will agree with log(2). Remember he wants a computer solution.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#2 2014-07-05 20:50:45

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Bitter numerics:

Hi bobbym,


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#3 2014-07-05 22:25:13

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Bitter numerics:

Hi;


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#4 2014-07-05 23:11:21

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Bitter numerics:

Hi,

Thanks!
What transform did you apply?


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#5 2014-07-05 23:17:03

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Bitter numerics:

Hi;


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#6 2014-07-05 23:28:26

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Bitter numerics:

Okay.
Thanks for the problem, I could not have found it otherwise.
Now I can simply use that program as a template for any series I meet!


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#7 2014-07-05 23:30:29

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Bitter numerics:

C can punch this into Mathematica and it will output Log[2]

Last edited by Agnishom (2014-07-05 23:30:53)


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#8 2014-07-05 23:33:28

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Bitter numerics:

Hi;

That is correct but C needs another type of solution.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#9 2014-07-05 23:47:21

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Bitter numerics:

Do I have to use C++?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#10 2014-07-05 23:52:32

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Bitter numerics:

Any language other than one that can do the sum for you. In other words accelerate convergence. Less terms, more digits. Use the double rule.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#11 2014-07-06 00:06:06

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Bitter numerics:

What rule is that?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#12 2014-07-06 00:09:22

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Bitter numerics:

Hmmmm, I see you will require a tutorial.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#13 2014-07-06 00:43:39

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Bitter numerics:

I am ready for the tutorial.


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#14 2014-07-06 00:49:26

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Bitter numerics:

Start by summing the problem to 100000 terms with your favorite language.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#15 2014-07-06 01:21:11

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Bitter numerics:

My favorite language is bengali!


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#16 2014-07-06 01:24:44

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Bitter numerics:

Hmmm, then sum it in that.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#17 2014-07-12 04:41:56

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Bitter numerics:

I have written a small routine to do it without acceleration in Maxima but it is taking a lot of time.


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#18 2014-07-12 04:45:17

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Bitter numerics:

Is that not the point?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#19 2014-07-12 04:48:37

David
Member
From: Bumpkinland
Registered: 2014-04-23
Posts: 3,164

Re: Bitter numerics:

মাত্র একটি ভাষা যথেষ্ট নয়।


His dominion is an everlasting dominion, Which shall not pass away, And His kingdom the one Which shall not be destroyed.

Offline

#20 2014-07-12 04:55:18

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Bitter numerics:

That is true but a little math goes a long way.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#21 2014-07-12 05:05:24

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Bitter numerics:

chooipian wrote:

মাত্র একটি ভাষা যথেষ্ট নয়।

Not enough? You want me to do it in python?

bobbym, so what should I be doing>


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#22 2014-07-12 05:16:24

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Bitter numerics:

The problem is not in the languages being used. "Get a bigger hammer," is the cudgel not the scalpel.

K1315.png

keep-calm-and-get-a-bigger-hammer.png

Here is the cudgel.

13-05-29-cudgel.jpg


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#23 2014-07-12 12:22:55

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Bitter numerics:

You do not need a bigger hammer. You need a screw driver, instead


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#24 2014-07-12 12:26:05

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Bitter numerics:

Did you understand what I meant?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#25 2014-07-12 12:34:03

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Bitter numerics:

Yes


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

Board footer

Powered by FluxBB