nm

11353 Reputation

20 Badges

13 years, 12 days

MaplePrimes Activity


These are questions asked by nm

I am trying separation of variables in Maple. I get an equation that has the form   

And now I want to tell Maple to assign the terms with 1/R in them to one variable, say eq21, and the term with 1/Z to second variable, say eq22 The idea is that I can later more easily work with each separate ode. 

I do not know to separate those apart. I could offcourse copy and paste by hand, but I want to automate this.

I tried match() and patmatch() but I am not seeing the way. Here is the code:

restart;
T:=  (r,z)-> Z(z)*R(r);
eq1:= diff(T(r,z),r$2)+1/r*diff(T(r,z),r)+diff(T(r,z),z$2);
eq2:=expand(eq1/(Z(z)*R(r)));

#need now way to break the above into 2 different variables.

ps. I know I can do this:

restart;
T:=  (r,z)-> Z(z)*R(r);
eq1:= diff(T(r,z),r$2)+1/r*diff(T(r,z),r)+diff(T(r,z),z$2);
eq2:=expand(eq1/(Z(z)*R(r)));
eq3:=collect(eq2,1/R(r));
eq21:=op(1,eq3);
eq22:=op(2,eq3);

But this for me is not the right way to do it. I think there should be more algebraic way.

 

I was trying to see if Maple contains equivalent to Mathematica FreeQ command to check inside a proc if an input expression contains an "x" or not.  I could not find such command in Maple. So now I call indets(), which is a nice function, that tells me all the symbols in the expression, then use member() to check.

Would this be correct way to do this? Here is an example

expr:=3+4*sqrt(2)-x+y*sin(3*t);
s:=indets(expr);
if member(x,s) then
   print(`yes, x is there`);
fi;

I can't use patmatch() for this, as I do not know what the expression will look like yet, I just needed to know if it contains an "x" (in this case), a free symbol "x", and that is all.

I thought to ask if there is a better way to do this.

Another worksheet dilemma  I am having with Maple.

I have number of "execution groups", like this, I created using CTRL-J

Now I wanted to put these in a section, so it becomes like this: (I had to make new worksheet now)

Since I did not know how put existing groups inside a new section I wanted to create (the section always comes at different level that does not include the groups), I thought I can create the section first, then go copy the groups and paste them to the new section.

The problem is how does one actually select multiple execution groups for the purpose of copying them?  The obvious way is to use the mouse, and select all groups with the mouse.

Well, this a big problem, since my groups are so large, I can spend 5-10 minutes scrolling down, very slowly to select them. my hand gets tired and I get tired doing this. I also one time got an error from Maple, saying selection too large, and something about rtf memory error or something. This is after wasting 10 minutes scrolling down carefully to select over 10,000 lines that is one large list.

In Mathematica, I can simply select a cell, no matter how large (an execution group in Maple talk) by just clicking on the edge of the cell.  I can select multiple cells the same way (hold, click on the edge of all). Very easy. I do not have to scroll down to select the content as I do with Maple

But here, with Maple, I put the mouse of the left edge, and can't select the group. Nothing happens. So I have to actually scroll down. I do not see the point of having a left [ edge to a group if one can't use it to select the group?

So my question is: How to select one or more execution groups without scrolling the mouse over all the content?

I had to use integration by parts to get the answer I need, but I do not think it is really needed for this. compare the output from:

r:=int(tan(x)^(n-2)*sec(x)^2,x);

(which is pages of very complicated output), with this:

r:=Int(tan(x)^(n-2)*sec(x)^2,x):
simplify(value(IntegrationTools:-Parts(r,tan(x))));

Does one really have to tell Maple to do integration by parts for this? I would have expected int() to do it as is.

Please compare to Mathematica:

Maple 18.02

added

The reason I think this should have been done by int() directly is that it is direct  application of the power rule of integration. I can't write Latex here, so I wrote it on my computer, and I copy the screen shot to explain for those interested:

Maple is so good in differential equations, but does not seem to be as good as it should when it comes to integration.

2 questions: How would one delete  an execution group that is at top of a work sheet? Like this:

No matter what I do, I get a beep. I select it, click DELETE and nothing happens.

THe second question, is how to delete the last section arrow I added by mistake and do not want, this one:

I found I can remove if I select it with the line above, but then that would delete the code above also, which I'd like to keep.

Why is so awkward to use Maple user interface like this? Is this by design?

To make it easier, I attach the above notebook.

 

hard_to_delete.mw

First 179 180 181 182 183 184 185 Last Page 181 of 199