How to solve long integration by partial fraction decomposition problems faster? Some problems are just too time consuming for short exam times what is the fastest way to solve problems like this one for example $$\int \frac{5x^4-21x^3+40x^2-37x+14}{(x-2)(x^2-2x+2)^2}dx$$

If you're going for a purely partial fraction decomposition approach, then I'm afraid there isn't much you can do to expedite the process. Partial fraction decomposition is just a naturally tedious and long-winded thing to do.
$$\frac {5x^4-21x^3+40x^2-37x+14}{(x-2)(x^2-2x+2)^2}=\frac A{x-2}+\frac {Bx+C}{x^2-2x+2}+\frac {Dx+E}{(x^2-2x+2)^2}\tag1$$
Clear the fraction to get
$$5x^4-21x^3+40x^2-37x+14=A(x^2-2x+2)^2+(Bx+C)(x-2)\times\ldots\\(x^2-2x+2)+(Dx+E)(x-2)\tag2$$
There is a slightly faster way to obtain most of the coefficients than expanding the right-hand side and comparing the values. First, set $x=2$ and observe that the second and third terms of the right-hand side vanish.
$$12=4A\qquad\implies\qquad A=3\tag3$$

 Note that another way to find $A$ would've been to take the limit of the left-hand side of $(1)$ ignoring the $x-2$ term$$A=\lim\limits_{x\to2}\frac {5x^4-21x^3+40x^2-37x+14}{(x^2-2x+2)^2}=3$$This is essentially the same as the way I've shown above, just in less steps.

Next, set the quadratic equal to zero and observe how the first and second terms vanish. To do so, no need to actually solve the quadratic, observe that $x^2=2x-2$ and replace all occurrences of even powers with that.
$$5(2x-2)^2-21x(2x-2)+40(2x-2)-37x+14=(Dx+E)(x-2)$$
After much simplification, and replacing any resulting $x^2$ terms with $2x-2$ after expanding, you should arrive
$$x-2=(Dx+E)(x-2)\qquad\implies\qquad(D, E)=(0, 1)\tag4$$
Unfortunately, I do not know of a way to solve for $B$ and $C$ with a single substitution. Replace $A$, $D$, and $E$ in $(2)$ with the values derived from $(3)$ and $(4)$ and simplify.
$$(2x-1)(x-2)(x^2-2x+2)=(Bx+C)(x-2)(x^2-2x+2)$$
Clearly, $B=2$ and $C=-1$. Putting everything together gives

$$\frac {5x^4-21x^3+40x^2-37x+14}{(x-2)(x^2-2x+2)^2}=\frac 3{x-2}+\frac {2x-1}{x^2-2x+2}+\frac 1{(x^2-2x+2)^2}$$

