Skip to main content
8 events
when toggle format what by license comment
Jul 5, 2017 at 16:26 comment added jjc385 You might want to use the fact that the default second argument of Power is 1. Then you could do e.g. a b^2 /. a^(p1_.) b^(p2_.) :> a^(p1 - 1) b^(p2 - 1) t.
Jul 5, 2017 at 12:40 history edited Kvothe CC BY-SA 3.0
added 996 characters in body
Jul 5, 2017 at 12:26 comment added Kvothe I do actually want the power of pattern matching and not a simple replacement that I could have done simply by a -> t/b //Simplify.
Jul 5, 2017 at 12:25 comment added Kvothe @ Kuba, yes thanks, I've looked at those too and they are all about a similar approach to the problem that might be sufficient if adapted. However, I think my question of whether it is possible to expand Powers as products (temporarily turning off the fact that MMa will try to evaluate back to its power form) still stands, even though there are other ways to get around the problem. I guess that the example I gave was also to simplified for what I really want to do. I'll update it. ... (continues)
Jul 5, 2017 at 12:06 comment added Kuba See links in Mr.Wizard's answer in that topic.
Jul 5, 2017 at 12:06 comment added Kvothe @Kuba. Thanks, maybe. I will have to look at it closely. I'd say it was not the solution I was seeking, but might still be a (or the) solution to my problem. I have to check whether it is sufficient for my real problem (the simple a, b problem was a simplified example of what I want to do. I want to do multiple complex replacements that would be easiest to do if I can do them on something written as an expanded product without powers.)
Jul 5, 2017 at 10:38 comment added Kuba I think that's it: Can I simplify an expression into form which uses my own definitions, do you agree?
Jul 5, 2017 at 10:19 history asked Kvothe CC BY-SA 3.0