itsme

569 Reputation

13 Badges

12 years, 326 days

MaplePrimes Activity


These are replies submitted by itsme

@Carl Love 


yes, Grid:-Set was introduced in 2015, as the grid package was rewritten then - I assumed that's what you were using. Note that my statement still holds for older versions of maple - see this thread:

http://www.mapleprimes.com/questions/201392-GridMap-No-Speed-Up

a maplesoft dev talks about what gets copied and what does not.


... also note, from that thread, Grid:-Map (i don't know about Grid:-Seq) was badly broken before version 2015.


@mthkvv 

ok i see.

as carl mentioned, you're better off running threaded version of map/seq if you are operating on commands that are thread safe such as these... but I agree that Grid should not break on something as simple.

by the way, which version of maple are you using?

EDIT:

another quick question... how long does the threaded version with the list of 1e7 take to complete on your machine?

@Carl Love 

In the case of Grid, the entire memory space must be copied to each process,

i think this is not true... in fact if one wants variables to get copied over to the other processes, that has to be done explicitly via Grid:-Set.

... although I'm not sure about the actual list that say Grid:-Map is operatintg on - but my guess is that even in that case each process only gets a portion of it that it is operating on.

this is really very nice!...

any ideas how to export these plots along with their colorbars directly?

@rlopez 

thanks for your comment.

yup, i did notice that Typesetting:-Typeset indeed does the trick. It could be a good idea to include this info into the docs for typeset however. Right now, there isn't a mention of this kind of behavior in the help page for typeset. The page also does not link to the Typesetting package.

 

 

@Alejandro Jakubi 

if you're implying running maple from command line, and exporting from there (i.e., via plotsetup), then i would strongly advise against this. plotting from cli is completely broken in maple.

@acer 

yup, things seem to align more reasonably now. Thanks for submitting a bug report about this.

@tomleslie 

The OP's first post was titled Euler-Lagrange equations,

I somehow missed the OPs title - i don't even know how that is possible since i had to click it... long day maybe.  ..which would make your link fully relevant - my bad.

@tomleslie 

 

I included the link to be sure we're talking about the same help page - those can change from release to release.

Well, at least I understood that the OP wants to know how to differentiate a function with respect to a variable that itself is a function.

Finding EL equations in general would of course not be the same thing...

While this is clearly not the case in the F that OP defines, if one had a slightly modified version such as say

F:=D(y)(x)^2-y(x)^2+2*y(x)*x^2  + ((D@@2)(y)(x))^2;

then the EulerLagrange will (as expected) give a different results than Physics[diff]:

convert(EulerLagrange(F,x,D(y)(x)),diff);

convert(Physics[diff](F, D(y)(x)), diff); #different than above!

Your code clearly works here, but to be honest I'm not sure that you're using the EulerLagrange method as intended - I would guess that the third argument is not expected to be a derivative. Note also that if F was defined in terms of the "diff" operator and not "D", your code would not work.


P.S. I think your y should be y(x) in the last term of F - this has no effect on the discussion (so far).

@tomleslie 

while certainly relevant, IMO that help page is not particularly helpful in answering OP's question.

See for yourself:

http://www.maplesoft.com/support/help/Maple/view.aspx?path=VariationalCalculus%2fEulerLagrange

@Carl Love 

yup - agreed. i also check the copied results... but as long as only "standard" variable names are used (this includes ones with double underscores), copy/pasting seems fairly reliable.

@hpc 

I feel your pain with getting maple's results into latex. Within the last week alone, I probably copied at least 50 lines of maple's output into latex... but manually. The latex that maple produces by default, is not really usuable in my experience.

 

 

@hpc 

well..  i meant the "extra space" as in the space in the variable you've initially defined.

or put another way, the copied variable has no space while the original, defined as "de" does.


The point of course is that one would probably expect that simplify(a-b) should give 0 because the two expressions would be the same - but they're not as far as maple is concerned - the process of copy/pasting altered one of them.

@hpc 

You're wolceme.

... but as I was saying, you should be careful with using the de as you've defined it. It's really easy to run into weird problems when you need to copy/paste code. It's trivial here, but when you have more complicated expressions that you have to deal with, finding this problem could take a while. So having a "guarantee" that variable names copy/paste properly is quite important.

In the example below the problem goes away (at least here) if one defines:
de:=`δx`;  #no space



 

here is the raw code:

de:=` δx`;
a:=de * 3;
de;
#copy paste the delta x from the 2d math from Eq above , into the next expression to to define b:
b:= δx * 3 ;
simplify(a-b);
#again copy paste the two - note now there is an extra space
#in one of them, between the quotes! - the delta we've defined
#is not the same as what got copied!
3*` δx`-3*`δx`

@Alejandro Jakubi 

i have - in the past.

3 4 5 6 7 8 9 Last Page 5 of 15