Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I have an equation like

f[x](1 + a)==0

I'd like to be able to tell Mathematica that 1+a doesn't vanish in general, and get back


I've come up with

Reduce[f[x](1 + a)==0 && (1 + a) != 0, f[t]][[1]]

But it's not clear to me this is the best solution.

EDIT: The reason this isn't ideal to me is that it seems sometimes the part that I want isn't always the first part of the output, so it doesn't generalize well. Sometimes I need to take [[1]], other times [[3]], etc.

share|improve this question
Not sure if I get Your question correctly, does Simplify[f[x] (1 + a) == 0, (1 + a)! == 0] works the way You want? – Wojciech Jan 10 '14 at 12:46
Can you provide a working example that represents the behavior described in the edit? – bobthechemist Jan 10 '14 at 12:46
Hi Wojciech, that works. Thank you for putting up with my lack of expertise! – Adam Jan 10 '14 at 13:04
@ Wojciech Can you formulate your comment in the form of an answer? – Alexei Boulbitch Jan 10 '14 at 13:25
up vote 1 down vote accepted

The answer is pretty straightforward, but I decided to post it anyway. The solution is to use function Simplify[exp,assum], with suitable assumptions. It works for an equation with just two factors as well as with more complex equations consisting of more factors.

Simplify[f[x] (1 + a) (1 + b)== 0, (1 + a)! = 0]

(1 + b) f[x] == 0

If You want to specify that more than one factor is unequal to 0 then

Simplify[f[x] (1 + a) (1 + b) == 0, {(1 + a) != 0, (1 + b) != 0}]

f[x] == 0

share|improve this answer
FullSimplify seems to work the same way, is there a reason to prefer Simplify over FullSimplify? – Adam Jan 10 '14 at 13:36
FullSimplify attempts to perform much more transformations than Simplify, but I don't think there's such a reason in Your case, apart from timing (10^-17 for Simplify, 0.031 for FullSimplify on my machine). – Wojciech Jan 10 '14 at 13:43
@Adam if this answer solves Your problem, You can accept it by clicking the tick. Now I'm officially a rep b****. – Wojciech Jan 10 '14 at 16:18
Thanks Wojciech. I'm new to this site - I tried to upvote you hours ago but couldn't (need more rep), and didn't notice the check :) – Adam Jan 10 '14 at 16:36
@Adam Thanks and good luck on Your Mathematica adventure! – Wojciech Jan 10 '14 at 17:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.