# Determining which values to use in place of x in functions

When solving partial fractions for integrations, solving x for two terms usually isn't all that difficult, but I've been running into problems with three term integration.

For example, given

$$\int\frac{x^2+3x-4}{x^3-4x^2+4x}$$

The denominator factored out to $x(x-2)^2$, which resulted in the following formulas

\begin{align*} x^2+3x-4=\frac{A}{x}+\frac{B}{x-2}+\frac{C}{(x-2)^2}\\ x^2+3x-4= A(x-2)(x-2)^2+Bx(x-2)^2+Cx(x-2)\\ x^2+3x-4= A(x-2)^2+Bx(x-2)+Cx\\\\ \text{when x=0, }A=-1 \text{ and x=2, }C=3 \end{align*}

This is where I get stuck, since nothing immediately pops out at me for values that would solve A and C for zero and leave some value for B. How do I find the x-value for a constant that is not immediately apparent?

-
One way is to pick $x$ anything but $0$ or $2$, evaluate the left, right in the next to last displayed line. You know $A$ and $C$, so now you will know $B$. There is a typo in third to last displayed line, but it was fixed in the next line. There are other ways, like differentiate each side of next to last displayed line, then substitute $x=2$. – André Nicolas Aug 12 '11 at 19:10
I had gone too quickly, had not noticed that in your first displayed line, the denominator is missing from the left-hand side. Am beginning to be concerned you may not understand the reasoning. – André Nicolas Aug 12 '11 at 19:15
@Jason: The first line in your second dispaly is incorrect as written; the left hand side should be a rational function, not a polynomial. Please be aware of what it is you are trying to do; if you are simply thinking of this as pushing symbols that lack meaning around, you will have a very hard time solving these problems. – Arturo Magidin Aug 12 '11 at 21:29
You should have $$\frac{x^2+3x-4}{x^3-4x^2+4x}=\frac{A}{x}+\frac{B}{x-2}+\frac{C}{(x-2)^2}$$ – Américo Tavares Aug 12 '11 at 21:57
– Arturo Magidin Aug 12 '11 at 22:06

To find the constants in the rational fraction $$\frac{x^2+3x-4}{x^3-4x^2+4x}=\frac{A}{x}+\frac{B}{x-2}+\frac{C}{(x-2)^2},$$

you may use any set of 3 values of $x$, provided that the denominator $x^3-4x^2+4x\ne 0$.

The "standard" method is to compare the coefficients of $$\frac{x^2+3x-4}{x^3-4x^2+4x}=\frac{A}{x}+\frac{B}{x-2}+\frac{C}{(x-2)^2},$$ after multiplying this rational fraction by the denominator $x^3-4x^2+4x=x(x-2)^2$ and solve the resulting linear system in $A,B,C$. Since

$$\begin{eqnarray*} \frac{x^{2}+3x-4}{x\left( x-2\right) ^{2}} &=&\frac{A}{x}+\frac{B}{x-2}+% \frac{C}{\left( x-2\right) ^{2}} \\ &=&\frac{A\left( x-2\right) ^{2}}{x\left( x-2\right) ^{2}}+\frac{Bx\left( x-2\right) }{x\left( x-2\right) ^{2}}+\frac{Cx}{x\left( x-2\right) ^{2}} \\ &=&\frac{A\left( x-2\right) ^{2}+Bx\left( x-2\right) +Cx}{x\left( x-2\right) ^{2}} \\ &=&\frac{\left( A+B\right) x^{2}+\left( -4A-2B+C\right) x+4A}{x\left( x-2\right) ^{2}}, \end{eqnarray*}$$

if we equate the coefficients of the plynomials

$$x^{2}+3x-4\equiv\left( A+B\right) x^{2}+\left( -4A-2B+C\right) x+4A,$$

we have the system

$$\begin{eqnarray*} A+B &=&1 \\ -4A-2B+C &=&3 \\ 4A &=&-4, \end{eqnarray*}$$

whose solution is

$$\begin{eqnarray*} B &=&2 \\ C &=&3 \\ A &=&-1. \end{eqnarray*}$$

Alternatively you could use the method indicated in parts A and B, as an example.

