Mister Exam

Other calculators

Integral of e^(-x)cos(nx) dx

Limits of integration:

from to
v

The graph:

from to

Piecewise:

The solution

You have entered [src]
  1                
  /                
 |                 
 |   -x            
 |  e  *cos(n*x) dx
 |                 
/                  
0                  
01excos(nx)dx\int\limits_{0}^{1} e^{- x} \cos{\left(n x \right)}\, dx
Detail solution
  1. Use integration by parts:

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

    Let u(x)=cos(nx)u{\left(x \right)} = \cos{\left(n x \right)} and let dv(x)=ex\operatorname{dv}{\left(x \right)} = e^{- x}.

    Then du(x)=nsin(nx)\operatorname{du}{\left(x \right)} = - n \sin{\left(n x \right)}.

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

    1. There are multiple ways to do this integral.

      Method #1

      1. Let u=xu = - x.

        Then let du=dxdu = - dx and substitute du- du:

        eudu\int e^{u}\, du

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

          (eu)du=eudu\int \left(- e^{u}\right)\, du = - \int e^{u}\, du

          1. The integral of the exponential function is itself.

            eudu=eu\int e^{u}\, du = e^{u}

          So, the result is: eu- e^{u}

        Now substitute uu back in:

        ex- e^{- x}

      Method #2

      1. Let u=exu = e^{- x}.

        Then let du=exdxdu = - e^{- x} dx and substitute du- du:

        1du\int 1\, du

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

          (1)du=1du\int \left(-1\right)\, du = - \int 1\, du

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

            1du=u\int 1\, du = u

          So, the result is: u- u

        Now substitute uu back in:

        ex- e^{- x}

    Now evaluate the sub-integral.

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

    nexsin(nx)dx=nexsin(nx)dx\int n e^{- x} \sin{\left(n x \right)}\, dx = n \int e^{- x} \sin{\left(n 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)=sin(nx)u{\left(x \right)} = \sin{\left(n x \right)} and let dv(x)=ex\operatorname{dv}{\left(x \right)} = e^{- x}.

      Then du(x)=ncos(nx)\operatorname{du}{\left(x \right)} = n \cos{\left(n x \right)}.

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

      1. Let u=xu = - x.

        Then let du=dxdu = - dx and substitute du- du:

        eudu\int e^{u}\, du

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

          (eu)du=eudu\int \left(- e^{u}\right)\, du = - \int e^{u}\, du

          1. The integral of the exponential function is itself.

            eudu=eu\int e^{u}\, du = e^{u}

          So, the result is: eu- e^{u}

        Now substitute uu back in:

        ex- e^{- x}

      Now evaluate the sub-integral.

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

      (nexcos(nx))dx=nexcos(nx)dx\int \left(- n e^{- x} \cos{\left(n x \right)}\right)\, dx = - n \int e^{- x} \cos{\left(n x \right)}\, dx

      1. Don't know the steps in finding this integral.

        But the integral is

        {xexsinh(x)2+xexcosh(x)2excosh(x)2forn=in=insin(nx)n2ex+excos(nx)n2ex+exotherwise\begin{cases} \frac{x e^{- x} \sinh{\left(x \right)}}{2} + \frac{x e^{- x} \cosh{\left(x \right)}}{2} - \frac{e^{- x} \cosh{\left(x \right)}}{2} & \text{for}\: n = - i \vee n = i \\\frac{n \sin{\left(n x \right)}}{n^{2} e^{x} + e^{x}} - \frac{\cos{\left(n x \right)}}{n^{2} e^{x} + e^{x}} & \text{otherwise} \end{cases}

      So, the result is: n({xexsinh(x)2+xexcosh(x)2excosh(x)2forn=in=insin(nx)n2ex+excos(nx)n2ex+exotherwise)- n \left(\begin{cases} \frac{x e^{- x} \sinh{\left(x \right)}}{2} + \frac{x e^{- x} \cosh{\left(x \right)}}{2} - \frac{e^{- x} \cosh{\left(x \right)}}{2} & \text{for}\: n = - i \vee n = i \\\frac{n \sin{\left(n x \right)}}{n^{2} e^{x} + e^{x}} - \frac{\cos{\left(n x \right)}}{n^{2} e^{x} + e^{x}} & \text{otherwise} \end{cases}\right)

    So, the result is: n(n({xexsinh(x)2+xexcosh(x)2excosh(x)2forn=in=insin(nx)n2ex+excos(nx)n2ex+exotherwise)exsin(nx))n \left(n \left(\begin{cases} \frac{x e^{- x} \sinh{\left(x \right)}}{2} + \frac{x e^{- x} \cosh{\left(x \right)}}{2} - \frac{e^{- x} \cosh{\left(x \right)}}{2} & \text{for}\: n = - i \vee n = i \\\frac{n \sin{\left(n x \right)}}{n^{2} e^{x} + e^{x}} - \frac{\cos{\left(n x \right)}}{n^{2} e^{x} + e^{x}} & \text{otherwise} \end{cases}\right) - e^{- x} \sin{\left(n x \right)}\right)

  3. Now simplify:

    {(n2(xsinh(x)+xcosh(x)cosh(x))2nsin(nx)+cos(nx))exforn=in=i(nsin(nx)cos(nx))exn2+1otherwise\begin{cases} - \left(\frac{n^{2} \left(x \sinh{\left(x \right)} + x \cosh{\left(x \right)} - \cosh{\left(x \right)}\right)}{2} - n \sin{\left(n x \right)} + \cos{\left(n x \right)}\right) e^{- x} & \text{for}\: n = - i \vee n = i \\\frac{\left(n \sin{\left(n x \right)} - \cos{\left(n x \right)}\right) e^{- x}}{n^{2} + 1} & \text{otherwise} \end{cases}

  4. Add the constant of integration:

    {(n2(xsinh(x)+xcosh(x)cosh(x))2nsin(nx)+cos(nx))exforn=in=i(nsin(nx)cos(nx))exn2+1otherwise+constant\begin{cases} - \left(\frac{n^{2} \left(x \sinh{\left(x \right)} + x \cosh{\left(x \right)} - \cosh{\left(x \right)}\right)}{2} - n \sin{\left(n x \right)} + \cos{\left(n x \right)}\right) e^{- x} & \text{for}\: n = - i \vee n = i \\\frac{\left(n \sin{\left(n x \right)} - \cos{\left(n x \right)}\right) e^{- x}}{n^{2} + 1} & \text{otherwise} \end{cases}+ \mathrm{constant}


The answer is:

{(n2(xsinh(x)+xcosh(x)cosh(x))2nsin(nx)+cos(nx))exforn=in=i(nsin(nx)cos(nx))exn2+1otherwise+constant\begin{cases} - \left(\frac{n^{2} \left(x \sinh{\left(x \right)} + x \cosh{\left(x \right)} - \cosh{\left(x \right)}\right)}{2} - n \sin{\left(n x \right)} + \cos{\left(n x \right)}\right) e^{- x} & \text{for}\: n = - i \vee n = i \\\frac{\left(n \sin{\left(n x \right)} - \cos{\left(n x \right)}\right) e^{- x}}{n^{2} + 1} & \text{otherwise} \end{cases}+ \mathrm{constant}

The answer (Indefinite) [src]
                           /  //           -x              -x      -x                               \               \               
  /                        |  ||  cosh(x)*e     x*cosh(x)*e     x*e  *sinh(x)                       |               |               
 |                         |  ||- ----------- + ------------- + -------------  for Or(n = -I, n = I)|               |               
 |  -x                     |  ||       2              2               2                             |    -x         |             -x
 | e  *cos(n*x) dx = C - n*|n*|<                                                                    | - e  *sin(n*x)| - cos(n*x)*e  
 |                         |  ||             cos(n*x)    n*sin(n*x)                                 |               |               
/                          |  ||          - ---------- + ----------                  otherwise      |               |               
                           |  ||             2  x    x    2  x    x                                 |               |               
                           \  \\            n *e  + e    n *e  + e                                  /               /               
ex(nsin(nx)cos(nx))n2+1{{e^ {- x }\,\left(n\,\sin \left(n\,x\right)-\cos \left(n\,x\right) \right)}\over{n^2+1}}
The answer [src]
  1       cos(n)    n*sin(n)
------ - -------- + --------
     2          2          2
1 + n    e + e*n    e + e*n 
nsin(n)en2+ecos(n)en2+e+1n2+1\frac{n \sin{\left(n \right)}}{e n^{2} + e} - \frac{\cos{\left(n \right)}}{e n^{2} + e} + \frac{1}{n^{2} + 1}
=
=
  1       cos(n)    n*sin(n)
------ - -------- + --------
     2          2          2
1 + n    e + e*n    e + e*n 
nsin(n)en2+ecos(n)en2+e+1n2+1\frac{n \sin{\left(n \right)}}{e n^{2} + e} - \frac{\cos{\left(n \right)}}{e n^{2} + e} + \frac{1}{n^{2} + 1}

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