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

You are not logged in.

#1 2012-04-24 17:31:50

bobbym

Online

Accurate calculations

Hi;

This question popped up in another thread and was answered there. Here we look at why that idea worked and the general theory.

It obvious that both square roots are going to be nearly equal and therefore that subtraction will cause much subtractive cancellation. This will cause the loss of significant digits and indeed many calculators will return 0.

The Taylor series is the main tool of numerical work. It comes to the rescue here too!

If we expand the following around 0 in terms of epsilon we get:

we can reaarange this to,

This is exactly what we need, we call x = 3 and epsilon = .000 000 000 000 000 1

We can truncate 2) to

now just plug in:

Which is quite accurate for only 2 terms of a taylor 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.

#2 2012-04-24 18:11:55

anonimnystefy
Real Member

Offline

Re: Accurate calculations

Hi bobbym

What was wrong then whit my suggestion in the other thread?I just set x=3 immediately.

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#3 2012-04-24 18:13:03

bobbym

Online

Re: Accurate calculations

Did you try it and see if it got the right answer?

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.

#4 2012-04-24 18:19:44

anonimnystefy
Real Member

Offline

Re: Accurate calculations

http://www.wolframalpha.com/input/?i=x% … 0000000001

It is just a problem that Wolfram doesn't want to calculate it to more digits.

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#5 2012-04-24 18:22:32

bobbym

Online

Re: Accurate calculations

Before I can comment on anything I ask, why are you using Wolfram when you have mathematica?

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.

#6 2012-04-24 18:30:11

anonimnystefy
Real Member

Offline

Re: Accurate calculations

I don't know.It makes my computer slow.

Last edited by anonimnystefy (2012-04-24 18:30:27)

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#7 2012-04-24 18:31:27

bobbym

Online

Re: Accurate calculations

Even when it is off?!

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.

#8 2012-04-24 18:32:19

anonimnystefy
Real Member

Offline

Re: Accurate calculations

No,when it is open.I haven't deleted it!

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#9 2012-04-24 18:36:46

bobbym

Online

Re: Accurate calculations

So then shut it down when you are finished with it.

First, Alpha in its desire to make an engine that understands English has ruined the mathematica language! You will never learn the correct syntax by using alpha.

Here is what you should have entered

N[x/(2sqrt(3))-x^2/(24sqrt(3)),20] for x=10^(-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.

#10 2012-04-24 18:42:27

anonimnystefy
Real Member

Offline

Re: Accurate calculations

I have opened Mathematica and entered:

N[x/(2*Sqrt[3]) - x^2/(24*Sqrt[3]), 20] for x = 0.0000000000000001;

but it gives me:

"Set::write: Tag Times in 2.88675*10^-17 1.*10^-16 for is Protected. >>"

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#11 2012-04-24 18:43:27

bobbym

Online

Re: Accurate calculations

That is the problem! That code is for Alpha. They are not the same!

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.

#12 2012-04-24 18:45:35

anonimnystefy
Real Member

Offline

Re: Accurate calculations

I even tried setting x=... before it.It doesn't give me more digits.How do I enter the code so that I get more digits?

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#13 2012-04-24 18:48:21

bobbym

Online

Re: Accurate calculations

You are not listening. Mathematica and alpha are very different.

Put this in alpha:

N[x/(2sqrt(3))-x^2/(24sqrt(3)),20] for x=10^(-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.

#14 2012-04-24 18:57:20

anonimnystefy
Real Member

Offline

Re: Accurate calculations

Can't you show me what to do in Mathematica?I want to learn Mathematica language and functions.

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#15 2012-04-24 19:01:55

bobbym

Online

Re: Accurate calculations

You use Mathematica functions for alpha too!

Mathematica allows many forms of input. This is the simplest:

N[x/(2Sqrt[3])-x^2/(24Sqrt[3]),20] /. x->10^(-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.

#16 2012-04-24 19:07:54

anonimnystefy
Real Member

Offline

Re: Accurate calculations

It still gives me 2.88675*10^-17

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#17 2012-04-24 19:12:19

bobbym

Online

Re: Accurate calculations

Your display digits is set too low.

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.

#18 2012-04-24 19:14:11

anonimnystefy
Real Member

Offline

Re: Accurate calculations

How do I change that?

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#19 2012-04-24 19:18:29

bobbym

Online

Re: Accurate calculations

Try this first, Edit then Preferences then Appearance then Numbers. Tell me when you are there.

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.

#20 2012-04-24 19:23:58

anonimnystefy
Real Member

Offline

Re: Accurate calculations

Actually,I found it,and I set 100,and it gives me this output:

2.8867513459481294*10^-17

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#21 2012-04-24 19:26:18

bobbym

Online

Re: Accurate calculations

100 is too large. Set it to 16 and then calculate Sqrt[2.], what do you get?

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.

#22 2012-04-24 19:30:50

anonimnystefy
Real Member

Offline

Re: Accurate calculations

1.414213562373095

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#23 2012-04-24 19:33:23

bobbym

Online

Re: Accurate calculations

Then it is working correct. Go into preferences and get to internet connectivity. Uncheck allow mathematica to access the internet.

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.

#24 2012-04-24 19:38:40

anonimnystefy
Real Member

Offline

Re: Accurate calculations

Why?

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#25 2012-04-24 19:42:25

bobbym

Online

Re: Accurate calculations

Shutting off the internet to mathematica might speed up the machine greatly. If you want to communicate with alpha use your browser.

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.