Is $(x^2 + 1) / (x^2-5x+6)$ divisible? I'm learning single variable calculus right now and at current about integration with partial fraction. I'm stuck in a problem from few hours given in my book. The question is to integrate $$\frac{x^2 + 1}{x^2-5x+6}.$$
I know it is improper rational function and to make it proper rational fraction we have to divide
$$\frac{x^2 + 1}{x^2-5x+6}$$
I'm trying from sometime but couldn't find the right solution. 
 Please help! Thank you in advance.  
 A: You can use long division. Another way is as follows:
\begin{align*}
\frac{x^2+1}{x^2-5x+6}&=\frac{(x^2-5x+6)+(5x-5)}{x^2-5x+6}\\
&=\frac{x^2-5x+6}{x^2-5x+6}+\frac{5x-5}{x^2-5x+6}\\
&=1+\frac{5x-5}{x^2-5x+6}
\end{align*}
As next step notice that $$x^2-5x+6=(x-2)(x-3)$$
and expand in partial fractions:
\begin{align*}
\frac{5x-5}{x^2-5x+6}&=\frac{A}{x-2}+\frac{B}{x-3}&&\text{Where }A\text{ and }B\text{ are constants}
\end{align*}
A: Given $\displaystyle \int\frac{x^2+1}{x^2-5x+6}dx = \int\frac{(x^2-5x+6)+(5x-5)}{x^2-5x+6}dx = \int 1dx+5\int\frac{(x-1)}{(x-2)(x-3)}dx$
Now Using Partial fraction Method::
$\displaystyle \frac{x-1}{(x-2)\cdot (x-3)} = \frac{A}{(x-2)}+\frac{B}{(x-3)}$
So we get $x-1 = A(x-3)+B(x-2) = (A+B)x+(-3A-2B)$
After Camparing the coefficient, we get $\displaystyle A+B=1$ and $3A+2B = 1$
So we get $\displaystyle A = -1$ and $\displaystyle B= 2$
So we get $\displaystyle \frac{x^2+1}{x^2-5x+6}dx = x+5\int \left[-\frac{1}{x-2}+\frac{2}{x-3}\right]dx$
A: Notice, $$\frac{x^2+1}{x^2-5x+6}=\frac{(x^2-5x+6)+5(x-1)}{x^2-5x+6}$$
$$=1+5\frac{x-1}{x^2-5x+6}$$
$$\implies \frac{x-1}{x^2-5x+6}
=\frac{x-1}{(x-2)(x-3)}$$   $$=\frac{A}{x-2}+\frac{B}{x-3}$$
By comparing the corresponding coefficients, we get $A=-1$, $B=2$, hence 
$$\frac{x-1}{x^2-5x+6}=-\frac{1}{x-2}+\frac{2}{x-3}$$ Hence, we have  $$\frac{x^2+1}{x^2-5x+6}=1-\frac{5}{x-2}+\frac{10}{x-3}$$
A: Lot of good answers above. I understand now how this question will be solved. Since $f(x) /g(x)= quotient + remainder/divisor$, therefore on dividing both function we get -5+5x as remainder 1 as quotient and hence we get 
1+ ((5x-5)/(x^2 - 5x + 6))
A: (x2+1)/(x2-5x+6)= (x2+1)/{(x-2)(x-3)}
By partial fraction
(x2+1)/(x-3)(x-2)= (Ax+B)/(x-2) +C/(x-3)
x2+1= Ax2+x(B-3A-C)-(B+2C)
Solving above equation,
We get
A=1, B=-7, C=10
So (x2+1)/(x2-5x+6)=(x-7)/(x-2) +10/(x-3)
=> 1+10/(x-3)-5/(x-2)
So integration will be
= x+10ln(x-3)-5ln(x-2)
