When an integral hides a chain rule
You are working through a calculus problem set late at night and you meet an integral like the integral of 2x(x^2+1)^3 with respect to x. Expanding the cube by hand means cubing a binomial, multiplying by 2x, then integrating four separate terms. It works, but it eats ten minutes and invites arithmetic slips. There is a cleaner path: notice that 2x is the derivative of the inner part, x^2+1. That observation is the whole idea behind u-substitution, and this calculator applies it step by step so you can follow the transformation from the messy original to the simple integral underneath.
The formula
Formula: Let u = g(x), then du = g'(x) dx, and the integral of f(g(x)) x g'(x) dx equals the integral of f(u) du.
In plain words: pick the inner function and call it u. Rewrite every x in terms of u, including the dx, which becomes du divided by the inner derivative. What remains is an integral in u alone, usually one you already know how to do. The last and most commonly skipped step is to substitute back: replace u with g(x) before presenting the answer, because the original problem was asked in terms of x.
How to use the calculator
- Enter the integrand, the full expression you want to integrate.
- Tell the tool which expression should become u, or let it detect the inner function.
- Review the du substitution the calculator shows, checking that the derivative matches.
- Read off the integrated result in u, then the back-substitution into x.
A worked example
Take the integral of 2x(x^2+1)^3 with respect to x.
Step 1: choose u = x^2 + 1.
Step 2: differentiate: du/dx = 2x, so du = 2x dx.
Step 3: substitute. The integral becomes the integral of u^3 du.
Step 4: integrate: u^4/4 + C.
Step 5: substitute back: (x^2+1)^4/4 + C.
A quick check by differentiation confirms it: the derivative of (x^2+1)^4/4 is (x^2+1)^3 times 2x, exactly the original integrand. This indefinite integral calculator gives the same answer for the original expression, which is a handy way to confirm your substitution work.
Where substitution shows up in practice
Substitution is the undo button of the chain rule, so it appears wherever rates of change stack inside one another. Physics students meet it in work-energy integrals where velocity hides inside a position function. Economics students meet it when marginal quantities nest inside composite functions. Anyone preparing for exams meets it constantly, since textbook integrals are often designed to reward the one clean substitution. When your problem has bounds, the definite integral calculator takes over, and the area under the curve calculator turns the same machinery toward geometric area.
Common mistakes to avoid
- Substituting u but forgetting to change dx into du, leaving a stray x in the integral.
- Picking the wrong inner function, so the derivative does not appear anywhere in the integrand.
- Forgetting the final back-substitution and handing in an answer in u.
Limits worth knowing
Substitution only helps when the inner derivative is actually present, up to a constant factor. Integrals like the integral of e^(x^2) have no such structure, and no substitution will conjure one. When substitution stalls, the problem may need a different method instead. The result here is an exact mathematical value, useful for study and for checking homework.