927 Reputation

10 Badges

12 years, 157 days

MaplePrimes Activity

These are replies submitted by casperyc

@acer Didnt think factrix worked.


Sorry if my post was not clear. The "tmp" come from a long substition using various "applyrule" , "factor" ,"combine" and "collect". But the term should end up with only "s" remaining. Like an earlier post here.

All I want, is for Maple to be able to do the substitution. Please see updated orignal post at the top.


I dont think it is "applying" the rule, due to the constant integer factor "2".


@acer Yes, I can see that you are very thorough about this. I do appreciate that. I think I am happy to leave the dicussion at this point as it is.

What I am trying to say is, this is not something people are normally aware and it would be nice to be able to 'deal' with at background.

If someone is not aware of this, someone could always end up with a 'wrong' rank.

I remember just about a year ago, I was discussing this "exponential" problem with my supervisor, she said that now Maple can handle the types of model we are instersted in. I agreed at that time until today. I was checking the "bad example" again. It pops up with rank=9, while are are expecting it to be 8.


But anyway, I found this very insteresting!

@acer I guess the general rule is "use with causion" then?

Because as a standard user, we wouldn't think too much about it, like the authors wrote the 2003 paper. (regardless their old version of Maple)

Initally when I was trying to locate this example, I got the wrong rank as well. Then I played around with it and found that the true rank.

In my worsheet, I used expand~(A) because I have seen (been told) it somewhere, like in this post. I though expand might do the trick. It worked.

I understand that it might be difficult to find the "right" hammer in general, but is there a way to double check this?


########### Updates ############

Further reading suggests that a PLUR decomposition can actually check this.

p,l,u,r:=LUDecomposition(A, method = 'RREF'):


The determinant of u is 0, suggests that the matrix A is NOT full rank.


@Alejandro Jakubi That's works perfect!

@Alejandro Jakubi @Thomas Richard


Thanks. I will bring this to the class and have a go with the machines that have this problem. But personally, I have never had this strange problem. So I can't try it out. It looks like a small hardware problem.


why do you need the 'x=-1..1' for fsolve(G)?

@Carl Love Thanks (and thank you @Allan Wittkopf ). If I ever encounter these problems. I will keep this in mind. Now I only deal with systems of first order linear DEs. Maple is doing just well enough for my purpose.

@Carl Love It does seem that loop is better in this case. Thanks!

@Preben Alsholm Helped a lot! Thanks!

That reminds me that I need to refresh my memory on Differential Equations.

@acer Well, if possible, yes, certainly a 3D plot will be even better. The "more" we can see, the better.

@acer Exciting!


This is now working. Really exciting and useful.

I have attached a copy with some of my actual work (with real data).

The model I am trying to fit is a log Gamma model.

I trying to see if Maple can be used to optimize a semi infite integral.

Using other programmes and some approximation to setup the expressions in the integral, the maximized values is just around -22.3776.



The loglikelood takes quite a long time to compute and the alogrithm currently has not yet hit anywhere (for hours).

But that's another topic.

As far as my original request is concerned, this had given me far more than what I expected.


Thanks again,



@acer @Alejandro Jakubi

I haven't used Maple IDE but had heard about it several times.

Just to say that I hope it will be FREE or built into Maple in future release.

Currently, I am writing all my code in notepad++ and use file extension .c, so I can have "reasonable" syntax highlight.

Then open up a .mw file in Maple GUI, read the code in, and test it.


It has been working well for me to manage my whole PhD research.

Such as IDE would really hopeful.


To answer your question, yes, I was only "having fun" (testing) with your ticker2 file. Or if you like, I am stressing testing it. One of the calls returned a "P".



And to get back to my initial motivation, here is a "bigger" toy example,

you can think the function "f" as a likelihood function, which needs optimization.

In the big procedure, I was doing the optimization, and returns some useful information.

When I have a "complicated" function, it takes a long time to run the optimization. So I want to see if it's possible to track the values.


In the "f" procedure, if you uncomment #print(ans);

It will take a looooog time to display (print) the values. That's why the plot option is a better solution.


Difficulties are:

1 - we dont know when (and how) the "f" function is called.

2 - Yes, I am planning on calling it many times (in the same worksheet). Would that run into some danger from your code at the moment?


I will also pm you a copy of the full code for your insterest.








@acer I will take a detailed look.

Just to note, you also commented in the sheet that the second p(1000) will produce errors. I didnt get any after I run it. It's just that if I run it (the same procedure) many times, say




I end up with a symbol "P". and just by a quick look, I am not sure why this is the case.

Does that mean it cant be repeated??


1 2 3 4 5 6 7 Last Page 2 of 22