Suppose we have the integral $$\int \! \frac{ x+3}{ x^2+4x+5} \, \mathrm d x$$
How can we break in two other integrals?
Wolfram gives the answer:
$${2x+4\over2\cdot(x^2+4x+5)} + {1\over x^2+4x+5}$$
but it does not explain how it did it.
Suppose we have the integral $$\int \! \frac{ x+3}{ x^2+4x+5} \, \mathrm d x$$
How can we break in two other integrals?
Wolfram gives the answer:
$${2x+4\over2\cdot(x^2+4x+5)} + {1\over x^2+4x+5}$$
but it does not explain how it did it.
On
HINT:
Notice $$\frac{x+3}{x^2+4x+5}$$$$=\frac{M\frac{d}{dx}(x^2+4x +5)+N}{x^2+4x+5}=\frac{M(2x+4) +N}{x^2+4x+5}$$ By comparison of numerators, we get $$x+3=M(2x+4)+N$$ by comparing the corresponding coefficients, you will get $M=\frac{1}{2}$ & $N=1$
On
The roots $\xi_1,\xi_2$ of $x^2+4x+5$ lie at $-2\pm i$. We have: $$\text{Res}\left(\frac{x+3}{x^2+4x+5},x=\xi_i\right) = \lim_{x\to \xi_i}\frac{(x+3)(x-\xi_i)}{(x-\xi_1)(x-\xi_2)}=\frac{\xi_i+3}{\xi_i-\xi_{3-i}}\tag{1}$$ hence the partial fraction decomposition of the given function is: $$f(x)=\frac{x+3}{x^2+4x+5}=\frac{1}{2}\left(\frac{1+i}{x+2+i}+\frac{1-i}{x+2-i}\right)\tag{2}$$ and its primitive is given by: $$ F(x)=\frac{1}{2}\left[(1+i)\log(x+2+i)+(1-i)\log(x+2-i)\right]\tag{3} $$ that simplifies to: $$ F(x) = \arctan(x+2)+\frac{1}{2}\,\log(x^2+4x+5).\tag{4}$$
Hints:
In order to integrate $$\frac{x+3}{x^2+4x+5},$$
you would like to see $$(x^2+4x+5)'=2x+4$$ at the numerator.
You solve this by finding coefficients such that
$$x+3=a(2x+4)+b,$$ i.e. by identification $$2a=1,\\4a+b=3.$$
Then the first term of the integral, of the form $\dfrac{p'(x)}{p(x)}$, becomes easy. The second, of the form $\dfrac1{p(x)}$, can be related to the derivative of the $\arctan(t)$, namely $\dfrac1{t^2+1}$, by a linear substitution.