2
$\begingroup$

My problem is that I have two functions in two variables, say $x$ and $y$. The functions are both polynomials in $x$, but sometimes $y$ appears in an exponent. What I want to do is find the gcd of these functions as if they are viewed as polynomials in $x$. However, when I use the gcd command it says it can not do it because the arguments must be polynomials. I have tried redefining the functions as just functions in $x$ (i.e. $h(x)$ $= f(x,y))$, but it still does not work. So is there anyway for me to get Maple to look at these functions as polynomials in $x$ and thus find the gcd? Or is there some other way I could do this?

Edit:

The polynomials I am working with a little complicated but here they are in general:

First, we define:

$$a(i,x,y) = (-1)^i(\binom{2y-1}{i-1}x^y+ \binom{2y-1}{i})$$

Now, our set of polynomials are:

$$f(i,x,y) = \binom{2y}{i-1} + \sum_{j=1}^{y}\binom{2y-j}{i-1}a(j,x,y) + \sum_{j=1}^{y-1}\binom{y-j}{i-1}a(y-j,x,y)x^j+\binom{0}{i-1}x^y$$

Where we use the convention $\binom{n}{k} =0$ if $k > n$.

What I am interested in determining is the gcd of $f(1,x,y)$ and $f(2,x,y)$. But Maple does not view them as polynomials as $y$ appears in the exponent, as stated above.

$\endgroup$
  • $\begingroup$ Have you tried putting in some specific values for $y$ to see how the gcd changes? $\endgroup$ – abiessu Jul 23 '13 at 15:51
  • $\begingroup$ I have tried all integer values of y up to 500 and I always get the same gcd, which is what I expected. I just want to now show that that is the case all the time. $\endgroup$ – user85140 Jul 23 '13 at 16:09
1
$\begingroup$

How are you passing the info?

From the help:

gcd(a, b, 'cofa', 'cofb')

The optional third argument cofa is assigned the cofactor a/gcd(a, b).

The optional fourth argument cofb is assigned the cofactor b/gcd(a, b).

Examples:

gcd(x^2-y^2,x^3-y^3,c,d);
                            -y+x
c;
                            x + y
d;
                         2          2
                        x  + x y + y
$\endgroup$
  • $\begingroup$ The problem is that Maple isn't recognizing the function as polynomial since it has y in the exponent. However it is a polynomial in x, so I want to try and just find the gcd as a polynomial in x. $\endgroup$ – user85140 Jul 23 '13 at 16:12
  • $\begingroup$ Please, post here your pols. $\endgroup$ – Sigur Jul 23 '13 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.