How can $$\frac{2x-1}{x+2}$$ be split to give $$A-\frac{B}{x+2}$$
where $A$ and $B$ are integers?
The solution is $$2-\frac{5}{x+2}.$$
How can $$\frac{2x-1}{x+2}$$ be split to give $$A-\frac{B}{x+2}$$
where $A$ and $B$ are integers?
The solution is $$2-\frac{5}{x+2}.$$
On
Imagine that you divide polynomials as usual numbers.
For example, let's divide $2x-1$ by $x+2$. Firstly, find the number such that if you multiply the divisor by it and substract from a dividend, you vanish the first term. Here $a=2$, because $2x-1 - 2(x+2) = -5$, which doesn't contain a term with $x$. -5 has the degree less than $x+2$, so we must stop. Then just take the result, which is 2, and write the expression: $2x-1=2(x+2) - 5$. Divide each part by $x+2$ and you'll get what you are looking for.
Try on the harder example: $\frac{4x^2 + 3x + 1}{x-1}$.
Find such monome that $4x^2+3x+1 - a(x-1)$ doesn't contain $x^2$. It's $4x$: $4x^2+3x+1 - 4x(x-1) = 7x + 1$.
Then find the next term such that $7x+1 - a(x-1)$ doesn't contain $x$. It is $7$:
$7x+1 - 7(x-1) = 8$.
The degree of $8$ is less than the degree of $x-1$, so stop. Now write the full expression:
$4x^2+3x+1 = (x - 1) (4x+7) + 8$
And divide it by $x-1$: $\frac{4x^2 + 3x + 1}{x-1} = 4x+7 + \frac{8}{x-1}$.
Everything works just the same way as the usual division of the numbers (https://en.wikipedia.org/wiki/Long_division), because numbers are polynomials with $x=10$.You can write this division the same way as you write numbers division.
This algorithm is extremely useful. For example, it is a standart way to find the integrals from functions like $\frac{f(x)}{g(x)}$, where $f(x)$ and $g(x)$ are polynomials.
Observe that if you set $$y=x+2,\quad x=y-2,$$ then you get $$ \frac{2x-1}{x+2}=\frac{2(y-2)-1}{y}=\frac{2y-5}{y}=2-\frac{5}{y}=2-\frac{5}{x+2} $$ as wanted.