What is the integral of sin(x) dx from 0 to 2pi?

2 Answers
Jul 4, 2015

Using the definition of the integral and the fact that #sinx# is an odd function, from #0# to #2pi#, with equal area under the curve at #[0, pi]# and above the curve at #[pi, 2pi]#, the integral is #0#.

This holds true for any time #sinx# is evaluated with an integral across a domain where it is symmetrically above and below the x-axis.

#int_0^(2pi) sinxdx = [-cosx]|_(0)^(2pi)#

#= -cos2pi - (-cos0)#

#= -1 - (- 1) = 0#

Apr 24, 2016

An alternative way to do this starting from the limit definition is:

#int_(a)^(b) f(x)dx = lim_(n->oo) sum_(i=1)^N f(x_i^"*")Deltax#

where:

  • #n# is the number of rectangles used to approximate the integral, i.e. the area between the curve and the x-axis.
  • #i# is the index of each rectangle in #[0,2pi]#.
  • #N# is the index of the final rectangle in #[0,2pi]#.
  • #f(x_i^"*")# is the height of each given rectangle in #[0,2pi]#, which varies as #sin(x)#.
  • #Deltax# is the width of each given rectangle in #[0,2pi]#, which converges to #0# as #n->oo#.

If we use the midpoint-rectangular approximation method (MRAM), we choose a convenient interval #Deltax# such that we can find a midpoint for each rectangle of dimension #Deltax xx f(x_i^"*")#, where the midpoint of the #i#th rectangle is defined as

#M_i = x_(i-1)+(x_i - x_(i-1))/2#.

Let us choose #Deltax = pi/2# such that #x = {0,pi/2,pi,(3pi)/2,2pi}# for #[0,2pi]# and #n = {1,2,3,4}#.

Then each rectangle's width is #pi/2#, and:

  • Rectangle #1# spans #[0,pi/2]#.
  • Rectangle #2# spans #[pi/2,pi]#.
  • Rectangle #3# spans #[pi,(3pi)/2]#.
  • Rectangle #4# spans #[(3pi)/2,2pi]#.

Each corresponds to an #f(x_i^"*")# that gives you the height of the #i#th rectangle as

#f(x_1^"*") ~~ f(M_1) = sin(x_0+(x_1-x_0)/2) = sin(pi/4) = sqrt2/2,#

#f(x_2^"*") ~~ f(M_2) = sin(x_1+(x_2-x_1)/2) = sin((3pi)/4) = sqrt2/2,#

#f(x_3^"*") ~~ f(M_3) = sin(x_2+(x_3-x_2)/2) = sin((5pi)/4) = -sqrt2/2,#

#f(x_4^"*") ~~ f(M_4) = sin(x_3+(x_4-x_3)/2) = sin((7pi)/4) = -sqrt2/2.#

In the end, what you get from MRAM is the following result:

#color(blue)(int_(0)^(2pi) sin(x)dx ~~ lim_(n->4) sum_(i=1)^4 sin(M_i)Deltax)#

#= (sin(pi/4) + sin((3pi)/4) + sin((5pi)/4) + sin((7pi)/4))*Deltax#

#= (sqrt2/2 + sqrt2/2 - sqrt2/2 - sqrt2/2) * pi/2#

#= color(blue)(0)#

Which is not surprising given that #sin(x)# in #[0,pi]# is equal to #-sin(x)# in #[pi,2pi]#, which means that

#int_(0)^(pi) sinxdx = -int_(pi)^(2pi) sinxdx#,

and thus:

#color(green)(int_(0)^(2pi) sinxdx)#

#= int_(0)^(pi) sinxdx + int_(pi)^(2pi) sinxdx#

#= color(green)(0)#,

regardless of the chosen method.

Note that RRAM, LRAM, and MRAM are approximations, so it was a coincidence that it gave the exact answer.