Substitution

Substitution is a general method used to simplify complicated expressions by assigning a simple name to some part of that expression.

Example: Consider the function

If we decide to denote y = x13, we get

As you can see, substitution is done by simple replacement. This is a general rule. There are two basic rules for using substitution.

1. When doing a substitution, the original variable must completely disappear from the given expression.
2. When replacing appearances of the original variable with the new one, we can only use the basic substitution equality and information derived from it.

For instance, in the above example we might be tempted to use the substitution y = 1 + x13. Now we know how to substitute in the denominator and in the logarithm, but this equation does not allow us to change in the sine. However, rule 1 does not allow us to leave x there. The rule 2 gives us a hint. We find what to replace x13 with from the original substitution equality.

y = 1 + x13, hence x13 = y − 1.

Thus we get

More complicated expressions are of course possible, but whatever formulas are used for replacement must be derived from the original substitution equality. We can use algebra, but we have to be careful. Consider the following two examples.

Examples:

The first substitution shows that we can also pass to inverse functions when working with the substitution equality. The second substitution shows that we have to be careful when we do it.

Generally, when we do a substitution, an important part is for what values of variables it is done. In the example at the beginning we did not care very much, but now we have to. In the logarithmic substitution we have to make sure that the logarithm exists, which means that the substitution can be done only for x > 0. But we also need to be able to pass to an inverse function, which fortunately for us is possible on (0,∞). This suggests that when we use substitution, we prefer 1-1 substitution formulas.

However, this is not always possible, as we see in the case of the cosine substitution. There we need to restrict x to some set on which the cosine is 1-1. Typically we do substitution on an interval, so here we have a natural candidate: x should be taken from [0,π]. However, there are other intervals available and the choice may substantially influence the calculations that follow. In this case the substitution as written is correct only on this interval. If we choose a different one where the cosine is 1-1, we get something different. For instance, if we decide to work on [π,2π], then we will have to use a different inverse function, namely x = 2π − arccos(y) (check). Thus we in fact have infinitely many different substitutions, all given by the same formula, but they differ in the interval on which they are done and for each interval, the formula for x will be a different expression featuring arccos(y). As you can see, the substitution as written above was actually wrong, since it only works for some x and that should have been specified. We will show how to do it below.

But even if we did not have to pass to the inverse, there is yet another trouble in that substitution. The formula for sine with square root works only under the assumption that the sine is not negative. If we indeed restrict x to [0,π], then this is satisfied and the substitution as written is correct. However, if we try [π,2π], then the sine is non-positive there and we have to do it differently.

Although most substitutions do not cause such troubles, sometimes one has to be very careful about where calculations are made.

Substitution and setting

We never do substitution just like this, we usually plan on doing some math with the expression. What kind of math we plan to do defines the setting of the expression, and when we do substitution, we have to change the setting accordingly. We then sometimes refer to a "change of variable", since along with the expression we also change the whole given problem into the language of the new variable. There are three popular settings.

Limits.

When we do substitution in a limit, we have to change all appearances of the original variable, which also includes the place under "lim". There we simply change the name of the variable, but the limit point itself must change according to the basic substitution equality.

Example:

Derivative.

When we want to differentiate a function f (x) and we use a substitution to change the variable into y, we have to use this formula:

f (x)]′ = f ′(y)⋅y′.

Then we have to change back into the original variable. In fact, this is just a restatement of the chain rule, you can find more information there.

Example: Consider the function

If we want to find its derivative, we may do it directly, but then we would have to use the chain rule at quite a few places. It might be easier to first simplify the expression using substitution:

Now we easily calculate

Finally we use the rule for derivative with substitution:

Integration.

There are three places related to the setting where the original variable can appear. It is always present in the "d"-element (differential), like in dx, so we need to know how to change this. If the integral is definite, then also the limits of the integral are with respect to the original variable. Those are changed into the new variable quite easily, we simply use the basic substitution equality.

Concerning the differential, we have a simple rule:

The substitution y = f (x) changes differentials like this: dy = f ′(x)dx.

Example:

Since integration is rather specific, we refer to substitution in Integrals - Theory - Methods for more information.

Sums and series.

When changing the indexing variable in a sum (finite or infinite), we also have to change its limits. It might also be necessary to switch the limits, since unlike integrals, the order of limits does not have any real meaning and we always put the smaller down.

Example: