Venkat Subramanian

431 Reputation

13 Badges

15 years, 265 days

MaplePrimes Activity


These are replies submitted by

@Giulianot 

I am glad it worked for you.

To say it short consider index 1 DAEs

dy/dt = f(y,z)

0 = g(y,z)

Maple cannot solve this DAE. It tries to convert this system to dy/dt = f(y,z) and dz/dt = g1(y,z). This is a fundamental mistake. The reason it crashed was Maple is trying to convert your system to this format and it fails. 

You are better off writing ODEs and giving consistent initial conditions. Do check my past posts which will avoid doing fsolve and might avoid tricky subsitutions (automated).

@Preben Alsholm 

 

Preben, yes, the objective is y2 at global time t = 1 and hence sol1(0.5) for the second stage.

Doing dsolve numeric inside the procedure obj beats the purpose. Perhaps it is still better to call once than twice.

I have tried Heaviside, tanh functions, switch functions, but no use.

Writing my own code for Hessian helps avoid this issue, but not very accurate, but atleast better than fdiff.

I think parametric dsolve numeric may not be as useful as I thought it would be. When inconsistent results are obtained, this concerns me a lot. Proper testing has not been done for these procedures and commands.

 

 

in fact, I am not able to get classic maple worksheet to work in windows 10 in most of my computers or laptops. Some of my students are lucky, it works for them. Maple installs fine, but nothing can be saved. When you run Maple, it will crash.

 

I even wiped out 10, reinstalled still no luck.

 

In just one of my new laptops (1 out of 10 computers/laptops in my group), I reinstalled windows 10, within 10 minutes installed Maple  14 (before even it went online for updates), it works without crashing. For some weird reasons, any future installations (Maple 18, 2015, 2016) has the same problem of crashing (classic worksheet crashes). 

 

However mw format works fine. This is unfortunate

 

 

@Carl Love 

I was just trying to correct the statement made by OP (sorry, I jump in whenever inaccurate statements are made. This includes current help files for dsolve numeric which already has some mistakes and wrong claims. I don't want an ignorant person to wrongly add this into future help files). We can't get the exact time steps used by dsolve numeric unless a procedure is used. This is actually very limiting as I am not sure how to do this is in compiled form for efficiency (I need to know the exact time steps some times).

We can agree that plot, implicitplot or odeplot, all of them just choose points based on quality of plots (guaranteeing error tolerance) not the stiffness of the original model (or time steps).

 

 

 

@sand 15

The commands you give don't seem to pick the time steps chosen by dsolve (adaptive time stepping). For test problems, it seems to pick 201 data points (0 to 1 for the model dy/dt = -y, dy/dt =-y^2, etc). The output you get will be just that.

 

If you want Maple's dsolve numeric adaptive time steps, you need to define the model as a procedure (function) and make Maple print the values of t for the time steps. for example. please check the procedure I used in

http://www.mapleprimes.com/posts/204894-Please-Bring-Back-Dsolve-Numeric-Method--Mgear

 

@Carl Love 

That helps a lot. I am not aware of the shortcuts. I was under the impression that shortcuts are just for typing convenience and not for efficiency in calculation or reduction in RAM. If that changes, let me know.

 

@Carl Love 

Your approach seems to be good. Can you please be kind enough to minimize using shortcuts for the commands and codes and split your commands as multiple lines?

Thanks

For example I would like see as OP posted

a:=[];

and then step by step commands to arrive at your final answer. thanks.

I am trying to figure what x[2], x[1] mean in your command

@taro 

more than 5 minutes to just open in mw format. opens in less than a second in mws format.

It may not be Java, but perhaps the added bells and whistles in Java format.

@ 

I hear from my staff's recent interaction with Maplesoft folks that Maple is moving away from Java based GUI and interface.  I sincerely hope that they will try to arrive at a gui very close to the previous classic mws interface.

@nm 

I believe the old vendor who supported the development of classic worksheet doesn't exist anymore. The Maplesoft folks moved to Java based interface (mw versions) which is a pain and is very slow compared to classic worksheet.

Current help files are  useless if they cannot be copied, pasted and tested. 

Maplesoft urgently needs to invest on folks who can do simple easy to edit/load/save/execute gui (i.e, no gimmicks, just mimic *.mws as mush as possible using 1d input and 2d output in mw) and shut everything else off. Call this mwlean. Keep the mw format for those who type only one line code to run some calculations (like using a calculator).

 

 

 

 

@Carl Love 

Your post clarifies the consistent behavior of Maple from storage and memory point of view. From a new user's point of view (in particular students just learning programming), I think it is not trivial to understand why results are different for sets, scalars and matrices.

 

@Carl Love 

in general there can be better documentation and help about commands that work in evalhf format  (compiled form when appropriate) and encourage users to use only those commands as much as possible.

 

 

@Carl Love 

x:=[1,2,3];
x := [1, 2, 3]

> y:=x;

y := [1, 2, 3]

> y[2]:=3;

y[2] := 3

> x;y;

[1, 2, 3]


[1, 3, 3]

 

I think in other languages, I don't think it is possible to assign A :=B matrix directly, I might be wrong. I typically write a loop.

@Carl Love 

 

x:=Matrix(1,1,[1]);
x := [1]

> y:=Matrix(1,1);

y := [0]

> y:=x;

y := [1]

> y;x;

[1]


[1]

> y[1]:=2;

y[1] := 2

> x;

[2]

> x1:=1;

x1 := 1

> y1:=x1;

y1 := 1

> y1:=2;

y1 := 2

> x1;

1

 

We may be on the same page, but to me it looks like := means different things for scalars and vectors

@Carl Love 

 

It took me a long time to realize this simple thing when I started using Maple. However, there is some inconsistency.

If I use x:=2; y:=x; y:=3; x still remains as 2. 

 

First 7 8 9 10 11 12 13 Last Page 9 of 18