A definite integral with two different answers

I am trying to solve the following definite integral. It seems to have two different results if the integral is solved by two different methods. (Since this equation is a part of a larger system of equations), It’s important that the ambiguity of the results be removed i.e. only one result should be valid. $$\int_{0}^{\pi /2}\sin \theta \cos ^2 \theta\ d\theta$$ Method 1 Integration by substitution:

Method2 Integration by parts:

Now, it appears to me that both methods are valid even though the results obtained from them differ. Please advise **which one is the correct answer?**

• Welcome to stackexchange. Your question has been answered, even though you didn't know (so didn't follow) the usual conventions here: it's best to write the problem in the question rather than linking to an image, and it's best to show what you tried yourself and where you are stuck. Do that for future questions. Oct 7, 2017 at 13:44

In your integration by substitution method, when you apply the substitution, you need to find what $du$ is in terms of $d\theta$ and substitute this into the integral.
$$u=\sin \theta$$ $$du=\cos \theta d \theta$$
The first method is not correct, you have forget to express $d\theta$ with $du$,
$u=sin\theta$, $du=cos\theta d\theta=\sqrt{1-u^2}du$
$\int sin\theta cos^2\theta d\theta=\int u(1-u^2){1\over\sqrt{1-u^2}}du$