A lot of people do integration by parts by defining the variables

and

and flip them around.
There is a more adult way of doing this, which looks nicer and is a lot faster.
Say we have the integral,

The idea is to turn one of the factors into a derivative. For example, we know that

.
Thus, we can think of the integral as,
The next step is to take the function
inside the differenciation operator and multiply it with the function unaffected with the differenciation and multiply them together. That is the

part that you get.
Thus, we get
The next step is to take the derivative of the function which was unaffected by differenciation and multiply it by the function inside the differenciation sign. This is our

part.
In this case we get,

.
-----
Here is another example,

.
Look how fast that is.
Here is another example,

My point is that it is a lot easier to keep track of everything doing integration this way. Because you do not need to go out of your way to write

and

.