Carl Love

Carl Love

28045 Reputation

25 Badges

12 years, 332 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

This is with Digits = 15, and all dsolve options (other than method, of course) at their defaults.

Method     digits of accuracy

adaptive
methods

dverk78            5
taylorseries       4
rosenbrock        2
ck45                1
gear                 1
rkf45                0
mebdfi              0
lsode               -3

classical
methods

rk4                    7 (!!!)
abmoulton          6  (!!)
adambash           6 (!!)
impoly                4
rk3                    4
rk2                    4
foreuler              0

For the lsode, my -3 means that the answer was wrong by three orders of magnitude!

Can anyone explain why these classical fixed-step-size methods with no modern error control fare so much better? Could it be that they are using a very small stepsize?

This is with Digits = 15, and all dsolve options (other than method, of course) at their defaults.

Method     digits of accuracy

adaptive
methods

dverk78            5
taylorseries       4
rosenbrock        2
ck45                1
gear                 1
rkf45                0
mebdfi              0
lsode               -3

classical
methods

rk4                    7 (!!!)
abmoulton          6  (!!)
adambash           6 (!!)
impoly                4
rk3                    4
rk2                    4
foreuler              0

For the lsode, my -3 means that the answer was wrong by three orders of magnitude!

Can anyone explain why these classical fixed-step-size methods with no modern error control fare so much better? Could it be that they are using a very small stepsize?

Unfortunately, those tags don't survive editing. To make the example below, I edited your post, cut the whole thing, cancelled the edit, then pasted it into this post. Notice that although the formatting stays the same, the tags are gone.

Example:

i noticed members use such tags in their post very rarely in mapleprimes

and i am confused whether ?

there is a list of special html tags that are supported in "HTML Source Editor" of mapleprimes

that are compatible with it ? or all tags described in html5 or html4 are compatible ?

i just tested a few of those tags and they work excellent ...

i used these tags from wikipedia

 ascii art 
  (\=,   
 //  .\  
(( \_  \ 
 ))  `\_)
(/     \ 
 | _.-'| 
  )___(  
 (=====) 
 }====={ 
(_______)

text

text

 

@jaytreiman wrote:

Why does this example do any numerical integration?

Using capital I guarantees that it will use numeric integration, even if it knows the antiderivative. You can verify that it is using numeric integration by setting infolevel[evalf]:= 1 (or higher).

You are still using a function that has an antiderivative that is known to Maple.

It is not known to my version of Maple (17.01). Notice the double exponential: exp(-exp(x^2)). If you can get Maple to produce an antiderivative for that, I'd like to see it.

Since Maple usually tries to evaluate the function to be plotted before any plotting is done, I do not see the difference.

Under the normal evaluation rules, capital I Int is just a dummy function---just a name. It remains unevaluated. You can verify this by entering eval(Int) and seeing that there is no procedure or module by that name. It is only when evalf or value is applied to it that anything happens.

Your method works without the Int.  You can use int instead.

That is true. But with int it will waste time trying to find an antiderivative. It is not much time in this particular case, but could be a substantial amount of time for other integrands. If you know that you want numeric integration, you should use Int from the start. There are also cases where int won't work---it will cause an error---such as when the integrand involves a call to fsolve, a common situation.

 

 

 

@jaytreiman wrote:

Why does this example do any numerical integration?

Using capital I guarantees that it will use numeric integration, even if it knows the antiderivative. You can verify that it is using numeric integration by setting infolevel[evalf]:= 1 (or higher).

You are still using a function that has an antiderivative that is known to Maple.

It is not known to my version of Maple (17.01). Notice the double exponential: exp(-exp(x^2)). If you can get Maple to produce an antiderivative for that, I'd like to see it.

Since Maple usually tries to evaluate the function to be plotted before any plotting is done, I do not see the difference.

Under the normal evaluation rules, capital I Int is just a dummy function---just a name. It remains unevaluated. You can verify this by entering eval(Int) and seeing that there is no procedure or module by that name. It is only when evalf or value is applied to it that anything happens.

Your method works without the Int.  You can use int instead.

That is true. But with int it will waste time trying to find an antiderivative. It is not much time in this particular case, but could be a substantial amount of time for other integrands. If you know that you want numeric integration, you should use Int from the start. There are also cases where int won't work---it will cause an error---such as when the integrand involves a call to fsolve, a common situation.

 

 

 

Running out of memory will often cause a stack limit error. This error is unrecoverable, so you lose the kernel. When running these big programs, it is useful to monitor your memory usage externally with a program like Windows Task Manager on Windows or "top" on Linux. When your memory usage is at about 95% of the available total, it is probably time to kill the program.

My guess is that the new machine has less memory available to you than the old machine. Is it shared with other users?

By not using simplify, you will also use much less memory.

 

Running out of memory will often cause a stack limit error. This error is unrecoverable, so you lose the kernel. When running these big programs, it is useful to monitor your memory usage externally with a program like Windows Task Manager on Windows or "top" on Linux. When your memory usage is at about 95% of the available total, it is probably time to kill the program.

My guess is that the new machine has less memory available to you than the old machine. Is it shared with other users?

By not using simplify, you will also use much less memory.

 

@Heeka It will work in Maple 16.

No, you do not ask too many questions. Your questions about Maple are always welcome here!

@Heeka It will work in Maple 16.

No, you do not ask too many questions. Your questions about Maple are always welcome here!

Jay,

MaplePrimes seems to reinterpret the plot commands when you upload a worksheet. For example, notice the inclusion of gridlines. To prevent this, export the plots and upload them separately. I usually export as PNG if I'm not happy with how MaplePrimes mangled my plot.

Jay,

MaplePrimes seems to reinterpret the plot commands when you upload a worksheet. For example, notice the inclusion of gridlines. To prevent this, export the plots and upload them separately. I usually export as PNG if I'm not happy with how MaplePrimes mangled my plot.

Georgios,

In your example, Maple is not doing any numeric integration. It is computing a single antiderivative, which it then plots. You were just lucky that the constant of integration was what you wanted.

 

Jay,

Your first example (in the Answer) is not numeric integration either. The quotes are making Maple compute the antiderivative separately for each point it plots.

Georgios,

In your example, Maple is not doing any numeric integration. It is computing a single antiderivative, which it then plots. You were just lucky that the constant of integration was what you wanted.

 

Jay,

Your first example (in the Answer) is not numeric integration either. The quotes are making Maple compute the antiderivative separately for each point it plots.

@Heeka The GraphTheory package that I have been using throughout your two most recent threads does not exist in Maple 11.

The only other techniques for enumerating the Eulerian circuits that I can think of would be ad hoc---they would only work for a very small graph like this. Without loss of generality, we can assume that all Eulerian circuits begin with edges CA and AT.

@Heeka The GraphTheory package that I have been using throughout your two most recent threads does not exist in Maple 11.

The only other techniques for enumerating the Eulerian circuits that I can think of would be ad hoc---they would only work for a very small graph like this. Without loss of generality, we can assume that all Eulerian circuits begin with edges CA and AT.

First 633 634 635 636 637 638 639 Last Page 635 of 709