$$\int f(x)g(x)=f(x)\int g(x)dx-\int \left(f'(x)\int g(x)dx\right)dx+C$$
Let's say we have two functions $u(x)$ and $v(x)$ which are differentiable
$$h(x)=u(x).v(x)$$ $$\dfrac{d}{dx}h(x)=u'(x)v(x)+v'(x)u(x)$$ $$d(h(x))=u'(x)v(x)dx+v'(x)u(x)dx$$
$$v'(x)u(x)dx=d(u(x)\cdot v(x))-u'(x)v(x)dx$$
Taking integration on both sides
$$\int u(x)v'(x)dx=\int d(u(x)\cdot v(x))-\int u'(x)v(x)dx$$
$$\int u(x)v'(x)dx=u(x)\cdot v(x)+C-\int u'(x)v(x)dx$$
$$\int u(x)v'(x)dx=u(x)\cdot\int v'(x)dx-\int\left(u'(x)\int v'(x)dx\right)dx+C$$
Replacing $v'(x)$ by $g(x)$ and $u(x)$ by $f(x)$
$$\int f(x)g(x)=f(x)\int g(x)dx-\int \left(f'(x)\int g(x)dx\right)dx+C$$
Is this proof correct?
Is this proof correct? Dunno, but it looks convoluted. Here is the way I do it:
Suppose $h = uv$.
$ \int h' dx = h = uv \implies h' = u'v + v'u$.
$ \implies u'v = h' - v'u \quad (*) $
Now, integrating both sides of $(*)$ gives the result (Integration by Parts), using the fact that $ \int h' dx = uv$