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

You are not logged in.

- Topics: Active | Unanswered

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 94,020

Theoretically, Romberg should be much better than Simpson's.

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

**I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,918

But, it is more complicated to program, though.

Here lies the reader who will never open this book. He is forever dead.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 94,020

You only need one column and the the formula generates all the rest.

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

**I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,918

But, how do I know how many values to get for the first column?

Here lies the reader who will never open this book. He is forever dead.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 94,020

You do not. But like a difference table how far you go horizontally depends on how tall the first column is. Each column is more and more accurate, so pick a number n and go from there.

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

**I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.**

Offline

**gAr****Member**- Registered: 2011-01-09
- Posts: 3,479

Hi,

Can anyone tell how to find the value of the following integral upto four significant digits with the help of a computer but not a readymade CAS?

J simulation:

```
load 'trig' NB. required for cos
samp =: 1000000 NB. the number of samples
avg =: +/%# NB. the average function
f =: ?samp$0 NB. random numbers in range (0,1)
fn =: cos f*pi%4 NB. get the list of cosines after scaling into range (0,pi/4)
fn100 =: fn^100 NB. get the 100th power
avg fn100*pi%4 NB. Take the average after multiplying (pi/4-0)
```

≈ 0.125139

which is close enough!

"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

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,918

Isn't o. used for trig functions as well?

Here lies the reader who will never open this book. He is forever dead.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**gAr****Member**- Registered: 2011-01-09
- Posts: 3,479

trig functions must be loaded.

o.n is pi times n.

"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

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,918

Only when monadic. As dyadic, it represents circle functions: http://www.jsoftware.com/help/dictionary/dodot.htm

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**gAr****Member**- Registered: 2011-01-09
- Posts: 3,479

Okay, thanks, did not see that before!

"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

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,918

You're welcome.

The functions are hard to remember.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**gAr****Member**- Registered: 2011-01-09
- Posts: 3,479

Indeed, they are hard to remember and understand.

Anyway, it's good and quick once we get a hang of it. Their documentation is good, but scattered. They need to reorganize that.

E.g. I had to search for quite a long time to find how to change the array values

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

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,918

I agree. Fortunately, the tutorials I found on that site are great!

How good are you with tacit expressions?

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**gAr****Member**- Registered: 2011-01-09
- Posts: 3,479

Yes, and there are essays in that site with very useful programs!

I'm still learning. Are you too trying out J?

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

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,918

Yes, I've seen them. They are fantastic.

I have learned a bit about it, I was amazed by how simple and complex it looks at the same time. Also, the tacit programming part of J caught my eye. I haven't done much in it though.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**gAr****Member**- Registered: 2011-01-09
- Posts: 3,479

Okay, tacit programming is the best part of the language.

But needs much practice to know the rules and use it efficiently.

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

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,918

Yes, that is pretty much the reason why I could never do much in it.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

How do I evaluate this?

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

'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 94,020

What have you tried and although you have posted this in Computer math, I have to ask what method do you want?

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

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,918

Hi Agnishom

You can use this fact:

I would not recommend it, though.

*Last edited by anonimnystefy (2014-05-21 20:04:36)*

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 94,020

Here is an answer that uses Gaussian integration and has an error of approximately 10^-48

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

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,918

And the exact answer, given by M is:

*Last edited by anonimnystefy (2014-05-22 00:49:51)*

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 94,020

Hi;

Unless he wants an numerical integration method.

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

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,918

Well, it is the exact answer even if he doesn't want it.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 94,020

But he has M so why would he not do that himself?

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

Offline