Mister Exam

Other calculators


(x^2+2x)*cos(x)

Integral of (x^2+2x)*cos(x) dx

Limits of integration:

from to
v

The graph:

from to

Piecewise:

The solution

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

    Method #1

    1. Rewrite the integrand:

      (x2+2x)cos(x)=x2cos(x)+2xcos(x)\left(x^{2} + 2 x\right) \cos{\left(x \right)} = x^{2} \cos{\left(x \right)} + 2 x \cos{\left(x \right)}

    2. Integrate term-by-term:

      1. Use integration by parts:

        udv=uvvdu\int \operatorname{u} \operatorname{dv} = \operatorname{u}\operatorname{v} - \int \operatorname{v} \operatorname{du}

        Let u(x)=x2u{\left(x \right)} = x^{2} and let dv(x)=cos(x)\operatorname{dv}{\left(x \right)} = \cos{\left(x \right)}.

        Then du(x)=2x\operatorname{du}{\left(x \right)} = 2 x.

        To find v(x)v{\left(x \right)}:

        1. The integral of cosine is sine:

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

        Now evaluate the sub-integral.

      2. Use integration by parts:

        udv=uvvdu\int \operatorname{u} \operatorname{dv} = \operatorname{u}\operatorname{v} - \int \operatorname{v} \operatorname{du}

        Let u(x)=2xu{\left(x \right)} = 2 x and let dv(x)=sin(x)\operatorname{dv}{\left(x \right)} = \sin{\left(x \right)}.

        Then du(x)=2\operatorname{du}{\left(x \right)} = 2.

        To find v(x)v{\left(x \right)}:

        1. The integral of sine is negative cosine:

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

        Now evaluate the sub-integral.

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

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

        1. The integral of cosine is sine:

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

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

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

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

        1. Use integration by parts:

          udv=uvvdu\int \operatorname{u} \operatorname{dv} = \operatorname{u}\operatorname{v} - \int \operatorname{v} \operatorname{du}

          Let u(x)=xu{\left(x \right)} = x and let dv(x)=cos(x)\operatorname{dv}{\left(x \right)} = \cos{\left(x \right)}.

          Then du(x)=1\operatorname{du}{\left(x \right)} = 1.

          To find v(x)v{\left(x \right)}:

          1. The integral of cosine is sine:

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

          Now evaluate the sub-integral.

        2. The integral of sine is negative cosine:

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

        So, the result is: 2xsin(x)+2cos(x)2 x \sin{\left(x \right)} + 2 \cos{\left(x \right)}

      The result is: x2sin(x)+2xsin(x)+2xcos(x)2sin(x)+2cos(x)x^{2} \sin{\left(x \right)} + 2 x \sin{\left(x \right)} + 2 x \cos{\left(x \right)} - 2 \sin{\left(x \right)} + 2 \cos{\left(x \right)}

    Method #2

    1. Use integration by parts:

      udv=uvvdu\int \operatorname{u} \operatorname{dv} = \operatorname{u}\operatorname{v} - \int \operatorname{v} \operatorname{du}

      Let u(x)=x(x+2)u{\left(x \right)} = x \left(x + 2\right) and let dv(x)=cos(x)\operatorname{dv}{\left(x \right)} = \cos{\left(x \right)}.

      Then du(x)=2x+2\operatorname{du}{\left(x \right)} = 2 x + 2.

      To find v(x)v{\left(x \right)}:

      1. The integral of cosine is sine:

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

      Now evaluate the sub-integral.

    2. Use integration by parts:

      udv=uvvdu\int \operatorname{u} \operatorname{dv} = \operatorname{u}\operatorname{v} - \int \operatorname{v} \operatorname{du}

      Let u(x)=2x+2u{\left(x \right)} = 2 x + 2 and let dv(x)=sin(x)\operatorname{dv}{\left(x \right)} = \sin{\left(x \right)}.

      Then du(x)=2\operatorname{du}{\left(x \right)} = 2.

      To find v(x)v{\left(x \right)}:

      1. The integral of sine is negative cosine:

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

      Now evaluate the sub-integral.

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

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

      1. The integral of cosine is sine:

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

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

  2. Now simplify:

    x2sin(x)+22xsin(x+π4)+22cos(x+π4)x^{2} \sin{\left(x \right)} + 2 \sqrt{2} x \sin{\left(x + \frac{\pi}{4} \right)} + 2 \sqrt{2} \cos{\left(x + \frac{\pi}{4} \right)}

  3. Add the constant of integration:

    x2sin(x)+22xsin(x+π4)+22cos(x+π4)+constantx^{2} \sin{\left(x \right)} + 2 \sqrt{2} x \sin{\left(x + \frac{\pi}{4} \right)} + 2 \sqrt{2} \cos{\left(x + \frac{\pi}{4} \right)}+ \mathrm{constant}


The answer is:

x2sin(x)+22xsin(x+π4)+22cos(x+π4)+constantx^{2} \sin{\left(x \right)} + 2 \sqrt{2} x \sin{\left(x + \frac{\pi}{4} \right)} + 2 \sqrt{2} \cos{\left(x + \frac{\pi}{4} \right)}+ \mathrm{constant}

The answer (Indefinite) [src]
  /                                                                                    
 |                                                                                     
 | / 2      \                                        2                                 
 | \x  + 2*x/*cos(x) dx = C - 2*sin(x) + 2*cos(x) + x *sin(x) + 2*x*cos(x) + 2*x*sin(x)
 |                                                                                     
/                                                                                      
(x2+2x)cos(x)dx=C+x2sin(x)+2xsin(x)+2xcos(x)2sin(x)+2cos(x)\int \left(x^{2} + 2 x\right) \cos{\left(x \right)}\, dx = C + x^{2} \sin{\left(x \right)} + 2 x \sin{\left(x \right)} + 2 x \cos{\left(x \right)} - 2 \sin{\left(x \right)} + 2 \cos{\left(x \right)}
The graph
0.001.000.100.200.300.400.500.600.700.800.9005
The answer [src]
-2 + 4*cos(1) + sin(1)
2+sin(1)+4cos(1)-2 + \sin{\left(1 \right)} + 4 \cos{\left(1 \right)}
=
=
-2 + 4*cos(1) + sin(1)
2+sin(1)+4cos(1)-2 + \sin{\left(1 \right)} + 4 \cos{\left(1 \right)}
-2 + 4*cos(1) + sin(1)
Numerical answer [src]
1.00268020828046
1.00268020828046
The graph
Integral of (x^2+2x)*cos(x) dx

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