# What is int (-2x^3-x^2+x+2 ) / (2x^2- x +3 )?

Jan 7, 2018

$- \frac{1}{2} {x}^{2} - x + \frac{3}{4} \ln \left(2 {x}^{2} - x + 3\right) + \frac{\sqrt{23}}{2} \arctan \left(\frac{4 x - 1}{\sqrt{23}}\right)$

#### Explanation:

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

$= \int \frac{- 2 {x}^{3} + {x}^{2} - 3 x}{2 {x}^{2} - x + 3} + \frac{- 2 {x}^{2} + 4 x + 2}{2 {x}^{2} - x + 3} \mathrm{dx}$
(separate numerator)

$= \int - x + \frac{- 2 {x}^{2} + x - 3}{2 {x}^{2} - x + 3} + \frac{3 x + 5}{2 {x}^{2} - x + 3} \mathrm{dx}$ (factor out $2 {x}^{2} - x + 3$ from 1st fraction and separate second fraction so the numerator will divide evenly by the denominator)

$= - \frac{1}{2} {x}^{2} + \int - 1 + \frac{3 x - \frac{3}{4}}{2 {x}^{2} - x + 3} + \frac{\frac{23}{4}}{2 {x}^{2} - x + 3} \mathrm{dx}$ (integrate $- x$ with reverse power rule, factor out $2 {x}^{2} - x + 3$ from 1st fraction, and separate second fraction. you don't need to write +C yet because another +C will be created from integrating the rest of the expression)

$= - \frac{1}{2} {x}^{2} - x + \int \frac{3}{4} \left(\frac{4 x - 1}{2 {x}^{2} - x + 3}\right) + \frac{\frac{23}{4}}{{\left(\sqrt{2} x - \frac{\sqrt{2}}{4}\right)}^{2} + \frac{23}{8}} \mathrm{dx}$ (integrate $- 1$ and rewrite the fractions so it will be easier to integrate to $\ln \left(f \left(x\right)\right)$ and $\arctan \left(f \left(x\right)\right)$)

$= - \frac{1}{2} {x}^{2} - x + \frac{3}{4} \ln | 2 {x}^{2} - x + 3 | + \int \frac{\frac{23}{4}}{{\left(\sqrt{2} x - \frac{\sqrt{2}}{4}\right)}^{2} + \frac{23}{8}} \mathrm{dx}$ (integrate the first fraction using $\int \frac{f ' \left(x\right)}{f} \left(x\right) \mathrm{dx} = \ln \left(f \left(x\right)\right)$

$= - \frac{1}{2} {x}^{2} - x + \frac{3}{4} \ln \left(2 {x}^{2} - x + 3\right) + \frac{23}{4} \cdot \frac{1}{\sqrt{2}} \int \frac{\sqrt{2}}{{\left(\sqrt{2} x - \frac{\sqrt{2}}{4}\right)}^{2} + {\left(\sqrt{\frac{23}{8}}\right)}^{2}} \mathrm{dx}$ (change coefficients to prepare for integration to $\arctan \left(f \left(x\right)\right)$ and change absolute value to parentheses because $2 {x}^{2} - x + 3$ is always positive)#

$= - \frac{1}{2} {x}^{2} - x + \frac{3}{4} \ln \left(2 {x}^{2} - x + 3\right) + \frac{\frac{23}{4}}{\sqrt{2 \cdot \frac{23}{8}}} \arctan \left(\frac{\sqrt{2} x - \frac{\sqrt{2}}{4}}{\sqrt{\frac{23}{8}}}\right) + C$ (integrate the fraction using $\int \frac{f ' \left(x\right)}{{\left(f \left(x\right)\right)}^{2} + {a}^{2}} \mathrm{dx} = \frac{1}{a} \arctan \left(f \frac{x}{a}\right) + C$ where a is a constant)

$= - \frac{1}{2} {x}^{2} - x + \frac{3}{4} \ln \left(2 {x}^{2} - x + 3\right) + \frac{\frac{23}{4}}{\sqrt{\frac{23}{4}}} \arctan \left(\frac{\sqrt{2 \cdot 8} x - \frac{\sqrt{2 \cdot 8}}{4}}{\sqrt{23}}\right)$ (simplify)

$= - \frac{1}{2} {x}^{2} - x + \frac{3}{4} \ln \left(2 {x}^{2} - x + 3\right) + \sqrt{\frac{23}{4}} \arctan \left(\frac{4 x - 1}{\sqrt{23}}\right)$

$= - \frac{1}{2} {x}^{2} - x + \frac{3}{4} \ln \left(2 {x}^{2} - x + 3\right) + \frac{\sqrt{23}}{2} \arctan \left(\frac{4 x - 1}{\sqrt{23}}\right)$