<s>[INST] How do you evaluate $\int_{0}^{1} \frac{(3x^3-x^2+2x-4)}{\sqrt{x^2-3x+2}} \, dx$? Saw this problem on a FaceBook meme that said the pin code to his ATM debit card is the solution to the following problem:
$$\int_{0}^{1} \frac{(3x^3-x^2+2x-4)}{\sqrt{x^2-3x+2}} \, dx$$
I was trying to see how we could break this up into an easier integrals but nothing comes to mind at first glance. Perhaps complex integration is possible?
 [/INST] As an alternative to the substitution described in the comments, the anti-derivative of expressions of the form $P(x)/\sqrt{ax^2+bx+c}$, $(a\ne 0)$, where $P(x)$ is a non-constant polynomial is:
$$\int \frac{P(x)}{\sqrt{ax^2+bx+c}}\mathrm{d}x=Q(x)\sqrt{ax^2+bx+c}+\lambda\int\frac{1}{\sqrt{ax^2+bx+c}}\mathrm{d}x $$
where $Q(x)$ is a polynomial with undetermined coefficients of one degree less than $P(x)$ and $\lambda$ is an unknown number. To find the coefficients, differentiate both sides, get rid of the square root, and equate coefficients for the powers of $x$.
In this case:
$$\int \frac{3x^3-x^2+2x-4}{\sqrt{x^2-3x+2}}\mathrm{d}x=\left(x^2+\frac{13}{4}x+\frac{101}{8}\right)\sqrt{x^2-3x+2}+\frac{135}{16}\int \frac{1}{\sqrt{x^2-3x+2}}\mathrm{d}x$$
and
$$\int \frac{1}{\sqrt{x^2-3x+2}}\mathrm{d}x=\int \frac{1}{\sqrt{\left(x-\frac{3}{2}\right)^2-\frac{1}{4}}}\mathrm{d}x=\ln\left|x-\frac{3}{2}+\sqrt{x^2-3x+2}\right|+C $$
Update: In your case, $P(x)$, the polynomial in the numerator, has degree $3$, so $Q(x)$ has degree $2$: $Q(x)=Ax^2+Bx+C$.
So you have
$$\int \frac{3x^3-x^2+2x-4}{\sqrt{x^2-3x+2}}\mathrm{d}x=\left(Ax^2+Bx+C\right)\sqrt{x^2-3x+2}+\lambda\int \frac{1}{\sqrt{x^2-3x+2}}\mathrm{d}x$$
and after differentiation:
$$\frac{3x^3-x^2+2x-4}{\sqrt{x^2-3x+2}}=(2Ax+B)\sqrt{x^2-3x+2}+(Ax^2+Bx+C)\frac{2x-3}{2\sqrt{x^2-3x+2}}+\frac{\lambda}{\sqrt{x^2-3x+2}} $$
Now, multiply both sides by the square root to remove it, and equate coefficients for the powers of $x$.
</s>