Re: MuPAD 3.0 and collect
- From: Christopher Creutzig <christopher@xxxxxxxxxxx>
- Date: Fri, 29 Apr 2005 09:28:39 +0200
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 .
- References:
- MuPAD 3.0 and collect
- From: Brad Cooper
- Re: MuPAD 3.0 and collect
- From: Christopher Creutzig
- Re: MuPAD 3.0 and collect
- From: Brad Cooper
- MuPAD 3.0 and collect
- Prev by Date: Re: MuPAD 3.0 and collect
- Next by Date: some "closed" form?
- Previous by thread: Re: MuPAD 3.0 and collect
- Next by thread: Mathematica summation
- Index(es):
Relevant Pages
|
|