Integration by parts - commonly used derivation Sometimes when doing integration by parts I noticed that some book authors write this kind of derivation.
$$\int f(x)\ dx = some\ computations\ here = G(x) - \int f(x)\ dx \tag{1}$$
And now... from here they conclude that
$$2 \cdot \int f(x)\ dx = G(x) \tag{2} $$
so it follows that
$$\int f(x)\ dx = \frac{G(x)}{2} \tag{3}$$
But I feel something is not quite rigorous here. First of all what does it mean $2$ times an indefinite integral (that's the expression we have in $(2)$?!). This expression is not defined, right? Is it OK to write it then, or to conclude that $(3)$ follows.
Also... in this whole derivation from $(1)$ to $(2)$ to $(3)$, what happens with the free constant $ H(x) + C$ which we usually write when solving indefinite integrals?
These two items seem to confuse me. I understand the answer at the end comes out correct, but I feel like the derivation is somewhat unjustified (not rigorous). Could someone clarify this?
 A: Your concern should vanish if you consider
$$\int f(x)\,dx:=\int_{x_0}^x f(t)\,dt$$ for some arbitrary $x_0$.
A: For the incredulous, here is a bare example, without constants:
$$\int x^2\,dx=\int x\cdot x\,dx=\frac{x^2}2x-\int \frac{x^2}2dx$$ so that
$$\frac32\int x^2\,dx=\frac{x^3}2.$$

But you may add constants wherever you want,
$$\int x\cdot x\,dx+C_1=\frac{x^2}2x+C_2-\left(\int \frac{x^2}2dx+C_3\right)$$ you still get
$$\int x^2\,dx=\frac{x^3}3+C.$$
A: As I understand it, these expressions are a "general understanding" of an application for integration by parts. I've had this same doubt in the past. The idea is that you use the integration by parts twice and then get the desired integral, without having to calculate it explicitly.
I will give you an example here where this occurs. This example is very useful!
Consider $f(x)=e^{x}\cos x$:
$$
\int e^{x}\cos x\, dx = e^{x}\sin x-\int e^{x}\sin x\, dx =  e^{x}\sin x+e^x\cos x-\int e^{x}\cos x \, dx
$$
Note that the desired integral appears on both sides of the above equality. So we have:
$$
\int e^{x}\cos x\, dx + \int e^{x}\cos x\, dx = e^{x}\sin x+e^x\cos x
$$
Then
$$
2\int e^{x}\cos x\, dx = e^{x}\sin x+e^x\cos x
$$
Or
$$
\int e^{x}\cos x\, dx = \frac{e^{x}\sin x+e^x\cos x}{2}
$$
Here your $G(x) = e^{x}\sin x+e^x\cos x$
