How to factor the quadratic polynomial $2x^2-5xy-y^2$?

How do I factor this polynomial: $2x^2-5xy-y^2$ ?

-
Do you know how to factor $2x^2 - 5x - 1$? – TonyK May 25 '12 at 21:29
It doesn't have an iteger factorization. The only candidates are (2x+y)(x-y) and (2x-y)(x+y) but the first expands to 2x^2-xy-y^2 and the second to 2x^2+xy-y^2. – Michael Chernick May 25 '12 at 21:32
@TonyK i tried, but it didnt work.. :( – DrStrangeLove May 25 '12 at 21:33
Are you sure there is no typo? Perhaps one of the following was intended. $$2x^2 -xy-y^2\ =\ (x-y)(2x+y)$$ $$2x^2 -5xy-3y^2\ =\ (x-3y)(2x+y)$$ $$2x^2 -5xy+2y^2\ =\ (x-2y)(2x-y)$$ $$2x^2 -5xy+3y^2\ =\ (x-y)(2x-3y)$$ – Bill Dubuque May 25 '12 at 22:21
Two possible factorizations are $$\begin{eqnarray*} 2x^{2}-5xy-y^{2} &=&2\left( x-\frac{5+\sqrt{33}}{4}y\right) \left( x-\frac{5- \sqrt{33}}{4}y\right) \\ &=&-\left( y+\frac{5-\sqrt{33}}{2}x\right) \left( y+\frac{5+\sqrt{33}}{2} x\right) \end{eqnarray*}$$ – Américo Tavares Aug 31 '12 at 18:46

EDIT: Your example cannot be factored over the integers, because $25 + 8 = 33$ is not a perfect square. That is, taking $$a x^2 + b x y + c y^2 = 2 x^2 - 5 x y - y^2,$$ we get $$a = 2, \; b = -5, \; c = -1, \; \Delta = b^2 - 4 a c = (-5)^2 - 4 \cdot 2 \cdot (-1)= 25 + 8 = 33,$$ and $33$ is nonnegative but is not a square.

ORIGINAL: Either the one-variable function $$a x^2 + b x + c$$ or the quadratic form $$a x^2 + b x y + c y^2,$$ with integers $a,b,c,$ factor over the rational numbers if and only if the discriminant $$\Delta = b^2 - 4 a c$$ is a square.

You are familiar with this because of the quadratic formula $$\frac{-b \pm \sqrt \Delta}{2a}$$ which gives the roots $x$ for $a x^2 + b x + c =0.$

Only a little changes when inserting the letter $y,$ giving $a x^2 + b x y + c y^2.$ First, if both $a,c$ are $0,$ then we have $bxy$ which is already factored. So, let me show the traditional case, when $a \neq 0.$ Also let $$\Delta = \delta^2,$$ say with integer $\delta \geq 0.$

$$a x^2 + b x y + c y^2 = \frac{1}{4a} \left( 4 a^2 x^2 + 4 a b x y + 4 a c y^2 \right)$$ $$= \frac{1}{4a} \left( 4 a^2 x^2 + 4 a b x y + b^2 y^2 - b^2 y^2 + 4 a c y^2 \right)$$ $$= \frac{1}{4a} \left( 4 a^2 x^2 + 4 a b x y + b^2 y^2 - (b^2 y^2 - 4 a c y^2) \right)$$ $$= \frac{1}{4a} \left( 4 a^2 x^2 + 4 a b x y + b^2 y^2 - (b^2 - 4 a c ) y^2 \right)$$ $$= \frac{1}{4a} \left( 4 a^2 x^2 + 4 a b x y + b^2 y^2 - \Delta y^2 \right)$$ $$= \frac{1}{4a} \left( (2ax+by)^2 - \Delta y^2 \right)$$ $$= \frac{1}{4a} \left( (2ax+by)^2 - \delta^2 y^2 \right)$$ $$= \frac{1}{4a} \left( \; (2ax+by + \delta y) \; (2ax+by - \delta y) \; \right)$$ $$= \frac{1}{4a} \left( \; (2ax+ (b + \delta) y) \; (2ax+ (b - \delta) y) \; \right)$$ Now, either $b,\delta$ are both even or both odd. Either way, we may absorb a factor of $4$ into $$= \frac{1}{a} \left( \; (ax+ \frac{(b + \delta)}{2} y) \; (ax+ \frac{(b - \delta)}{2} y) \; \right)$$ Finally, since $$\frac{(b + \delta)}{2} \frac{(b - \delta)}{2} = \frac{b^2 - \Delta}{4} = ac$$ is divisible by $a,$ by unique factorization we may write $$a = a_1 a_2$$ with $a_1$ dividing the first fraction and $a_2$ the second, thus finally getting $$a x^2 + b x y + c y^2 = \; \left(a_2x+ \left( \frac{b + \delta}{2a_1} \right) y \right) \; \; \left(a_1x+ \left( \frac{b - \delta}{2a_2} \right) y \right) \;$$ in integers.

NOTE, October 3, 2013: we may simply take $$a_1 = \gcd \left( a, \frac{(b + \delta)}{2} \right) ; \; \; \; \; \; a_2 = \frac{a}{a_1}$$ without paying attention to any prime factorizations.

-
why is $25+8=33$ important, ie. why did you say that? – yiyi Aug 31 '12 at 14:10
@MaoYiyi, $$a = 2, \; b = -5, \; c = -1, \; \Delta = b^2 - 4 a c = (-5)^2 - 4 \cdot 2 \cdot (-1)= 25 + 8 = 33$$ – Will Jagy Aug 31 '12 at 17:17

How would you factor it if the $y$ weren't there? Just drop the $y$s from the relevant terms to get $2x^2-5x-1$, factor that into the form $2(x-a)(x+b)$, then you'll readjoin the $y$ to get $2(x-ay)(x+by)$. You'll find it gives just what you wanted.

Edit: As Michael points out, $a,b$ will not be integers. The quadratic formula will let you find the zeroes of $2x^2-5x-1$, and you can use that to factor.

-

To explain how you get from your polynomial to a more traditional quadratic equation: pull out a factor of $y^2$ to get $y^2\cdot\left(2\frac{x^2}{y^2}-5\frac{xy}{y^2}-\frac{y^2}{y^2}\right)$, or equivalently $y^2\cdot\left(2\frac{x^2}{y^2}-5\frac{x}{y}-1\right)$. Now, setting $t=\frac{x}{y}$, the latter is obviously $y^2\cdot\left(2t^2-5t-1\right)$. The quadratic can be broken up into two factors by solving the quadratic equation as other answers have mentioned: $2t^2-5t-1 = (at+b)(ct+d)$. Then plugging this expression back in, we get the original function as $y^2\cdot(at+b)(ct+d)$, or $\left(y\cdot(at+b)\right)\left(y\cdot(ct+d)\right)$; plugging in $x/y$ for $t$ and multiplying through by the factors of $y$ then gives the factorization as $(ax+by)(cx+dy)$.

-

Consider $2x^2-5xy-y^2=0$.Solving this quadratic equation for $x$ gives $x= \frac{5y+\sqrt{33}y}{4},\frac{5y-\sqrt{33}y}{4}$.Let $\frac{5+\sqrt{33}}{4}=\alpha$ and $\frac{5-\sqrt{33}}{4}=\beta$. Thus, factorization of given polynomial is $2(x-\alpha y)(x-\beta y)$.

-