The change of variable used in the previous example

may seem rather strange, but is indeed very useful. The ultimate reason for this choice is that all trigonometric functions are transformed into rational functions (polynomial quotients)

and there are rules to integrate all rational functions, as we will see later; therefore integrals involving trigonometric functions and additions, substractions, products and quotients may always be integrated with this change of variable. The simpler change of variable

would not work here, since in this case $\sin x$ and $\cos x$ involve square roots

However, sometimes other techniques may be shorter (especially for powers of $\sin$ and $\cos$). For instance

leads to a tedious rational function, whereas a wiser change of variable

solves it immediately