I just learnt about integration by substitution and do not understand why parts of the integration cancel out.

For example

$$\int\cos x\sqrt{1+\sin x} dx$$

where $u = 1+\sin x$. Therefore we integrate $$\int(u-1)u^3 du$$

as $$\begin{split} u &= 1+\sin x\\ \sin x &= u-1\\ dx&= \frac{du}{\cos x}\\ \end{split}$$

Why is it that when we put this together as follows

$$\int (\cos x)(u-1)u^3 \frac{du}{\cos x}$$

the $\cos x$ and $\frac{du}{\cos x}$ cancel out.

What does $\frac{du}{\cos x}$ actually mean, that may help me understand?

We are not multiplying the integral are we $(\int (\cos x)(u-1)u^3\frac{du}{\cos x})$ - so that is why is cancels out.

  • 1
    $\begingroup$ The justification lies in working backwards. Start with $\int (u-1)u^{3}du$ and check that this becomes the original integral when $u=1+\sin x$. $\endgroup$ Commented Mar 2, 2023 at 11:47
  • $\begingroup$ To integrate $\int cos(x)(1+ sin(x))^{1/2} dx$ let u= 1+ sin(x) so du= cos(x) dx. Do NOT think "$dx= \frac{du}{cos(x)}$" but rather that the integral can be written $\int (1+ sin(x))^{1/2} (cos(x)dx)= \int u^{1/2}du[/math]. $\endgroup$ Commented Mar 2, 2023 at 13:10
  • $\begingroup$ If $u=1+\sin x$, how does the $(u-1)u^3$ come from $\int \cos x \sqrt{1+\sin x}\ dx$? $\endgroup$
    – peterwhy
    Commented Mar 2, 2023 at 14:33

2 Answers 2


When considering this integral, you have the correct $u$ for the substitution; however, you are attempting a u-sub-back-sub, which isn't a technique required for this problem.

If you let $u=1+\sin(x)$, then you can think of the derivative as $\displaystyle \frac{du}{dx}=\cos(x)$, which we can, in turn, write as $du=\cos(x)dx$. This is technically an abuse of the differential notation; however, it is an excellent visual and tracks.

So, with that choice of $u$, you can rewrite the integral as

$$ \int\sqrt{1+\sin(x)} \cos(x)dx, \text{ move the cosine to the end by commutativity of multiplication.}$$

$$ \stackrel{u-sub}{=}\int\sqrt{u}\,du, \text{the cos(x) dx term becomes du entirely.} $$

From there, the standard power rule for integration is applied, and substituting your original $u$ back into the resulting antiderivative gives the correct result.


There are two schools of thought on differentials. One is that they only exist within derivatives. That is, $du$ is a somewhat non-sensical term on its own, but $\frac{du}{dx}$ is fine. The other is that differentials represent actual, distinct numbers/concepts on their own, and thus are more-or-less "free-living". You can read $du$ as "an infinitely small change in the variable $u$ coordinated in size with other infinitely small changes to other variables in the equation." For a more rigorous approach, see Fite's "Total and Partial Differentials...". With this approach, derivatives are just ratios of differentials (note that this has additional implications when dealing with partial differentials or higher-order differentials, for which I would refer you to the paper).

As a free-living entity, $du$ can be put into ratio with anything, though. So, $\frac{du}{\cos(x)}$ is literally just the ratio given, just like any other ratio. Therefore, the $\cos(x)$'s can cancel just like for any other fraction.

All that being said, I think that @ethansmith's approach was more straightforward, but even there I would say that writing $du = \cos(x)\,dx$ isn't an abuse of notation (if you take the view as I do that $du$ can be a free-living entity).


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .