How do you find the indefinite integral of int (x^3-3x^2+4x-9)/(x^2+3)?

Nov 26, 2016

The answer is $= {x}^{2} / 2 - 3 x + \frac{1}{2} \ln \left({x}^{2} + 3\right) + C$

Explanation:

Let's perform the long division

$\textcolor{w h i t e}{a a a a}$${x}^{3} - 3 {x}^{2} + 4 x - 9$$\textcolor{w h i t e}{a a a a}$∣${x}^{2} + 3$

$\textcolor{w h i t e}{a a a a}$${x}^{3}$$\textcolor{w h i t e}{a a a a a a}$$+ 3 x$$\textcolor{w h i t e}{a a a a a a a a}$∣$x - 3$

$\textcolor{w h i t e}{a a a a a}$$0 - 3 {x}^{2} + x - 9$

$\textcolor{w h i t e}{a a a a a a a}$$- 3 {x}^{2} + x - 9$

$\textcolor{w h i t e}{a a a a a a a a a}$$- 0 + x + 0$

So,

$\frac{{x}^{3} - 3 {x}^{2} + 4 x - 9}{{x}^{2} + 3} = \left(x - 3\right) + \frac{x}{{x}^{2} + 3}$

$\int \frac{\left({x}^{3} - 3 {x}^{2} + 4 x - 9\right) \mathrm{dx}}{{x}^{2} + 3} = \int \left(x - 3\right) \mathrm{dx} + \int \frac{x \mathrm{dx}}{{x}^{2} + 3}$

$= {x}^{2} / 2 - 3 x + \frac{1}{2} \int \frac{2 x \mathrm{dx}}{{x}^{2} + 3}$

Let $u = {x}^{2} + 3$, $\mathrm{du} = 2 x \mathrm{dx}$

$\int \frac{2 x \mathrm{dx}}{{x}^{2} + 3} = \int \frac{\mathrm{du}}{u} = \ln u = \ln \left({x}^{2} + 3\right)$

$\int \frac{\left({x}^{3} - 3 {x}^{2} + 4 x - 9\right) \mathrm{dx}}{{x}^{2} + 3} = {x}^{2} / 2 - 3 x + \frac{1}{2} \ln \left({x}^{2} + 3\right) + C$