does the choice of the variables matter for integration by parts? I am trying to solve this definite partial integral:
$$ \int_{0}^{T} te^{-st} dt$$
In the left column I defined my variables in one way and in the right column I defined them the other way around:

The formula I base my calculation on is the following:
$$\int f\,dg = fg - \int g \, df$$
It looks like the equation is much more difficult than the one on the right. As I am not a pro in math. I would like to know whether, if I were able to solve the equation on the left (which is not the case right now), I would get the same reuslt as on the right?
In other words does it matter whether I say e.g. $f = t$ or $f = e^{-st}$
 A: Integration by parts can be summed up by $\int u dv  = uv - \int v du$, where you are trying to find the integral on the LHS.
Finding the right $u$ and $dv$ to start with are often a matter of experience. But there's a nice rule of thumb that's often quoted.
The order of priority for choosing the term to make $u$ (from most likely to work to least likely) is:


*

*logarithm

*inverse trig function

*algebraic function

*trig function

*exponential
The reference for this is http://www.johndcook.com/blog/2008/02/28/what-to-make-u-in-integration-by-parts/, but it's been mentioned in the literature, i.e.  “A Technique for Integration by Parts” by Herbert E. Kasube. American Mathematical Monthly, March 1983, page 210.
So, in your specific example, you would preferentially choose the algebraic function to be $u$, i.e. $f=t$.
Remember, this is just a rule of thumb. Mathematically, there's nothing "wrong" with going the other way, but you may have difficulty with evaluating to a final closed answer if you do so. However, integration by parts is often used as a technique (often recursively) to find reduction formulae for otherwise difficult integrals, and in those cases, it's just a matter of using whatever works best. As I said, experience is key.
A: As your actual question, I believe, has already been answered vastly by @GaussTheBauss, the following will serve for another purpose; downvotes are encouraged if it seems inappropriate.
Please observe you have some severe issues considering the mathematical notation present on the paper.
First, the usage of differentials and (consequently) the (probably misleadingly shortened, but otherwise correct) formula of integration by parts is incorrect:

$$f=t,\label{eqn1}\tag{1}$$ $$\mathrm df=1.\label{eqn2}\tag{2}$$

You cannot go from $\eqref{eqn1}$ to $\eqref{eqn2}$. Recall the definition of $\mathrm d$: $$\mathrm df(x)=f'(x)\mathrm dx,$$ where $f$ is some differentiable function and $f'$ is its first derivative. So the corrected version of $\eqref{eqn1}$ goes as follows: $$\mathrm df=1\times\mathrm dt=\mathrm dt.\label{eqn2*}\tag{2*}$$
Similarly, the $\mathrm dg$ is also flawed:

$$\mathrm dg=e^{-st},\label{eqn3}\tag{3}$$ $$g=-\frac{1}{s}e^{-st}.\label{eqn4}\tag{4}$$

You can set $\mathrm dg$ to whatever you want, but to make any sense of it, you need to set that differential form $\mathrm dg$ to be equal to some other differential form, i.e. you need to include that $\mathrm dt$ factor of your integral when you choose your $\mathrm dg$, because the way you go from $\eqref{eqn3}$ to $\eqref{eqn4}$ is, normally, integrating $\eqref{eqn3}$:
$$\mathrm dg=e^{-st}\implies\int\mathrm dg=\int e^{-st},$$
but you cannot evaluate that, because the integrand at the RHS is not a differential! Correcting $\eqref{eqn3}$, we have:
$$\mathrm dg=e^{-st}\mathrm dt\implies\label{eqn3*}\tag{3*}$$
$$\implies g=\int\mathrm dg=\int e^{-st}\mathrm dt=-\frac{1}{s}\int e^{-st}(-s)\mathrm dt=-\frac{1}{s}\int e^{-st}\mathrm d(-st)=-\frac{1}{s}e^{-st}.\label{eqn4*}\tag{4*}$$
Now we can use your formula:
$$\int \underbrace{t}_f\underbrace{e^{-st}\mathrm dt}_{\mathrm dg}=\underbrace{t}_f\underbrace{\left(-\frac{1}{s}e^{-st}\right)}_g-\int\underbrace{\left(-\frac{1}{s}e^{-st}\right)}_g\underbrace{\mathrm dt}_{\mathrm df}.$$
You may think all this is irrelevant, but compare with

$$\frac{t}{-s}e^{-st}-\int_0^T\frac{1}{-s}e^{-st}\cdot1,\label{eqn5}\tag{5}$$

which is what you have ended up with: the integrand again is not a differential.
Additionally, the usage of $\Longleftrightarrow$ is also incorrect. $\Longleftrightarrow$ is an infix operator acting on two logical expressions, e.g. $A\Longleftrightarrow B$, which reads as $A$ is (materially) equivalent to $B$ and means $A$ holds whenever $B$ holds and $B$ holds whenever $A$ holds, where $A$ and $B$ are some expressions which evaluate to (boolean) true or (boolean) false, for example, equations: $$x^2=0\Longleftrightarrow x=0$$ is true because if $x^2=0$, then $x=0$ and if $x=0$, then $x^2=0$; that is, whichever set of values of $x$ you find that satisfies $x^2=0$, (you will know) it will also satisfy $x=0$, and (!) vice versa.
The problem with your usage is that $\eqref{eqn5}$ is not a boolean value, and this is the same type of problem as with writing $\sqrt{4}\Longleftrightarrow 2$, which is clearly problematic: you cannot say the square root of four is equivalent to two. The square root of four is equal to two.
Also, I would suggest you not to write disconnected expressions on each new line out of the blue. You want to evaluate $\int_0^Tte^{-st}\mathrm dt$, so just put $$I=\int_0^Tte^{-st}\mathrm dt,$$ you are free to introduce whichever ($I$ stands for integral, for example) variables and definitions you feel convenient working with, so do it, so that when you interrupt for, e.g., a substitution, you place a semicolon, define your substitution and continue with $I=\dotsc$ so that your reader does not have to guess what are you doing and how is this thing relevant to the previous ones. Use the equal sign!
A: Mathematically, the two methods should yield the same answer. That being said,
the choice matters if you want to get a final answer (an evaluation). As you can see from your work, choosing a polynomial as $dg$ is a bad idea. Simply put, every time you integrate a polynomial, its degree increases.
Whenever you have a combination of a power function with (usually) an exponential of a trigonometric function, you want to be taking derivatives of the power, not integrating.
For higher powers in your integrals, you might want to look into the "Tabular Method".
