# Partial fractions

#### Petrus

##### Well-known member
Hello MHB,
I got stuck on this integrate
$$\displaystyle \int_0^{\infty}\frac{2x-4}{(x^2+1)(2x+1)}$$
and my progress
$$\displaystyle \int_0^{\infty} \frac{2x-4}{(x^2+1)(2x+1)} = \frac{ax+b}{x^2+1}+ \frac{c}{2x+1}$$
then I get these equation that I can't solve
and I get these equation..
$$\displaystyle 2a+c=0$$ that is for $$\displaystyle x^2$$
$$\displaystyle 2b+a=2$$ that is for $$\displaystyle x$$
$$\displaystyle b+c=-4$$ that is for $$\displaystyle x^0$$
What have I done wrong?

Regards,
$$\displaystyle |\pi\rangle$$

#### MarkFL

Staff member
Re: partial fractions

The only thing I see wrong (besides omitting the differential from your original integral) is the line:

$$\displaystyle \int_0^{\infty} \frac{2x-4}{(x^2+1)(2x+1)} = \frac{ax+b}{x^2+1}+ \frac{c}{2x+1}$$
You should simply write:

$$\displaystyle \frac{2x-4}{(x^2+1)(2x+1)} = \frac{ax+b}{x^2+1}+ \frac{c}{2x+1}$$

You have correctly determined the resulting linear system of equations. Can you choose and use a method with which to solve it?

#### Petrus

##### Well-known member
Re: partial fractions

The only thing I see wrong (besides omitting the differential from your original integral) is the line:

You should simply write:

$$\displaystyle \frac{2x-4}{(x^2+1)(2x+1)} = \frac{ax+b}{x^2+1}+ \frac{c}{2x+1}$$

You have correctly determined the resulting linear system of equations. Can you choose and use a method with which to solve it?
Thanks for pointing that! I have actually no clue how to solve it, I don't know what method I should use.

Regards,
$$\displaystyle |\pi\rangle$$

#### MarkFL

Staff member
Re: partial fractions

My choice would be elimination. Try subtracting the third equation from the first, and this will eliminate $c$, then combine this result with the second equation and you have a 2X2 system in $a$ and $b$. Can you state this system?

#### Petrus

##### Well-known member
Re: partial fractions

My choice would be elimination. Try subtracting the third equation from the first, and this will eliminate $c$, then combine this result with the second equation and you have a 2X2 system in $a$ and $b$. Can you state this system?
I made it like a matrice and solved it Thanks for the help and sorry for not posting the progress but now I get $$\displaystyle b=0, c=-4, a=2$$ and that works fine when I put those value in the equation!

Regards,
$$\displaystyle |\pi\rangle$$

#### MarkFL

Staff member
Re: partial fractions

Any valid method you choose is fine. Your solution is correct and now integration is a breeze.

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
Re: partial fractions

$$\displaystyle 2x-4 = (ax+b)(2x+1)+c(x^2+1)$$

Try the following method to find the constants

First Let $x = -{1 \over 2}$ then you can easily find $c$

Second Let $x =0$ you can find $b$ since you are given $c$

Finally find $a$ given $b$ and $c$ .

##### Active member
Re: partial fractions

The only thing I see wrong (besides omitting the differential from your original integral) is the line:

You should simply write:

$$\displaystyle \frac{2x-4}{(x^2+1)(2x+1)} = \frac{ax+b}{x^2+1}+ \frac{c}{2x+1}$$

You have correctly determined the resulting linear system of equations. Can you choose and use a method with which to solve it?
Here's a fancy little trick (more commonly used in complex analysis; similar to Zaid's) to get through these sorts of problems. Rather than solving a system of equations, one can simply "plug in some numbers" to get to the answer.

Let's begin at the point where we know that

$$\displaystyle \frac{2x-4}{(x^2+1)(2x+1)} = \frac{ax+b}{x^2+1}+ \frac{c}{2x+1}$$

First of all, multiplying both sides by $$\displaystyle 2x+1$$, we have

$$\displaystyle \frac{2x-4}{(x^2+1)} = (2x+1)\frac{ax+b}{x^2+1}+ c$$

Now, having multiplied by our choice of term in the denominator, we plug in a value of x that makes this term zero. $$\displaystyle 2x+1=0$$ when $$\displaystyle x=-\frac{1}{2}$$, so plug in that value. The first term on the right becomes zero after multiplying, leaving you with:

$$\displaystyle \frac{2(-\frac{1}{2})-4}{((-\frac{1}{2})^2+1)} = c$$

simply plug in to find the answer (c = 4).
We can do something similar with $$\displaystyle x^2+1$$. First of all, multiply both sides to get

$$\displaystyle \frac{2x-4}{2x+1} = ax+b+ (x^2+1)\frac{c}{2x+1}$$

Now, we plug in a value of x that makes this term become zero. In this case, we note that $$\displaystyle x^2+1=0$$ when $$\displaystyle x=\pm i$$. Choosing $$\displaystyle x=i$$ and noting that the second term on the right multiplies to zero, this becomes

$$\displaystyle \frac{2i-4}{2i+1} = b + a i$$

Which, after some complex-number algebra, gives you a real and imaginary part corresponding to b and a. That is, the above evaluates to $$\displaystyle 0 + 2i$$, telling you that a = 2 and b = 0.

This method is particularly useful when you only want to find a particular term without solving for the rest. Note that this method does not work for irreducible terms in the denominator taken to powers greater than 1; that requires a more subtle approach.