# Solving an integral with a second variable?

$$\int_{0}^{\frac π2}sin^n(x)\cdot cos(x)\, dx\tag{1}$$

What to do about the variable $n$, if no information is given about it other than $n \ge 0$ ?

• Try using the sub $\sin (x) = u$ and follow through – Chinny84 Sep 13 '16 at 23:52
• Treat $n$ as a general exponent. How would you solve this if $n=1$ or $n=2$? Then use the same technique with an arbitrary $n$. – Dave Sep 13 '16 at 23:52

In general $u^n.u'$ has, for antiderivative $\frac{u^{n+1}}{n+1}$. Then, your integral reads $$\int_{0}^{\frac π2}sin^n(x)\cdot cos(x)\, dx=\int_{0}^{\frac π2}sin^n(x)\, d\big(sin(x)\big)=\Big[\frac{sin^{n+1}(x)}{n+1}\Big]_0^{\frac π2}=\frac{1}{n+1}$$ And $n$ can be any positive real. Hope it helps.

• @KonKan Thanks for your edits. – Duchamp Gérard H. E. Sep 14 '16 at 0:40
• thank you! I figured I could just keep n as a variable, but just wasn't sure if there was something more. your explanation made perfect sense – gticecream8 Sep 14 '16 at 2:30

We can use the substitution $u=\sin x, du = \cos x\ dx$ to get:

$$\int_0^1 u^n\ du$$

$$\frac{u^{n+1}}{n+1} \bigg|_0^1$$

$$\frac{1}{n+1}$$

Generally speaking, we can just integrate normally with $n$ as a variable, and nothing should go wrong.

Just an interesting note: this is one representation of the more general Beta Integral, which is the integral of the form

$$\int_0^1 t^{x-1}(1-t)^{y-1}\ dt$$

This can also be expressed, through substitution, as

$$2\int_0^{\frac{\pi}{2}} \sin^{2x-1}\theta\cos^{2y-1}\theta\ d\theta$$

and can be written in terms of the Gamma function as

$$\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}$$

You can derive the above result for your integral using this more general formula, and using the recurrence relation $\Gamma(x+1) = x\Gamma(x)$.