Integration by substitution
In calculus, integration by substitution, also known as "u"-substitution, reverse chain rule or change of variables, is a method for evaluating integrals and antiderivatives. It is the counterpart to the chain rule for differentiation, and can loosely be thought of as using the chain rule "backwards". Substitution for a single variable. Introduction. Before stating the result rigorously, consider a simple case using indefinite integrals. Compute formula_1. Set formula_2. This means formula_3, or in differential form, formula_4. Now where formula_6 is an arbitrary constant of integration. This procedure is frequently used, but not all integrals are of a  form that permits its use. In any event, the result should be verified by differentiating and comparing to the original integrand. For definite integrals, the limits of integration must also be adjusted, but the procedure is mostly the same. Definite integrals. Let be a differentiable function with a continuous derivative, where is an interval. Suppose that is a continuous function. Then In Leibniz notation, the substitution yields Working heuristically with infinitesimals yields the equation which suggests the substitution formula above. (This equation may be put on a rigorous foundation by interpreting it as a statement about differential forms.) One may  view the method of integration by substitution as a partial justification of Leibniz's notation for integrals and derivatives. The formula is used to transform one integral into another integral that is easier to compute. Thus, the formula can be read from left to right or from right to left in order to simplify a given integral. When used in the former manner, it is sometimes known as u"-substitution or w"-substitution in which a new variable is defined to be a function of the original variable found inside the composite function multiplied by the derivative of the inner function. The  latter manner is commonly used in trigonometric substitution, replacing the original variable with a trigonometric function of a new variable and the original differential with the differential of the trigonometric function. Proof. Integration by substitution can be derived from the fundamental theorem of calculus as follows. Let and be two functions satisfying the above hypothesis that is continuous on and is integrable on the closed interval . Then the function is also integrable on . Hence the integrals and in fact exist, and it remains to show that they are equal. Since is continuous, it has an antiderivative . The composite function is  then defined. Since is differentiable, combining the chain rule and the definition of an antiderivative gives Applying the fundamental theorem of calculus twice gives which is the substitution rule. Examples. Example 1. Consider the integral Make the substitution formula_16 to obtain formula_17, meaning formula_18. Therefore, Since the lower limit formula_20 was replaced with formula_21, and the upper limit formula_22 with formula_23, a transformation back into terms of formula_24 was unnecessary. Alternatively, one may fully evaluate the indefinite integral (see below) first then apply the boundary conditions. This becomes especially handy when multiple substitutions are used. Example 2. For the integral  a variation of the above procedure is needed. The substitution formula_26 implying formula_27 is useful because formula_28. We thus have The resulting integral can be computed using integration by parts or a double angle formula, formula_30, followed by one more substitution. One can also note that the function being integrated is the upper right quarter of a circle with a radius of one, and hence integrating the upper right quarter from zero to one is the geometric equivalent to the area of one quarter of the unit circle, or formula_31. Antiderivatives. Substitution can be used to determine antiderivatives. One chooses  a relation between formula_24 and formula_33, determines the corresponding relation between formula_34 and formula_35 by differentiating, and performs the substitutions. An antiderivative for the substituted function can hopefully be determined; the original substitution between formula_24 and formula_33 is then undone. Similar to example 1 above, the following antiderivative can be obtained with this method: where formula_6 is an arbitrary constant of integration. There were no integral boundaries to transform, but in the last step reverting the original substitution formula_16 was necessary. When evaluating definite integrals by substitution, one may calculate the antiderivative fully first, then apply the boundary conditions. In  that case, there is no need to transform the boundary terms. The tangent function can be integrated using substitution by expressing it in terms of the sine and cosine: Using the substitution formula_42 gives formula_43 and Substitution for multiple variables. One may also use substitution when integrating functions of several variables. Here the substitution function needs to be injective and continuously differentiable, and the differentials transform as where denotes the determinant of the Jacobian matrix of partial derivatives of at the point . This formula expresses the fact that the absolute value of the determinant of a matrix equals the volume  of the parallelotope spanned by its columns or rows. More precisely, the "change of variables" formula is stated in the next theorem: Theorem. Let be an open set in and an injective differentiable function with continuous partial derivatives, the Jacobian of which is nonzero for every in . Then for any real-valued, compactly supported, continuous function , with support contained in , The conditions on the theorem can be weakened in various ways. First, the requirement that be continuously differentiable can be replaced by the weaker assumption that be merely differentiable and have a continuous inverse. This is guaranteed to hold if  is continuously differentiable by the inverse function theorem. Alternatively, the requirement that can be eliminated by applying Sard's theorem. For Lebesgue measurable functions, the theorem can be stated in the following form: Theorem. Let be a measurable subset of and an injective function, and suppose for every in there exists in such that as (here is little-"o" notation). Then is measurable, and for any real-valued function defined on , in the sense that if either integral exists (including the possibility of being properly infinite), then so does the other one, and they have the same value. Another very general  version in measure theory is the following: Theorem. Let be a locally compact Hausdorff space equipped with a finite Radon measure , and let be a σ-compact Hausdorff space with a σ-finite Radon measure . Let be an absolutely continuous function (where the latter means that whenever ). Then there exists a real-valued Borel measurable function on such that for every Lebesgue integrable function , the function is Lebesgue integrable on , and Furthermore, it is possible to write for some Borel measurable function on . In geometric measure theory, integration by substitution is used with Lipschitz functions. A bi-Lipschitz function is  a Lipschitz function which is injective and whose inverse function is also Lipschitz. By Rademacher's theorem a bi-Lipschitz mapping is differentiable almost everywhere. In particular, the Jacobian determinant of a bi-Lipschitz mapping is well-defined almost everywhere. The following result then holds: Theorem. Let be an open subset of and be a bi-Lipschitz mapping. Let be measurable. Then in the sense that if either integral exists (or is properly infinite), then so does the other one, and they have the same value. The above theorem was first proposed by Euler when he developed the notion of  double integrals in 1769. Although generalized to triple integrals by Lagrange in 1773, and used by Legendre, Laplace, Gauss, and first generalized to variables by Mikhail Ostrogradski in 1836, it resisted a fully rigorous formal proof for a surprisingly long time, and was first satisfactorily resolved 125 years later, by Élie Cartan in a series of papers beginning in the mid-1890s. Application in probability. Substitution can be used to answer the following important question in probability: given a random variable formula_51 with probability density formula_52 and another random variable formula_53 such that formula_54 for injective (one-to-one) formula_55, what  is the probability density for formula_53? It is easiest to answer this question by first answering a slightly different question: what is the probability that formula_53 takes a value in some particular subset formula_58? Denote this probability formula_59. Of course, if formula_53 has probability density formula_61 then the answer is but this isn't really useful because we don't know formula_61; it's what we're trying to find. We can make progress by considering the problem in the variable formula_51. formula_53 takes a value in formula_58 whenever formula_51 takes a value in formula_68, so Changing from variable formula_24  to formula_71 gives Combining this with our first equation gives so In the case where formula_51 and formula_53 depend on several uncorrelated variables, i.e. formula_77 and formula_78, formula_61 can be found by substitution in several variables discussed above. The result is