This article shows a technique of evaluating a definite integral by introducing a suitable parameter. This however doesn't throw light on motivation for introducing that particular parameter.
For inctance:
$1)$ $\int_0^\infty \dfrac{\sin x}{x}dx $ can be evaluated by introducing the function $f(b)=\int_0^\infty \dfrac{\sin x}{x}e^{bx}dx$
$2)$ $\int_0^{\pi/2} x\cot x dx$ can be evaluated by introducing $f(b)=\int_0^{\pi/2}\dfrac{\arctan(b\tan(x))}{\tan (x)} dx$
What is the motivation behind these parameters, in general how would I find a parameter to evaluate a particular definite integral without trail and error?
A general method does not exist; otherwise we could calculate all integrals, which is evidently not true.
We can say something about certain special cases though:
Another useful special case: for $\int dx \log(1+x) R(x)$ or $\int dx \tan^{-1}(x) R(x)$ with $R$ a rational function of $x$, put a parameter inside the $\log$ or $\arctan$. Upon differentiation, you will get a rational function which you can always integrate in principle.