Ask Your Question
0

Factorizing a polynomial with two variables

asked 2013-01-21 03:43:03 +0100

Sanchez gravatar image

updated 2013-01-21 03:46:43 +0100

Hi, I would like to factorize the following polynomial in $t$, with an integer indeterminate $n$,

$f_n(t) = 2^n ((n-1)t^n+1)^{n-1} - n^{n-1} t^{(n-1)(n-2)} (t^{n-1} + 1)(t+1)^{n-1}$

I expect it to have a factor of $(t-1)^2$ and hope that after division the polynomial in $t$ would have positive coefficients.

  1. Is there any way I can verify this by Sage?

  2. I have tried to check that $f_n(t)$ has a factor of $(t-1)^2$ by checking that $f_n(1) = f_n'(1) = 0$. I named my polynomial $f$, and let $h$ be f.derivative(t), and try to find $h(t=1)$. Here's what I got,

(n - 1)^22^nnn^(n - 2) - (n - 1)2^(n - 1)n^(n - 1) - 2(n - 1)2^(n - 2)n^(n - 1) - 2(n^2 - 3n + 2)2^(n - 1)n^(n - 1)

Which turns out to be 0 when I verify by hand. However it seems like Sage is unable to detect the redundance in the expression (e.g. $n \times n^{n-2} = n^{n-1}$). Did I do the computation in the "wrong way"? If so, what's the proper way to do it?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-01-21 03:55:08 +0100

ppurka gravatar image

Try to use full_simplify on the expression

sage: var('n')
n
sage: implicit_multiplication(True)
sage: F = (n - 1)^2 2^n n n^(n - 2) - (n - 1)2^(n - 1)n^(n - 1) - 2(n - 1)2^(n - 2)n^(n - 1) - 2(n^2 - 3n + 2)2^(n - 1)n^(n - 1)
sage: F.full_simplify()
0
edit flag offensive delete link more

Comments

Thanks! That settles my second question.

Sanchez gravatar imageSanchez ( 2013-01-21 04:21:24 +0100 )edit

For the first question, I think your method is correct. There can be some other methods, like looking at the factors of f(t) using `f.factor_list()`, or by looking manually at the output of `f(t)/(t-1)^2`, etc. But these are going to be slow and not always give results which are in their simplest form.

ppurka gravatar imageppurka ( 2013-01-21 10:31:32 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-01-21 03:43:03 +0100

Seen: 430 times

Last updated: Jan 21 '13