Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I want to set work for my 17 year old calculus students and have access to Mathematica 7. I aim to create a worksheet with rational expressions which they will then decompose into partial fractions. The structure I want to use will rely on some partial fractions appearing on more than one question (i.e. some overlap)

So I want to speed the process of adding rational fractions...

1/(2x+7)- 3/(2x-7)

which I was hoping I could resolve in Mathematica into (-26 - 7 x)/(14 + 11 x + 2 x^2) without brackets in numerator or denominator.

But alas I have work to do in every case, albeit fairly trivial.

Instead, using Together[ ... ] it yields (-26 - 7 x)/((2 + x) (7 + 2 x))

ExpandAll[%] just splits it up again, though it (horribly) multiplies the brackets in the denominators into 14 + 11 x + 2 x^2.

Surely I can add two or more rational expressions into a fully expanded rational expression in decreasing powers of x?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You can use ExpandNumerator and ExpandDenominator in conjunction with Together.

ExpandDenominator@Together[1/(2 x + 7) - 4/(x + 2)]

(* (-26 - 7 x)/(14 + 11 x + 2 x^2) *)
share|improve this answer
    
Oops, I know - corrected in original now! I pasted a different result from my original Q! Thanks for the syntax/function info. –  Saxobob Jun 24 at 18:17
    
@Saxobob I edited your post to make the results consistent, as this little mistake is really irrelevant for the question (and for people who might read the question in the future). Please check that it's still fine! –  Szabolcs Jun 24 at 18:26
    
Thanks - still quite new to StackExchange. Is there some forum / FAQ that says what the community normally posts in comments? Is a "thanks" right here normal? Is it expected that OP soon chooses an "Answer" response? –  Saxobob Jun 24 at 18:40
    
This is the thread on thanks comments, comments are generally quite free, but it's better not to have a long discussion. You can also try the chatroom if you like (ask me here if it doesn't give you write access because of too little reputation score). About accepting answers: if the post really answers your question, then it's good to accept it. But even then you're always free to wait for other answers before accepting one. –  Szabolcs Jun 24 at 18:45

Your Answer

 
discard

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.