A. We can multiply $f(x)$ by $x=x-0$ and $\left( x-2\right) ^{2}$ and let $% x\rightarrow 0$ and $x\rightarrow 2$. Since $$\begin{eqnarray*} f(x) &=&\frac{P(x)}{Q(x)}=\frac{x^{2}+3x-4}{x^{3}-4x^{2}+4x} \\ &=&\frac{x^{2}+3x-4}{x\left( x-2\right) ^{2}} \\ &=&\frac{A}{x}+\frac{B}{x-2}+\frac{C}{\left( x-2\right) ^{2}},\qquad (\ast ) \end{eqnarray*}$$ if we multiply $f(x)$ by $x$ and let $x\rightarrow 0$, we find $A$: $$A=\lim_{x\rightarrow 0}xf(x)=\lim_{x\rightarrow 0}\frac{x^{2}+3x-4}{\left( x-2\right) ^{2}}=\frac{-4}{4}=-1.$$ And we find $C$, if we multiply $f(x)$ by $\left( x-2\right) ^{2}$ and let $x\rightarrow 2$: $$C=\lim_{x\rightarrow 2}\left( x-2\right) ^{2}f(x)=\lim_{x\rightarrow 2}\frac{% x^{2}+3x-4}{x}=\frac{2^{2}+6-4}{2}=3.$$ B. Now observing that $$P(x)=x^{2}+3x-4=\left( x+4\right) \left( x-1\right)$$ we can find $B$ by making $x=1$ and evaluate $f(1)$ in both sides of $(\ast)$, with $A=-1,C=3$: $$f(1)=0=2-B.$$ So $B=2$. Or we could make $x=-4$ in $(\ast)$ $$f(-4)=0=\frac{1}{3}-\frac{1}{6}B.$$ We do obtain $B=2$.

Thus $$\frac{x^{2}+3x-4}{x\left( x-2\right) ^{2}}=-\frac{1}{x}+\frac{2}{x-2}+\frac{3% }{\left( x-2\right) ^{2}}\qquad (\ast \ast )$$

Remark: If the denominator has complex roots, then an expansion as above is not possible. For instance

$$\frac{x+2}{x^{3}-1}=\frac{x+2}{(x-1)(x^{2}+x+1)}=\frac{A}{x-1}+\frac{Bx+C}{% x^{2}+x+1}.$$

You should find $A=1,B=C=-1$:

$$\frac{x+2}{x^{3}-1}=\frac{1}{x-1}-\frac{x+1}{x^{2}+x+1}.$$

-

The point of these equations involving $A$, $B$, $C$, and $x$ is that there are unique values of $A$, $B$, and $C$ that make the decomposition work, but they are supposed to be valid for every value of $x$. In particular, they should be true when $x = 0$ and $x = 2$. These values happen to be convenient because they cause all but one of the unknowns to vanish, thus allowing you to easily solve for the remaining unknown. Once you know $A$ and $C$, however, your equation looks like

\begin{align*} x^2 + 3x - 4 = -(x-2)^2 + Bx(x-2) + 3x, \end{align*}

since $A = -1$ and $C = 3$ are the unique solutions. I re-emphasize that they do not depend on the choice of $x$; we just chose convenient values for $x$ to help us discover $A$ and $C$.

To finish, we can just use any value for $x$, leaving $B$ as the only unknown. I'll choose $x = 1$, simply because I'm not very imaginative:

\begin{align*} 1^2 + 3 \cdot 1 - 4 &= -(1 - 2)^2 + B \cdot 1 (1 - 2) + 3 \cdot 1\\ 0 &= -B + 2\\ B &= 2. \end{align*}

-

Mr. Nicolas is correct. There is no need to find a substitution for x that leaves B by itself. As long as there are two known answers picking any different number for the last substitution and solving will give you the answer for the last unknown. This also works for the other types of partial fractions as well.

-
(i) I think we do not ordinarily use titles here; (ii) Nicolas is a middle name. (iii) Doing the detail, that is, choosing a convenient $x$, briefly saying why it is convenient, and completing the calculation might help the OP, particularly if he has incomplete control of the idea. – André Nicolas Aug 12 '11 at 19:27