Integration by Parts Calculator

Type a product such as x sin(x) or ln(x) to integrate it by parts.

Use x. Type powers with ^, and functions with brackets: sin(x), e^(2x), ln(x), sqrt(x).

Try

Result

You entered∫x sin⁡x dx\int x\,\sin x\,dx

∫x sin⁡x dx=sin⁡x−x cos⁡x+C\displaystyle \int x\,\sin x\,dx = \sin x - x\,\cos x + C
Show the work
  1. Integration by parts

    LIATE (logarithmic, inverse trigonometric, algebraic, trigonometric, exponential) puts algebraic before trigonometric, so u=xu = x and dv=sin⁡x dxdv = \sin x\,dx.

    Using ∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du

    u=x, dv=sin⁡x dx  ⇒  du=1 dx, v=−cos⁡xu = x,\ dv = \sin x\,dx \;\Rightarrow\; du = 1\,dx,\ v = -\cos x
  2. Integral of sine

    This is one of the basic integrals, so the answer is read straight from the table.

    ∫sin⁡x dx=−cos⁡x+C=−cos⁡x\begin{aligned} \int \sin x\,dx &= -\cos x + C \\ &= -\cos x \end{aligned}
  3. Apply the formula

    Substitute into uv−∫v duuv - \int v\,du and integrate what is left.

    ∫x sin⁡x dx=−x cos⁡x−∫−cos⁡x dx\int x\,\sin x\,dx = -x\,\cos x - \int -\cos x\,dx
  4. Constant multiple rule

    The minus sign can be moved outside the integral.

    Using ∫c f(x) dx=c∫f(x) dx\int c\,f(x)\,dx = c\int f(x)\,dx

    ∫−cos⁡x dx=−∫cos⁡x dx\int -\cos x\,dx = -\int \cos x\,dx
  5. Integral of cosine

    This is one of the basic integrals, so the answer is read straight from the table.

    ∫cos⁡x dx=sin⁡x+C=sin⁡x\begin{aligned} \int \cos x\,dx &= \sin x + C \\ &= \sin x \end{aligned}
  6. Collect the result

    Put the pieces together.

    ∫x sin⁡x dx=−x cos⁡x+sin⁡x\int x\,\sin x\,dx = -x\,\cos x + \sin x
  7. Result

    An antiderivative is only defined up to a constant, so the constant of integration CC is added.

    ∫x sin⁡x dx=sin⁡x−x cos⁡x+C\int x\,\sin x\,dx = \sin x - x\,\cos x + C

Worked examples