Re: MuPAD 3.0 and collect



Brad Cooper wrote:

If    map(%, map, collect, `ρ`*sin(`θ`));    is what the user
is trying to achieve, but does the steps one at a time...

map(%, map, collect, `ρ`);
map(%, map, collect, sin(`θ`));

Or map(%, map, collect, [`ρ`, sin(`θ`)]), for yet another result.


vice-versa. This means the intended collection where  `ρ` and
sin(`θ`))
are together, will not be achieved. To overcome this, the user has to
carefully
go through all the operands and exclude some of them from the collection.

If (and I realize this is a big if) the `ρ`*sin(`θ`) are already in a product (no distributive law required etc.), you can use


subs(collect(subsex(ex1, `ρ`*sin(`θ`)=tmp), tmp),
     tmp=`ρ`*sin(`θ`))

The same holds for 1/r.

This approach is, unfortunately, not a sufficient way of implementing a better collect function, simply because of the limitations expressed above.

I realise the difficulty of even the "simple" case of collect(obj, 1/r)
recognising (x/r+1/r) as a hit.

That one actually is pretty simple, since MuPAD represents x/r as x*r^-1. collect uses polynomial arithmetic and poly does not accept 1/r as indeterminate.



But I agree that products and 1/r should work, too.


Do you want me to report this as a bug?

That would be a good idea, since I won't have time to look into this in the near future.



regards, Christopher .



Relevant Pages

  • Re: Crawl: Patch - various
    ... stop the same way as travel? ... time frame (since taking even one hit makes you stop dropping). ... multidropping will tend to be about 8 turns away from you. ... You can also do it on the level map. ...
    (rec.games.roguelike.misc)
  • Re: Unable to view wanted pop up
    ... and then hit the go button, a new window pops up for a split second and then ... You click on the "Large map" button, hold down the CTRL key and then ... hit the go button the same thing happens. ... Holding down the CTRL key should work but for some reason it's not. ...
    (microsoft.public.windowsxp.general)
  • >>XP Pro & 2k Pro cant access XP Home<<
    ... access to the Home from the Pro, ... When I try to map a drive from the prompt (on Pro & ... So if I just hit enter w/o entering a password on XP, ... map in gui, it asks for a password with the username ...
    (microsoft.public.win2000.networking)
  • Formatting Posts With VI
    ... map v fmt -c^V^M ... Do the editing, go back to command mode, and hit "v" and 99 times ... times out of a 100 the paragraph is okay again. ...
    (comp.os.linux.misc)
  • Formatting Posts With VI
    ... map v fmt -c^V^M ... Do the editing, go back to command mode, and hit "v" and 99 times ... times out of a 100 the paragraph is okay again. ...
    (alt.linux)