nm

11353 Reputation

20 Badges

13 years, 12 days

MaplePrimes Activity


These are replies submitted by nm

@vv 

I know about simplify(size) ofcourse but I stopped using it long time ago. I had mixed results from it. Sometimes it gives worst result than just simplify. Here is just one example out of 100's I have

138396

restart;

138396

A:=int(sin(x)^(1/3),x)

-((3/2)*I)*2^(2/3)*(-I*((exp(I*x))^2-1)/exp(I*x))^(1/3)+(1/2)*(int(-2/(-((exp(I*x))^2-1)^2*exp(I*x))^(1/3), x))*2^(2/3)*(-I*((exp(I*x))^2-1)/exp(I*x))^(1/3)*(-((exp(I*x))^2-1)^2*exp(I*x))^(1/3)/((exp(I*x))^2-1)

MmaTranslator:-Mma:-LeafCount(simplify(A))

66

MmaTranslator:-Mma:-LeafCount(simplify(A,size))

114

You see the simplify size gives result almost twice as large are just simplify in this example !

I understand that simplification is not easy in CAS. I think it is one of the hardest things to get right, but also simplification in CAS is one of the most important core functionalities. So important to get it right.

It is 50% science and 50% art and there is no one algorithm to follow each time as what is simpler can by a fuzzy concept.

I am finding the best thing is to reduce as much calling simplify and its friends or always check after calling simplify to see if the result should be used or not using some more tests. 

Download simplify_size.mw

@vv 

It looks like my method is not general and does not work for all cases. May be a iterative solutions as you have is simpler than trying to find short cut.

@Thomas Richard 

I did not see the check to turn off infinite scroll and neither did the OP. May it should be off by default?

But when I turned it off, how does one go to "next page"? I see no next page arrow any where to click on.

So user can only now see the first page.

Is this by design or is there a trick to go to next page while infinite scroll is off?

https://www.maplesoft.com/Applications/TopApplications.aspx

fyi;

I am seeing this alot in Maple 2024. Twice now in one day.

Unfortunately, like in Maple 2023, it is random where it happens. So can't make MWE. Just wanted to let you know it is still there in Maple 2024 and seems more frequent also.

interface(version)

 Standard Worksheet Interface, Maple 2024.0, Windows 10, March  01 2024 Build ID 1794891

Since that is the only message Maple gives, it is impossible for a user to know what caused it.

Hopefully sometime during this decade Maplesoft will be able to figure what causes it.

I did not know that Maple uses python and installs it own python. But if Maple does use Python internally for some things, it makes complete sense for Maplesoft to install its own Python and not use or depend on an external system level one.  

Do you know since which version Maple started using Python? I know Maple uses Java ofcourse but did not know it also needs Python to run.

@Kitonum 

You seem have a bug

            IsSameOrder([7,2,4],[7,4,2,7,2,4])
                           false

but it should be true, since 7,2,4 do show in same order. This is how I understood it. May be your implementation made assumptions different.

@Carl Love 

 it makes no sense to say that x has type integer if x is an unassigned variable. 

Humm. For years I've been writing things like

local n::integer;

in my procs. i.e. define n to be variable of type integer before making assignment.

Isn't the above what it means? 

I do that for all my variables. Try to give them the type that they will have and used for.

Because this way if a wrong type value assigned to it at run time, Maple will catch the error.

``

kernelopts('assertlevel'=2):
foo :=proc(m)
local n::integer;
      n:=m;
end proc;

proc (m) local n::integer; n := m end proc

foo(3)

3

foo(3.0)

Error, (in foo) assertion failed in assignment to n, expected integer, got 3.0

 

 

Did I not just do what you said makes no sense? Is not the code above saying that has type integer before it is assigned?

Download t2.mw

I never really understood this part of Maple well. Why have things called properties and things called types. Do you know?

I think this is a bad design in Maple.

Everything should just be just a type. Having types and properties makes the language confusing to say the least. It is hard enough to learn Maple type system and use it right,. now one has to learn properties also.

But my understanding is that assume facility when it sees "real" it takes it as property and allows ::. But outside of the assume facility  if you use ::real like you did, it is viewed as type and hence the error since there is no type called real in Maple. 

So it all depends on the context being used.

