Hello,
the following code prints

     *21**(x^2 + 2*x)/(28*x^2 - 3*x - 40)

but I would simply like to have

     (21*x^2 + 42*x)/(28*x^2 - 3*x - 40)

Can I acheive this ?

Best regards.
C.

=== CODE ===

param = []

for i in range(8):
    param.append(randint(-10,10))

num(x) = (param[0]*x - param[1])*(param[2]*x - param[3])
den(x) = (param[4]*x - param[5])*(param[6]*x - param[7])

num = num.expand()
den = den.expand()

f(x) = num(x) / den(x)

print(f(x))

=== OUTPUT ===

21*(x^2 + 2*x)/(28*x^2 - 3*x - 40)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to