4

How can I find the definite integral of this trigonometric function?

$$\int_{0}^{2\pi}\cos ^2(x)\sin(x) \ dx$$

Currently my thought process is this:

$$ u = \cos x $$

$$du = -\sin x \ dx $$

$$\int_{0}^{2\pi}-u^2 \ du$$

$$-1\int_{0}^{2\pi}u^2 \ du$$

$$\left.-\frac{u^3}{3}\right\rvert_0^{2\pi} = -([\frac{\cos ^3(2\pi)}{3}] - [\frac{\cos ^3(0)}{3}])$$

$$=-(\frac{1}{3} - \frac{1}{3}) = -(0) = 0$$

Is this correct? Lecturer was rushing through integration quite quickly and my understanding isn't that great. (past exam so I don't have the answers)

Blue
  • 83,939
CFD
  • 123
  • 6
  • 1
    $$\int_{0}^{2\pi}\cos ^2(x)\sin(x) \ dx = \color{red}{ \int_{-\pi}^{\pi}\cos ^2(x)\sin(x) \ dx} $$ because $$\int_{\pi}^{2\pi}\cos ^2(x)\sin(x) \ dx = \int_{-\pi}^{0}\cos ^2(x)\sin(x) \ dx $$ and then you are integrating an odd function over symmetric endpoints – Will Jagy Jun 03 '24 at 02:57
  • 3
    The answer is correct, and the approach is correct in general, but notation-wise, you have not changed the bounds of the integral after substitution. The integral should change to $\int_1^1-u^2du$. This is automatically zero because the bounds are same and it is a continuous function. – Shraiysh Jun 03 '24 at 02:57
  • thanks for pointing it out! Forgot you had to change the bounds. – CFD Jun 03 '24 at 03:03
  • 1
    An alternative approach is to compute $~\displaystyle \frac{d}{dx} \cos^n(x) ~: ~n \in \Bbb{Z^+}.$ – user2661923 Jun 03 '24 at 03:06
  • 1
    If you want some alternative approaches, for what it's worth, a lot of those in this question could probably be leveraged in some form or another – PrincessEev Jun 03 '24 at 03:09
  • @WillJagy There must be sign $\LARGE -$ in the $\color{red}{\tt red\ integral}$. – Felix Marin Jun 03 '24 at 03:25
  • @FelixMarin, no, purely periodic integrand, just shifting integral to a different window of width $2 \pi.$ Or, the argument I made in the second line, explicit shift – Will Jagy Jun 03 '24 at 03:31
  • 1
    Another way is to learn the basics of Fourier series. Or complex exponentials. – Jyrki Lahtonen Jun 03 '24 at 03:41

1 Answers1

1

Yes, your work is correct, aside from the minor typographical error in forgetting to change the limits of integration after the variable substitution. There are no issues with the evaluation of the definite integral because the function $f(x) = \cos^2 x \sin x$ is bounded on $x \in [0, 2\pi]$.

Another way to see that the integral must equal $0$ is to observe that $$f(x + \pi) = \cos^2 (x + \pi) \sin (x + \pi) = \cos^2 x (-\sin x) = -f(x)$$ for all $x$. Therefore, $$\begin{align} \int_{x=0}^{2\pi} f(x) \, dx &= \int_{x=0}^{\pi} f(x) \, dx + \int_{x=\pi}^{2\pi} f(x) \, dx \\ &= \int_{x=0}^{\pi} f(x) \, dx + \int_{x=0}^{\pi} f(x + \pi) \, dx \\ &= \int_{x=0}^{\pi} f(x) \, dx + \int_{x=0}^{\pi} -f(x) \, dx \\ &= \int_{x=0}^{\pi} f(x) - f(x) \, dx \\ &= \int_{x=0}^{\pi} 0 \, dx \\ &= 0. \end{align}$$

heropup
  • 143,828
  • Are you saying that we haven't covered the orthogonality relations needed for the basic Fourier series in another thread, like twelve years ago? – Jyrki Lahtonen Jun 03 '24 at 03:35