Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

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

I'm trying to simplify the following expression $$\frac{n.r \ p.q - (n.p + n.q) (p.r + q.r)}{(n.p + n.q)\ p.q}\to \frac{n.r}{n.p+p.q}-\frac{p.r+q.r}{p.q}$$

When I put it into Mathematica and use FullSimplify nothing happens though. For me it would be "simpler" to express this as a sum of "small" fractions.

I've tried using Apart but that also does nothing. Could anyone recommend a way for me to force Mathematica to simplify an expression like this?

share|improve this question
you have some mismatched parenthesis.. also it may help if you show what the expected simple form should be. (for the record I didnt't downvote..) – george2079 May 23 '14 at 20:23
I've added a simpler and clearer example, together with the expected simplification. Although this one is almost trivial to spot, it gets annoying in longer formulae! – Edward Hughes May 23 '14 at 21:05
Also could the downvoter explain how I can improve my post? I'm fairly active on other .SE sites, and as far as I'm aware it's poor etiquette to downvote without saying why! – Edward Hughes May 23 '14 at 21:06
Could you please post the actual MMA code? Also, not sure if my browser rendering is off, but your TeX looks strange. – Yves Klett May 23 '14 at 21:15
Always post actual Mathematica code/expressions in the form: "this is my input", "this is my expected output". It's not clear what all the dots mean in your expression and how you typed this into Mathematica. – Szabolcs May 23 '14 at 21:36
up vote 3 down vote accepted

let n=a[1] , r=a[2] , p=a[3] , q=a[4]:

term = (a[1]*a[2]*a[3]*
a[4] - (a[1]*a[3] + a[1]*a[4])*(a[3]*a[2] + a[4]*a[2]))/((a[1]*
a[3] + a[1]*a[4])*a[3]*a[4]);

Result is (Expand): $$-\frac{a(1) a(2)}{a(1) a(3)+a(1) a(4)}-\frac{a(1) a(4) a(2)}{a(3) (a(1) a(3)+a(1) a(4))}-\frac{a(1) a(3) a(2)}{a(4) (a(1) a(3)+a(1) a(4))}$$



you can use Rules to replace your own parameters.

share|improve this answer
Thank you - do you know why it doesn't just work directly with my variables? – Edward Hughes May 23 '14 at 21:40
i just don't!sometimes it's better to use these patterns if you have so many parameters.just a suggestion! – user3127040 May 23 '14 at 21:44

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.