How do I find the closed form of this integral $\int_0^2\frac{\ln x}{x^3-2x+4}dx$? How do I find the closed form of this integral:
$$I=\int_0^2\frac{\ln x}{x^3-2x+4}dx$$
First, I have a partial fraction of it:
$$\frac{1}{x^3-2x+4}=\frac{1}{(x+2)(x^2-2x+2)}=\frac{A}{x+2}+\frac{Bx+C}{x^2-2x+2}$$
$$A=\frac{1}{(x^3-2x+4)'}|_{x=-2}=\frac{1}{(3x^2-2)}|_{x=-2}=\frac{1}{10}$$
$$Bx+C=\frac{1}{x+2}|_{x^2-2x=-2}=\frac{1}{(x+2)}\frac{(x-4)}{(x-4)}|_{x^2-2x=-2}=$$
$$=\frac{(x-4)}{(x^2-2x-8)}|_{x^2-2x=-2}=\frac{(x-4)}{(-2-8)}|_{x^2-2x=-2}=-\frac{1}{10}(x-4)$$
Thus:
$$\frac{1}{x^3-2x+4}=\frac{1}{10}\left(\frac{1}{x+2}-\frac{x-4}{x^2-2x+2}\right)$$
$$I=\frac{1}{10}\left(\int_0^2\frac{\ln x}{x+2}dx-\int_0^2\frac{(x-4)\ln x}{x^2-2x+2}dx\right)$$
What should I do next?

To address your question of how to handle loops when integrating by parts, let $I=\int e^x\sin x \ dx$. Both functions are transcendental. We'll try using $u_1=e^x$ and $dv_1=\sin x \ dx$. These give $du_1=e^x \ dx$ and $v_1=-\cos x$. Thus, $$I=-e^x\cos x+\int e^x\cos x \ dx.$$
Now we have another integral. We'll try by parts again, and it's important we keep the same arrangement as last time (i.e. we need $u_2=du_1$ and $dv_2=v_1$; in this case we used exponential as $u$ and trigonometric as $v$, though we could have dove it the other way as long as we were consistent) otherwise we will just undo our last step. So, $u_2=e^x$ and $dv_2=\cos x \ dx$. These give $du_2=e^x \ dx$ and $v_2=\sin x$. Thus,
$$
\begin{align}
I&=-e^x\cos x+e^x\sin x-\int e^x\sin x \ dx \\
&=e^x(\sin x-\cos x)-I \\
2I&=e^x(\sin x-\cos x) \\
I&=\frac{1}{2}e^x(\sin x-\cos x).
\end{align}
$$
The important step is realising that when you get back to where you started, you can perform algebra to solve for your result.
That said, I do not guarantee this is what's needed here, just thought it might be worth a try and then you asked. So here you go.
