nm

11353 Reputation

20 Badges

13 years, 11 days

MaplePrimes Activity


These are replies submitted by nm

@Carl Love 

Thank you very much Carl this and notifing me about it;

Your new operators worked very well. There was one case where I could not use it. I was using your earlier operator ~= to display the equations as well as expressions before numerical values are substitued in, and when I switched to ~> and removed the () it did not like it for the equation case.

Here it is (assume your operators are defined and restart was done before each example:

v:=10;
eq &= (2*x +v = 5);

changed to


eq <~ 2*x +v = 5;
          Error, `=` unexpected

But this seems to happen for the = operator only from what I have seen so far. So it is not a big deal. I can add () for this one special case, like this

eq <~ (2*x +v = 5);

So I have changed my code to use your new operator <~. I think we should give this operator a name since it is very useful. I suggest the Love assignment operator if it is ok with you.

ps. I do not use Maple too much actually, mainly becuase I do not like the new GUI interfaces, even though I do like the language itself. I liked the old classical interface. I do use it on occasions to compare results with Mathematica (Maple seems really good in solving differential equations) and used it before few times here and there. But I consider myself a newbie in Maple.

You should not need a computer algebra program to do this trivial thing. It is only second order. can be done on the fly easily as we do it by hand.

@Carl Love 

thanks. Those short cuts help.

But as you can see, there is no way,using one command, to insert a new text mode group.

For example, if one is in an execution group, and want to make new text group below it, one must first create new execution group (ctrl-J), then go change it to text mode (Ctrl-T) in order to document something, before starting new execution group below it.

so, what is needed, is new command to insert text mode group (above and below), similar to the Ctrl-J and Ctrl-K, but work for text and not just executable. The bottom line: there is no way to make a new text mode group when one is inside an execution group and using one command only. at least 2 are needed. This is a UI design error.

someone can correct me if I am wrong.

 

@Carl Love Carl, your function is wonderful. I use it now all the time. Nice way to document the computation as it runs. This really should be part of Maple itself.

I was wondering, is it too much work to make it work, when the RHS is an expression, without having to group the expression inside () ?

For example this works:

restart;
`&=`:= proc(f::uneval, expr::uneval)
local x:= eval(expr);
  print(op(1, subs(_f= nprintf("%a", f), _x= x, proc(_f:= expr=_x)
end proc)));
assign(f, x)
end proc:

r1:=10; r2:=20;
x &= (r1 +r2 );

                               10
                               20
                         x:= r1 + r2 = 30

but this does not

x &= r1 + r2;

it gives

                            x:= r1 = 10
                            () + 20

it is not a big deal to put () around everything, but it would be nice it it can be avoided?

thanks again for a wonderful assignment operator.

@Markiyan Hirnyk 

That was really a rude reply by you.

@Carl Love 

thanks, That is very nice. now one can do this:

g&=int(cos(x),x);
                
Something like this should have been build into Maple itself ! You have invented a new useful assignment operator.

@Markiyan Hirnyk 

Sorry, but I do not use document mode or 2D math at all. I use worksheet and classical Maple for input. I also wanted a solution without any clickable calculus :). So that I can run large code and have the output to look at later. I mean, I am looking for way to do this using code only. No mouse, and no GUI interface.

thank you

@Axel Vogt 

"Is it a bug if posts are in languages other than English? That is actually an incredible attitude."

Please calm down. I thought it is a bug as what happened when the Maple web site was showing the web site in non-English due to geolocation bug. Since Mapleprime forum is full of bugs I thought maybe the same thing happens to some entries.

I visit many technical forums, and never seen a technical and international forum no-less, have discussion or a single question in it in something other than in English (except this).  Try to post a question at Mathematica or Matlab forums in something other than English and see what happens. Try that at stackexchange and see.

Unless the forum is local to a country, or private and not an international forum like this that is open to everyone, then there should be one common language used. period.

btw, English is not my birth language myself. And I would never think of asking a question here in my own language myself. It will be rude to do so since many (if not all) would not understand what I am saying.

 

 

why not post plain text code? Do you expect someone to type all of this?

 

Example

Diff(x1,t) = x2^2,
Diff(x2,t) = u,
y = x1

result in

Diff(y,t$2)-4*u^2*Diff(y,t) = 0
2*u*x2 - Diff(y,t^2) = 0
x1 - y = 0

Which version are using? Using Maple 17 I do not get the output you show, I get this:

--------------------
restart;
Diff(x1,t) = x2^2,
Diff(x2,t) = u,
y = x1;

      Diff(x1, t) = x2^2, Diff(x2, t) = u, y = x1

------------------

I do not even see where the `4` could have come from.

 

@Alejandro Jakubi 

Let me just step back one step. First I think we agree there can be different regions of expansion, and hence there is a need to tell laurent() (or series() the region, btw, Mathematica does not have Laurent[] function, but Series does both, Taylor and Laurent). 

How this API should look like, I am not sure. I am only a user. All what I am saying is that, from a user point of view, I want to ask a CAS to expand a complex function in some region, and currently this is not possible directly (unless one can do some smart tricks as shown above, and not all users would know how to do this).

To make this more concrete, here is a HW problem I had to solve (the one I asked about)

"Obtain two distinct Laurent expansions for f(z)=((3z+1)/(z^2-1)) around z=1 and tell where each converges"

Currently, neither Maple nor Mathematica as well supports specifying a region. Only an expansion point, and what seems to happen is that the disk around this point up to the first pole is used by default.

As far as implementation inside Maple, I do not know. I know I solved it by hand, by making a diagram and looking and seeing where to use Laurent vs. Taylor depending on direction. How to program this in a CAS, that is up to the math experts.

For an API, it can be as simple as supporting regions specificed as a disk or an annulus. So any mathematical way deemed to be the right way to specify these regions to use in the API would be fine.

Again, I am answering as a user, saying there is a need for this. I will leave how to do it for those experts in CAS programming :)

What does (T(z))r ® 0 as r ® ∞?  mean?  what is circle with R inside it? Is this some kind of worksheet coding?

@Preben Alsholm 

Thanks for the nice idea. It worked, it showed the same solution I did by hand:

I still feel there should be a standard API into laurent series to tell it the region to select.  

why not post plain text code so one can copy it and use it? Do you really expect someone to type all this looking at the screen?

I do not understand this forum. This sort of thing is never allowed, for someone to paste an image for the code on the Mathematica forum. I do not understand the rules of this forum that will allow this, I see it so often here and no one seems to complain about it.

@Carl Love 

"Whew! I am sick and tired of cut-and-pasting worksheets line by line."

If I can suggest, you can, using the mouse after pasting the image here, make it little smaller by resizing it. This makes it easier to read the whole post. Right now the images are too large.

To paste more than one equation here, since copy/paste does not work with more than one equation, what I do is this: I take snapshot of the screen, put in paint (on windows), then select using the mouse all the content I want pasted here, then paste here.This way I can paste large content as one image.

At the mathematica stackexchange forum there is a very nice tool to use to paste directly from notebook itself to posts at the forum. One can paste anything from the notebook. Simply select the cell(s), and with one click on a button the tool copies it then one just past it into the post with the mouse. Here is a link to it if you like to see how it looks like. May be someone at Mapleprime can make such tool for this forum.

First 84 85 86 87 88 89 90 Page 86 of 91