mmcdara

7601 Reputation

22 Badges

8 years, 323 days

MaplePrimes Activity


These are replies submitted by mmcdara

It's probably better "to say thank" once the job is done.
Not that I'm waiting after that to be happy, but I think I've lost my time with you.

By the way: the scheme is order one, meaning not better than a classical forward Euler, and significantly worse than a simple Runge-Kutta scheme of order 2.

Hi, 

 

You're right, some leading terms have a coefficient <> 1:

seq(print(u), u in LeadingTerm(GBs, plex(x[1], x[2], x[3], ya[0], ya[1], ya[2], yd[0], yd[1], yd[2])))

This also happens for other orders (grles and tdeg at least, I didn't verify for the others).

The command showstat(Basis) displays the corresponding code. But it is far too complex to me to understand if it does the reduction step.
The default option is the Buchberger's algorithm which, per se, doesn't produce a reduced Groebner Basis. Generally the reduction step is an "extra" operation. My guess is that Basis (with option Buchberger) never delivers a reduced GB and that you obtaining a reduced GB in your previous post was just accidental.

I think it would be interesting to look at what the other algorithms implemented in "Basis" (fgb, maplef4, ...) produce
 

NewtonLagrange2.mw

The plot is disabled (the file takes 8.8 Mo with the plot)

@Carl Love 

Carl, here is a screen capture of the alert window I get with Maple 2015.2 (2D Input)
ScreenCapture.pdf

This is a simple info: I repeat I never use this mode.

@Carl Love 


What the OP has written is correct when used in 2D Input :
Not in Maple 2015.2

The text in the pop-ip window says "some parts of the expression are ambiguous, please correct them according to one of the suggested possibilities.

My mystake was that 0<=r<=R was not correct in 2D input too
In fact V(r) := ... is not correct in Maple 2015.2

Once modified as V := r -> piecewise(0<=r<=R, ...) the syntax becomes right

@Carl Love 

I didn't know.

In fact I have decided a few years ago to  abandon this 2D input mode.
The reasons: at my office, maybe due to a poor installation, this mode is "unstable" and very slow.

"Unstable" means, for example, that sometimes a character in normal font becomes italic. It happens for instance when you suppress a character and replace it by another one and the result is dramatic.

For instance, if I've written ab := 23 instead of ac := 23 and if I correct this typo error, the result sometimes appears as
ac := 23 (italic c) and further down the page something like if ac > 1 then ... returns an error which means that Maple doesn't know ac (because it knows ac !)
If I open a terminal window (Windows) or if I've ran  Maple in background (Linux), I get an incredible lenghty warnong messages coming from Java. 
Let me say that a friend of mine, teaching in a university, faces the same problems and advices to her students to use the "old fashioned Maple input mode.

Why did I say "Slow": because if you have a rather long document in 2D input mode, in which you want to replace all occurences of some text by another one, or just find for some string, the process takes a lot of time. 

I don't blame Maple here.
Years ago people from MapleSoft came into our company and I evoked this problem.
The answer was something like "You have to use the Java version recommanded for your Maple version".
Easy to say if you work with your own laptop but verry difficult to realize if thousands of people in your company use applications invoking Java: ahving a Java version dedicated to Maple becomes impossible.

Nevertheless, thanks for the info
 

@radaar 

1-------------------
How to define a "function" (an "arrow procedure")
function.mw

See also the help pages
help(function)
help(operators,functional)

What you have done is just to say that there exists some function V which, for a value "r" of its argument, takes a value piecewise(0<=r<=R,-VV,r>R,0).
It is strictly equivalent to define a variable V equal to this same value.
But this is not, strictly speaking, the definition of a function.
In your case it works because you use V(r) in your ode.
But suppose you relace r by z in this ode: this will non longer work because V(z) (= the value of function V at point z) is not defined


2-------------------
Look to the attached file: you will see that the assignment
v := r -> piecewise(0<=r<=R,-VV,r>R,0);

is not correct (Maple 2015 at least, read again my previous answer)
With Maple 2015 (I will be able to test on later versions tomorrow) the correct syntax is 
v := r -> piecewise(0<=r and r<=R,-VV,r>R,0):
Piecewise.mw

 

In the attached file you will see (yellow highlighted text) 3 screen captures of sol_L (plus the one of the output) obtained by executing the code four times (click on the !!! button)

All these four solutions seem to be the same.

What are exactly the ouputs thar differ from one run to the next one? 

 

SP1JH7reply.mw

@Preben Alsholm 

 

Right, I didn't pay attention to that

@Preben Alsholm 

 

I think it's more a problem linked to the way Maple handles the piecewise function than a problem of dsolve.
Look to this:

restart;
ode:=diff(x(t),t)=`if`(t=1, 0, x(t));
sol:=dsolve({ode,x(0)=1});
odetest(sol,ode);
plot(rhs(sol),t=0..2,caption="The symbolic solution is right");

 

@Preben Alsholm 

restart;
gap := proc(t) 
 if t=1 then 0 else 1 end if:
end proc;

proc(t)  ...  end;
ode:=diff(x(t),t)=x(t)*gap(t);
sol:=dsolve({ode,x(0)=1}, x(t));
plot(limit(rhs(sol), epsilon=0), t=0..2);

@Preben Alsholm 

... but don't ask me why !!!

ThisOneIsCorrect.mw

@radaar 

I don't know what happened with your code but the solution iwhich is displayed is not good.
More of this, when I execute your code it gves the correct solume on my machine, with my Maple's version (2015)

GoodSolution.mw

@Mariusz Iwaniuk 

When I face a problem, I usualy try to solve it with one of the apps I know (Maple, Sage, R or Julia).
If I'm able to solve it in a satisfactory an efficient way with one of these four apps, I usually do not waste time to solve it with another one. 
I understand Mathematica has already given you a solution that suits you well: so, why do you want a Maple's solution: isn't it a waste of time?

Final contribution

@Mariusz Iwaniuk 

Hi again, (sand15 at home = mmcdara)

Here is the corrected Voltera2.mw

Volterra2bis.mw

 

First 135 136 137 138 139 140 141 Last Page 137 of 151