Partial fractions, disagreement with Wolfram Alpha On my math homework, I have this problem, and WolframAlpha says that $A=-\frac{1}{7}$ and $B=\frac{1}{7}$. However, while solving the problem on my own, I found a restriction that $A \neq -B$. How is it that this answer works? The problem in question is:
$$\dfrac{1}{x^2 - 3 x - 10} = \dfrac{A}{x+2} + \dfrac{B}{x - 5}$$
 A: Here's the full derivation: $$\frac{1}{x^2-3x-10}=\frac{A}{x+2}+\frac{B}{x-5}\implies$$ $$(x+2)(x-5)\left(\frac{1}{x^2-3x-10}\right)=(x+2)(x-5)\left(\frac{A}{x+2}+\frac{B}{x-5}\right)\implies$$ $$1=A(x-5)+B(x+2)=A(x)-5A+B(x)+2B=x(A+B)+1(2B-5A)$$
Hence we need $A+B=0\space\text{and}\space2B-5A=1$. So substitute $A=-B$ into the second equation: $$2B-5(-B)=1\implies7B=1\implies B=\frac{1}{7}$$
But we have the condition that $A+B=0$ and we know $B=\frac{1}{7},$ hence $$A+\frac{1}{7}=0\implies A=-\frac{1}{7}$$ Thus $$\frac{1}{x^2-3x-10}=\frac{A}{x+2}+\frac{B}{x-5}=\frac{1}{7(x-5)}-\frac{1}{7(x+2)}$$
A: To find $A$ and $B$:
Note that
$(x + 2)(x - 5) = x^2 -3x - 10; \tag 1$
then from
$\dfrac{1}{x^2 -3x - 10} = \dfrac{A}{x + 2} + \dfrac{B}{x - 5} \tag 2$
we have
$A(x - 5) + B(x + 2) = \dfrac{(x + 2)(x - 5)}{x^2 -3x - 10} = 1; \tag 3$
this may be written
$(A + B)x + (2B - 5A) = 1, \tag 4$
whence
$A + B = 0 \Longrightarrow B = -A, \tag 5$
so that
$-7A = 2(-A) - 5A = 2B -5A = 1 \Longrightarrow A = -\dfrac{1}{7}, \; B = \dfrac{1}{7}; \tag 6$
we check:
$\dfrac{A}{x + 2} + \dfrac{B}{x - 5} = -\dfrac{1}{7}\dfrac{1}{x + 2} + \dfrac{1}{7}\dfrac{1}{x - 5} = \dfrac{1}{7} \left ( \dfrac{1}{x - 5} - \dfrac{1}{x + 2} \right )$
$= \dfrac{1}{7}\left ( \dfrac{x + 2}{x^2 -3x - 10} - \dfrac{x - 5}{x^2 -3x - 10} \right ) = \dfrac{1}{7}\dfrac{7}{x^2 -3x - 10} = \dfrac{1}{x^2 -3x - 10}. \tag 7$
A: When you "solved for $x$," I presume you got something like $$(A+B)x=5A-2B+1$$ and then said, now we must divide both sides by $A+B$, but that's only allowed if $A+B\ne0$. But in fact the displayed equation is not meant to be solved for $x$; it's meant to hold for all values of $x$. The only way that can happen is for both $A+B$ and $5A-2B+1$ to be zero. That leads, as in the other answers that have been posted, to what Wolfram gave you. 
Now, you ask, "How is it that this answer works?" Well, it's very easy to see how it works: you just work out $${-1/7\over x+2}+{1/7\over x-5}$$ and see that you get $1/(x^2-3x-10)$. 
