Timeline for What is the simplest way to proceed when a rule does not match? [duplicate]
Current License: CC BY-SA 3.0
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 3 at 0:53 | history | closed | lericr Syed Dunlop creidhne A. Kato | Duplicate of How to substitute the following conditions into an expression? | |
| Feb 2 at 0:32 | review | Close votes | |||
| Feb 3 at 0:53 | |||||
| Oct 10, 2016 at 8:06 | comment | added | Frank Martin | @FernandoSaldanha, Thanks for your time to reply. I'm a bit confused why it doesn't work. Might get back to that later. | |
| Oct 6, 2016 at 14:44 | comment | added | Soldalma | @FrankMartin Sorry for the mess in my previous comment. There is a problem with the asterisk character. What I wanted to say is that with an asterisk between the a and the x, meaning Times[a,x], both commands work fine. However, without the asterisk, that is, with variable ax, one of them does not, that is, Simplify[ax + b, -ax - b == z] returns ax+b. I quit the kernel and restarted it before evaluating this. | |
| Oct 6, 2016 at 14:31 | comment | added | Soldalma | @FrankMartin Indeed, with ''between the a and the x, Simplify[ax + b, -ax - b == -z] returns 'z' and also Simplify[ax + b, -a*x - b == z] returns '-z'. However, (mysteriously, at least for me), without a * between the z and the x, Simplify[ax + b, (-ax - b == z)] returns 'ax + b'. I am also using Mathematica 11. | |
| Oct 6, 2016 at 8:24 | comment | added | Frank Martin | @FernandoSaldanha Simplify[a*x + b, -a*x - b == -z] returns 'z' for me and also Simplify[a*x + b, -a*x - b == z] returns '-z' for me. Could you please check that? (I'm working in Mathematica 11) | |
| Oct 5, 2016 at 21:49 | history | tweeted | twitter.com/StackMma/status/783786256299859969 | ||
| Oct 5, 2016 at 16:34 | comment | added | Soldalma | @FrankMartin - Thanks for the suggestions, but neither one of them works. I had a*x +b, not ax+b, but even independently of that, if you change the sign in front of z you get back ax+b. For example, Simplify[ax + b, (-ax - b == z)] returns ax+b. | |
| Oct 5, 2016 at 16:32 | comment | added | Daniel Lichtblau | @FernandoSaldanha Much as I appreciate the gesture, the fact is that this is likely to be closed as a duplicate. See 1 or 2 or 3 (and there are some others as well). | |
| Oct 5, 2016 at 16:27 | comment | added | Soldalma | @FrankMartin - Thanks for the suggestions, but neither one of them works if you change the sign of z. For example, | |
| Oct 5, 2016 at 16:26 | comment | added | Soldalma | @DanielLichtblau - Thanks, it works! I saw a "2" besides your comment. Can I accept a comment? | |
| Oct 5, 2016 at 15:32 | comment | added | Frank Martin | Or even simpler: Simplify[ax + b, (-ax - b == -z)] | |
| Oct 5, 2016 at 15:24 | comment | added | Frank Martin | Not sure if this helps but you can also use FullSimplify: FullSimplify[ax + b, Assumptions -> (-ax - b == -z)] | |
| Oct 5, 2016 at 15:17 | comment | added | Daniel Lichtblau | Use PolynomialReduce. In[9]:= PolynomialReduce[a x + b, {-a x - b + z}, {a, b}][[2]] Out[9]= z | |
| Oct 5, 2016 at 14:37 | history | asked | Soldalma | CC BY-SA 3.0 |