Anything in the assume (is belongs to it) when it sees real it understand it as property and will let you use it with ::.

May be some maple expert could explain why is everything not part of the type system as in https://www.maplesoft.com/support/help/maple/view.aspx?path=type#bkmrk1

@Carl Love 

 

Do you know how to reset it back to _C1? my program runs in a loop. So I need to rest back to _C1 each time.

I can't call restart ofcourse in the middle of the program to rest it for new problem. 

Now each time I call new_constant:= `tools/genglobal`(_C); it increments the counter. 

Maple 2023.2.1

@C_R 

Thanks,. I prefer to use the constant which is always has larger index than any already used. This makes things simpler.  But your second solution does not work. Here is an example

sol:=_C10+x-_C3*x+_C2*x^2;
myconstants:=indets(sol,And(symbol, suffixed(_C, nonnegint)));
n:=1; 
do n++ until is(_C||n=myconstants[-1]):
new_constant := _C ||(n)

This gives new_constant as _C3 but It should be  _C11  

Why do you say that element with the highest index is to the right. ?  For example

sol:=_C22+x-_C3*x+_C2*x^2;
indets(sol,And(symbol, suffixed(_C, nonnegint)));

Returns {_C2, _C22, _C3}

So it is not guaranteed that largest index is the last entry in the set. And since the result of indets is a set, and set has no explicit ordering in it, I can't really assume something about where the largest index can end at. Right?

I tried to find how Maple dsolve does it, but hard to follow the code of dsolve in the debugger. dsolve always adds new consant with index higher than any alreay used:

ode:=diff(y(x),x)=x+_C1;
dsolve(ode);

ode:=diff(y(x),x)=x+_C2;
dsolve(ode);

ode:=diff(y(x),x)=x+_C2+_C5;
dsolve(ode);

ode:=diff(y(x),x)=x+_C2+_C12;
dsolve(ode);

Gives

 

 

Notice how dsolve always use new constant of integration with index larger than any one present in the input. Not one in between. So Maple seems to do something similar to what I wanted to do.

@TechnicalSupport 

I know about this standard web page listing possible causes. None of them apply to me. 

Maple losses connection at random places (same with the random hangs) that I have been talking about for years.

If they happen at the same loop counter, then it will be easy to find the cause. But it is completely random. I think it is a memory problem. May be caused by the Java interface. 

Is there a technical reason why Maple have no logging facility?  If Maple has a system error log that one can enable, then all what your customers have to do is look at the Maple log file and find what caused the crash or server lossing connection.

Maple have been around for what, almost 45 years? I would expect a mature application like this to have at least a logging facility that one can look at to find the cause of these problems. 

May be Maplesoft should consider adding such a logging system to a future release, similar to windows event logger for example or similar to linux standard logging facility that many applications use where major events or error/warning messages are send to.

  • We’ve had a few reports of people encountering “Kernel connection has been lost” errors, and this update should fix that problem.

    I am afraid 2023.2.1 did not fix this. I still get



    3-4 times each day. 

    windows 10

    May be Maplesoft will really fix this in Maple 2024?

@Carl Love 

I understand now. I thought you were talking about the Physics package itself. I have no idea what what "Physics Updates/lib" is.

May be it is what is used to update the Physics package.

Strange that such a package will have any effect on the integrate command in this case. It seems to be added to libname by default when starting Maple.

@Carl Love 

As you see, I am not explicitly using Physics or loading it. It is in the system. right?

How does one try "without" the Physcis package? Do you mean there is a way to delete Physics package from Maple? How? And if one deletes the Physics package, how to install it again later? Since the command Physics:-Version(latest) will be gone if Physics package is not installed. right?

Will this not cause problems somewhere else if one removes the Physics package since it is core part of Maple and it could be used by other internal functions without the user knowing this?

But since you seem to imply you do not have Physics package on your Maple, and your Maple must be working OK, then I guess it is possible to remove Phyiscs package without affecting Maple internal working. But I now do not know how to do this.

But will google this now and see what I can find and if there are instructions on how to do this.

you could try google search with specific site as follows

"Normalized" "Expanded"  site:mapleprimes.com

I do not know if this will show what you are looking for or not.

First 20 21 22 23 24 25 26 Last Page 22 of 91