Why is integration by parts derived as the following way

calculusintegration

Deriving the integration by parts formula:

$$\frac{d}{dx}[f(x)g(x)] = f'(x)g(x)+f(x)g'(x)$$

$$f(x)g(x) =\int{f'(x)g(x)}\:dx + \int{f(x)g'(x)}\:dx$$

$$=>\int{f(x)g'(x)}\:dx =f(x)g(x) – \int{g(x)f'(x)}\:dx$$

$$ OR $$
$$\frac{d}{dx}[uv] = vdu+udv$$

$$uv =\int{v}\:du + \int{u}\:dv$$

$$=>\int{u}\:dv = uv – \int{v}\:du$$


My question:

In this step of deriving the integration by parts formula,
$$uv =\int{v}\:du + \int{u}\:dv$$

$$=>\int{u}\:dv = uv – \int{v}\:du$$

Why is $\int{v}\:du$ subtracted from $uv$? In other words, I can subtract either integral from $uv$ in order to isolate either integral. So why can't I do the following? :
$$uv =\int{v}\:du + \int{u}\:dv$$

$$=>\int{v}\:du = uv – \int{u}\:dv$$

When I then use this formula shown above, integrating something by parts will no longer work. See the example below:

$$\int{x}{sinx}\:dx$$

$Correct$ $integral$$: -xcosx + sinx + C$


Case 1

$$\int{x}{sinx}\:dx$$

Using:

$$\int{v}\:du = uv – \int{u}\:dv$$

$$u = x -> du = dx$$
$$dv = sinxdx -> v = -cosx$$

$$= -xcosx + \int{xsinx}\:dx$$

As you can see the integral on the right side is the same as the original, so it will keep repeating and never give the correct answer of -xcos(x) + sin(x) + C


Case 2

$$\int{x}{sinx}\:dx$$

Using:

$$\int{v}\:du = uv – \int{u}\:dv$$
$$u = sinx -> du = cosxdx$$
$$dv = xdx -> v = 1/2(x^2)$$

Will lead no where close to the correct answer if computed ^

So why doesn't arranging the form of the integration by parts formula make it no longer work?

If I used the original formula: uv – $\int{v}\:du$, then the integral in my example will lead to the correct answer. But if I use uv – $\int{u}\:dv$, then the formula no longer works, as shown above.


Finally resolved:

$\int{u}\:dv = uv – \int{v}\:du$ $<=>$ $\int{v}\:du = uv – \int{u}\:dv$

but the final answer has to be adjusted slightly when using the altered formula in order to get the correct answer. The final answer has to be arranged because both formulas will always have the same $u$ and $v$ values such that one expression/integrand will represent the original integral given.

Normal formula:
$\int{u}\:dv = uv – \int{v}\:du$

Original integral: $$\int{x}{sinx}\:dx$$

$$u = x -> du = dx$$
$$dv = sindx -> v = -cosx$$

$$\int{x}{sinx}\:dx= -xcosx + \int{cosx}\:dx$$

$$= -xcosx + sinx + C $$

Altered formula:
$\int{v}\:du = uv – \int{u}\:dv$

Original integral: $$\int{x}{sinx}\:dx$$

$$u = x -> du = dx$$
$$dv = sindx -> v = -cosx$$

$$\int{-cosx}\:dx = -xcosx – \int{xsinx}\:dx$$
$$\int{x}{sinx}\:dx= -xcosx + \int{cosx}\:dx$$

$$= -xcosx + sinx + C $$

Best Answer

You're making a mistake in both of your other cases of determining the integral of different expressions. You have the original integral of

$$\int x\sin(x)dx = -x\cos x + \sin x + C \tag{1}\label{eq1A}$$

However, with $u = x$, you get $du = dx$. With $v = \sin x$, you have

$$\begin{equation}\begin{aligned} \int vdu & = \int \sin(x)dx \\ & = x\sin x - \int x\cos x dx \\ & = -\cos x + C \end{aligned}\end{equation}\tag{2}\label{eq2A}$$

Also, with $u = \sin(x)$, you get $du = \cos(x)dx$. Along with $v = x$, you have

$$\begin{equation}\begin{aligned} \int vdu & = \int x\cos(x)dx \\ & = x\sin x - \int \sin x dx \\ & = x\sin x + \cos x + C \end{aligned}\end{equation}\tag{3}\label{eq3A}$$

As you can see, the integrals used in both \eqref{eq2A} or \eqref{eq3A} don't match that in \eqref{eq1A}. Thus, there's no reason to expect the resulting expressions to match either, and they don't as you can see.

Related Question