# How to represent complex expression as f(x)/g(x) in which f(x) and g(x) are both polynomial expression [closed]

I have some complex expression like this F[x] = x*x/(1-x^2)*x/(1-x/(1-x)), I want to represent F[x] in the form of f(x)/g(x) in which both f(x), g(x) are normal polynomial expressions. In the above example we have F[x] = (x^3-x^4)/((1-2x)*1-x^2)

And, after that I want to do the polynomial division if the degree of f(x) is bigger that g(x). Is mathematica able to do that?

Thanks,

-
@Loi.Luu The answer is "Yes" –  Alexei Boulbitch Aug 26 '13 at 7:30
Thank you guys :) –  Loi.Luu Aug 26 '13 at 7:41
You should take a look at Together[F[x]] and Together[F[x]] // ExpandAll, sometimes Apart[F[x]] might be better for your needs. Define F this way F[x_] := x*x/(1 - x^2)*x/(1 - x/(1 - x)). –  Artes Aug 26 '13 at 9:45
A search for in the Cocumentation Center for 'common denominator' (no quotes) turns up Togetehr as the second hit. Searching for 'polynomial division' likewise shows relevant hits at the top. This really is a case of simple documentation checking. –  Daniel Lichtblau Aug 26 '13 at 18:29

## closed as off-topic by Artes, Yves Klett, halirutan, Sjoerd C. de Vries, m_goldbergAug 27 '13 at 21:25

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Artes, Yves Klett, halirutan, Sjoerd C. de Vries, m_goldberg
If this question can be reworded to fit the rules in the help center, please edit the question.

p = x*x/(1 - x^2)*x/(1 - x/(1 - x));
p = Simplify[p]


num = Numerator[p];
PolynomialQ[num, x]


den = Denominator[p];
PolynomialQ[den, x]


If[Exponent[num, x] >= Exponent[den, x],
PolynomialQuotient[num, den, x]
]


PolynomialRemainder[num, den, x]


-
Awesome, thank you @Nasser –  Loi.Luu Aug 26 '13 at 7:40