Integrals: functions and by parts

Integrals of trigonometric functions

The integral of sin⁡x\sin x is −cos⁡x+C-\cos x+C, and the integral of cos⁡x\cos x is sin⁡x+C\sin x+C.

∫sin⁡x dx=−cos⁡x+C,∫cos⁡x dx=sin⁡x+C\begin{gathered} \int \sin x\,dx=-\cos x+C, \\[4pt] \int \cos x\,dx=\sin x+C \end{gathered}

Read the derivative formulas backwards. Since cos⁡\cos differentiates to −sin⁡-\sin, sin⁡\sin integrates to −cos⁡-\cos. Since sin⁡\sin differentiates to cos⁡\cos, cos⁡\cos integrates to sin⁡\sin.

∫sin⁡x dx=−cos⁡x+C,∫cos⁡x dx=sin⁡x+C\begin{gathered} \int \sin x\,dx=-\cos x+C, \\[4pt] \int \cos x\,dx=\sin x+C \end{gathered}

The sign is the whole game: check by differentiating your answer.

Examples

  1. 01What is this?∫2cos⁡x dx\displaystyle \int 2\cos x\,dxAnswerHide
    Answer2sin⁡x+C\displaystyle 2\sin x+C

    Steps

    1. cos⁡x\cos x integrates to sin⁡x\sin x, and a constant factor just comes along
    2. f(x)\displaystyle f(x)=2sin⁡x\displaystyle = 2\sin xf′(x)\displaystyle f'(x)=2cos⁡x\displaystyle = 2\cos x
    3. Differentiating gets us back; no minus appears
  2. 02What goes in □?∫sin⁡x dx=□cos⁡x+C\displaystyle \int \sin x\,dx = \square\cos x + CAnswerHide
    Answer−1\displaystyle -1

    Steps

    1. cos⁡x\cos x differentiates to −sin⁡x-\sin x, but we want +sin⁡x+\sin x, so put a minus in front
    2. −(−sin⁡x)\displaystyle -(-\sin x)=sin⁡x\displaystyle = \sin x
    3. The two minus signs cancel, so □\square is −1-1
  3. 03What is the value?∫0π2sin⁡x dx\displaystyle \int_{0}^{\frac{\pi}{2}} \sin x\,dxAnswerHide
    Answer1\displaystyle 1

    Steps

    1. sin⁡x\sin x integrates to −cos⁡x-\cos x; subtract the lower end from the upper
    2. −cos⁡π2−(−cos⁡0)\displaystyle -\cos\frac{\pi}{2}-(-\cos 0)=0+1\displaystyle = 0+1=1\displaystyle = 1
  4. 04Which one gets a minus sign when integrated?\displaystyle Asin⁡x\displaystyle \sin xBcos⁡x\displaystyle \cos xC1x\displaystyle \frac{1}{x}Dex\displaystyle e^{x}AnswerHide
    Answersin⁡x\displaystyle \sin x

    Steps

    1. Differentiating −cos⁡x-\cos x brings back sin⁡x\sin x, so integrating sin⁡x\sin x needs the minus
    2. −(−sin⁡x)\displaystyle -(-\sin x)=sin⁡x\displaystyle = \sin x
    3. The others do not: cos⁡x\cos x gives sin⁡x\sin x, exe^{x} gives exe^{x}, x2x^{2} gives x33\dfrac{x^{3}}{3}
  5. 05Find the value∫0π/3cos⁡x dx\displaystyle \int_0^{\pi/3} \cos x \, dxAnswerHide
    Answer32\displaystyle \frac{\sqrt{3}}{2}
  6. 06Integrate∫sin⁡x dx\displaystyle \int \sin x \, dxAnswerHide
    Answer−cos⁡x+C\displaystyle -\cos x + C

FAQ

Why does ∫sin⁡x dx\int \sin x\,dx have a minus sign?
Because differentiating −cos⁡x-\cos x gives back sin⁡x\sin x. Differentiating your answer to check it prevents sign mistakes.

Published 2026-09-03 · Updated 2026-10-14