Mister Exam

Other calculators


(sinx-cosx)^2

Integral of (sinx-cosx)^2 dx

Limits of integration:

from to
v

The graph:

from to

Piecewise:

The solution

You have entered [src]
  1                      
  /                      
 |                       
 |                   2   
 |  (sin(x) - cos(x))  dx
 |                       
/                        
0                        
01(sin(x)cos(x))2dx\int\limits_{0}^{1} \left(\sin{\left(x \right)} - \cos{\left(x \right)}\right)^{2}\, dx
Integral((sin(x) - cos(x))^2, (x, 0, 1))
Detail solution
  1. There are multiple ways to do this integral.

    Method #1

    1. Rewrite the integrand:

      (sin(x)cos(x))2=sin2(x)2sin(x)cos(x)+cos2(x)\left(\sin{\left(x \right)} - \cos{\left(x \right)}\right)^{2} = \sin^{2}{\left(x \right)} - 2 \sin{\left(x \right)} \cos{\left(x \right)} + \cos^{2}{\left(x \right)}

    2. Integrate term-by-term:

      1. Rewrite the integrand:

        sin2(x)=12cos(2x)2\sin^{2}{\left(x \right)} = \frac{1}{2} - \frac{\cos{\left(2 x \right)}}{2}

      2. Integrate term-by-term:

        1. The integral of a constant is the constant times the variable of integration:

          12dx=x2\int \frac{1}{2}\, dx = \frac{x}{2}

        1. The integral of a constant times a function is the constant times the integral of the function:

          (cos(2x)2)dx=cos(2x)dx2\int \left(- \frac{\cos{\left(2 x \right)}}{2}\right)\, dx = - \frac{\int \cos{\left(2 x \right)}\, dx}{2}

          1. Let u=2xu = 2 x.

            Then let du=2dxdu = 2 dx and substitute du2\frac{du}{2}:

            cos(u)2du\int \frac{\cos{\left(u \right)}}{2}\, du

            1. The integral of a constant times a function is the constant times the integral of the function:

              cos(u)du=cos(u)du2\int \cos{\left(u \right)}\, du = \frac{\int \cos{\left(u \right)}\, du}{2}

              1. The integral of cosine is sine:

                cos(u)du=sin(u)\int \cos{\left(u \right)}\, du = \sin{\left(u \right)}

              So, the result is: sin(u)2\frac{\sin{\left(u \right)}}{2}

            Now substitute uu back in:

            sin(2x)2\frac{\sin{\left(2 x \right)}}{2}

          So, the result is: sin(2x)4- \frac{\sin{\left(2 x \right)}}{4}

        The result is: x2sin(2x)4\frac{x}{2} - \frac{\sin{\left(2 x \right)}}{4}

      1. The integral of a constant times a function is the constant times the integral of the function:

        (2sin(x)cos(x))dx=2sin(x)cos(x)dx\int \left(- 2 \sin{\left(x \right)} \cos{\left(x \right)}\right)\, dx = - 2 \int \sin{\left(x \right)} \cos{\left(x \right)}\, dx

        1. There are multiple ways to do this integral.

          Method #1

          1. Let u=cos(x)u = \cos{\left(x \right)}.

            Then let du=sin(x)dxdu = - \sin{\left(x \right)} dx and substitute du- du:

            (u)du\int \left(- u\right)\, du

            1. The integral of a constant times a function is the constant times the integral of the function:

              udu=udu\int u\, du = - \int u\, du

              1. The integral of unu^{n} is un+1n+1\frac{u^{n + 1}}{n + 1} when n1n \neq -1:

                udu=u22\int u\, du = \frac{u^{2}}{2}

              So, the result is: u22- \frac{u^{2}}{2}

            Now substitute uu back in:

            cos2(x)2- \frac{\cos^{2}{\left(x \right)}}{2}

          Method #2

          1. Let u=sin(x)u = \sin{\left(x \right)}.

            Then let du=cos(x)dxdu = \cos{\left(x \right)} dx and substitute dudu:

            udu\int u\, du

            1. The integral of unu^{n} is un+1n+1\frac{u^{n + 1}}{n + 1} when n1n \neq -1:

              udu=u22\int u\, du = \frac{u^{2}}{2}

            Now substitute uu back in:

            sin2(x)2\frac{\sin^{2}{\left(x \right)}}{2}

        So, the result is: cos2(x)\cos^{2}{\left(x \right)}

      1. Rewrite the integrand:

        cos2(x)=cos(2x)2+12\cos^{2}{\left(x \right)} = \frac{\cos{\left(2 x \right)}}{2} + \frac{1}{2}

      2. Integrate term-by-term:

        1. The integral of a constant times a function is the constant times the integral of the function:

          cos(2x)2dx=cos(2x)dx2\int \frac{\cos{\left(2 x \right)}}{2}\, dx = \frac{\int \cos{\left(2 x \right)}\, dx}{2}

          1. Let u=2xu = 2 x.

            Then let du=2dxdu = 2 dx and substitute du2\frac{du}{2}:

            cos(u)2du\int \frac{\cos{\left(u \right)}}{2}\, du

            1. The integral of a constant times a function is the constant times the integral of the function:

              cos(u)du=cos(u)du2\int \cos{\left(u \right)}\, du = \frac{\int \cos{\left(u \right)}\, du}{2}

              1. The integral of cosine is sine:

                cos(u)du=sin(u)\int \cos{\left(u \right)}\, du = \sin{\left(u \right)}

              So, the result is: sin(u)2\frac{\sin{\left(u \right)}}{2}

            Now substitute uu back in:

            sin(2x)2\frac{\sin{\left(2 x \right)}}{2}

          So, the result is: sin(2x)4\frac{\sin{\left(2 x \right)}}{4}

        1. The integral of a constant is the constant times the variable of integration:

          12dx=x2\int \frac{1}{2}\, dx = \frac{x}{2}

        The result is: x2+sin(2x)4\frac{x}{2} + \frac{\sin{\left(2 x \right)}}{4}

      The result is: x+cos2(x)x + \cos^{2}{\left(x \right)}

    Method #2

    1. Rewrite the integrand:

      (sin(x)cos(x))2=sin2(x)2sin(x)cos(x)+cos2(x)\left(\sin{\left(x \right)} - \cos{\left(x \right)}\right)^{2} = \sin^{2}{\left(x \right)} - 2 \sin{\left(x \right)} \cos{\left(x \right)} + \cos^{2}{\left(x \right)}

    2. Integrate term-by-term:

      1. Rewrite the integrand:

        sin2(x)=12cos(2x)2\sin^{2}{\left(x \right)} = \frac{1}{2} - \frac{\cos{\left(2 x \right)}}{2}

      2. Integrate term-by-term:

        1. The integral of a constant is the constant times the variable of integration:

          12dx=x2\int \frac{1}{2}\, dx = \frac{x}{2}

        1. The integral of a constant times a function is the constant times the integral of the function:

          (cos(2x)2)dx=cos(2x)dx2\int \left(- \frac{\cos{\left(2 x \right)}}{2}\right)\, dx = - \frac{\int \cos{\left(2 x \right)}\, dx}{2}

          1. Let u=2xu = 2 x.

            Then let du=2dxdu = 2 dx and substitute du2\frac{du}{2}:

            cos(u)2du\int \frac{\cos{\left(u \right)}}{2}\, du

            1. The integral of a constant times a function is the constant times the integral of the function:

              cos(u)du=cos(u)du2\int \cos{\left(u \right)}\, du = \frac{\int \cos{\left(u \right)}\, du}{2}

              1. The integral of cosine is sine:

                cos(u)du=sin(u)\int \cos{\left(u \right)}\, du = \sin{\left(u \right)}

              So, the result is: sin(u)2\frac{\sin{\left(u \right)}}{2}

            Now substitute uu back in:

            sin(2x)2\frac{\sin{\left(2 x \right)}}{2}

          So, the result is: sin(2x)4- \frac{\sin{\left(2 x \right)}}{4}

        The result is: x2sin(2x)4\frac{x}{2} - \frac{\sin{\left(2 x \right)}}{4}

      1. The integral of a constant times a function is the constant times the integral of the function:

        (2sin(x)cos(x))dx=2sin(x)cos(x)dx\int \left(- 2 \sin{\left(x \right)} \cos{\left(x \right)}\right)\, dx = - 2 \int \sin{\left(x \right)} \cos{\left(x \right)}\, dx

        1. Let u=cos(x)u = \cos{\left(x \right)}.

          Then let du=sin(x)dxdu = - \sin{\left(x \right)} dx and substitute du- du:

          (u)du\int \left(- u\right)\, du

          1. The integral of a constant times a function is the constant times the integral of the function:

            udu=udu\int u\, du = - \int u\, du

            1. The integral of unu^{n} is un+1n+1\frac{u^{n + 1}}{n + 1} when n1n \neq -1:

              udu=u22\int u\, du = \frac{u^{2}}{2}

            So, the result is: u22- \frac{u^{2}}{2}

          Now substitute uu back in:

          cos2(x)2- \frac{\cos^{2}{\left(x \right)}}{2}

        So, the result is: cos2(x)\cos^{2}{\left(x \right)}

      1. Rewrite the integrand:

        cos2(x)=cos(2x)2+12\cos^{2}{\left(x \right)} = \frac{\cos{\left(2 x \right)}}{2} + \frac{1}{2}

      2. Integrate term-by-term:

        1. The integral of a constant times a function is the constant times the integral of the function:

          cos(2x)2dx=cos(2x)dx2\int \frac{\cos{\left(2 x \right)}}{2}\, dx = \frac{\int \cos{\left(2 x \right)}\, dx}{2}

          1. Let u=2xu = 2 x.

            Then let du=2dxdu = 2 dx and substitute du2\frac{du}{2}:

            cos(u)2du\int \frac{\cos{\left(u \right)}}{2}\, du

            1. The integral of a constant times a function is the constant times the integral of the function:

              cos(u)du=cos(u)du2\int \cos{\left(u \right)}\, du = \frac{\int \cos{\left(u \right)}\, du}{2}

              1. The integral of cosine is sine:

                cos(u)du=sin(u)\int \cos{\left(u \right)}\, du = \sin{\left(u \right)}

              So, the result is: sin(u)2\frac{\sin{\left(u \right)}}{2}

            Now substitute uu back in:

            sin(2x)2\frac{\sin{\left(2 x \right)}}{2}

          So, the result is: sin(2x)4\frac{\sin{\left(2 x \right)}}{4}

        1. The integral of a constant is the constant times the variable of integration:

          12dx=x2\int \frac{1}{2}\, dx = \frac{x}{2}

        The result is: x2+sin(2x)4\frac{x}{2} + \frac{\sin{\left(2 x \right)}}{4}

      The result is: x+cos2(x)x + \cos^{2}{\left(x \right)}

  2. Add the constant of integration:

    x+cos2(x)+constantx + \cos^{2}{\left(x \right)}+ \mathrm{constant}


The answer is:

x+cos2(x)+constantx + \cos^{2}{\left(x \right)}+ \mathrm{constant}

The answer (Indefinite) [src]
  /                                       
 |                                        
 |                  2                 2   
 | (sin(x) - cos(x))  dx = C + x + cos (x)
 |                                        
/                                         
(sin(x)cos(x))2dx=C+x+cos2(x)\int \left(\sin{\left(x \right)} - \cos{\left(x \right)}\right)^{2}\, dx = C + x + \cos^{2}{\left(x \right)}
The graph
0.001.000.100.200.300.400.500.600.700.800.9002
The answer [src]
   2   
cos (1)
cos2(1)\cos^{2}{\left(1 \right)}
=
=
   2   
cos (1)
cos2(1)\cos^{2}{\left(1 \right)}
cos(1)^2
Numerical answer [src]
0.291926581726429
0.291926581726429
The graph
Integral of (sinx-cosx)^2 dx

    Use the examples entering the upper and lower limits of integration.