Integral of Cos x

Integrating cos x gives sin x plus a constant; use this when you need to find areas under cosine curves or solve differential equations.

cosxdx=sinx+C\int \cos x\,dx = \sin x + C

Solve a problem with Integral of Cos x

Type the problem. The solver will use Integral of Cos x where Integral of Cos x is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Integral of Cos x takes
xx
CC
Integral of Cos x
SymbolMeaning
xxThe variable of integration, typically representing an angle in radians (or sometimes just a real number); if you confuse it with a constant, you'll miss the derivative you're actually integrating.
CCThe constant of integration representing all possible vertical shifts of the antiderivative; forgetting it means your indefinite integral is incomplete.

When to use it

Reach for this integral when you encounter a cosine function and need to find its antiderivative.

Level

Usually taught in: Calculus I

Worked examples

1. Integrate a constant multiple of cosine

Problem

Find 2cosxdx\int 2\cos x\,dx.
  1. 2cosxdx=2cosxdx\int 2\cos x\,dx = 2\int \cos x\,dx

    Factor out the constant 2 using the linearity property of integration.

  2. 2cosxdx=2sinx+C2\int \cos x\,dx = 2\sin x + C

    Apply the standard formula: cosxdx=sinx+C\int \cos x\,dx = \sin x + C.

  3. 2sinx+C2\sin x + C

    Simplify to the final antiderivative.

Answer: 2sinx+C2\sin x + C

This illustrates the linearity property: constants can be factored out and applied to the result. The core formula cosxdx=sinx+C\int \cos x\,dx = \sin x + C is applied directly.

2. Integrate a difference of cosine and a constant

Problem

Find (5cosx3)dx\int (5\cos x - 3)\,dx.
  1. (5cosx3)dx=5cosxdx3dx\int (5\cos x - 3)\,dx = \int 5\cos x\,dx - \int 3\,dx

    Use linearity to split this into two separate integrals.

  2. 5cosxdx3dx=5sinx3x+C\int 5\cos x\,dx - \int 3\,dx = 5\sin x - 3x + C

    Apply cosxdx=sinx\int \cos x\,dx = \sin x and 1dx=x\int 1\,dx = x; add CC once at the end.

  3. 5sinx3x+C5\sin x - 3x + C

    Combine to get the final result, where CC accounts for all constant terms.

Answer: 5sinx3x+C5\sin x - 3x + C

This combines the cosine integral with a constant term. Notice the 3x-3x comes from integrating the constant 3-3, not from cosine—this is where sign errors often happen.

3. Find position from oscillating velocity

Problem

A particle's velocity is v(t)=4cos(t)v(t) = 4\cos(t) meters per second, where tt is time in seconds. Find the position function s(t)s(t) if the particle starts at s(0)=2s(0) = 2 meters.
  1. s(t)=v(t)dt=4cos(t)dts(t) = \int v(t)\,dt = \int 4\cos(t)\,dt

    Position is the antiderivative of velocity; write the integral with the given function.

  2. 4cos(t)dt=4cos(t)dt=4sin(t)+C\int 4\cos(t)\,dt = 4\int \cos(t)\,dt = 4\sin(t) + C

    Factor out 4 and apply the cosine integral formula, giving a general solution with unknown constant CC.

  3. s(0)=4sin(0)+C=0+C=Cs(0) = 4\sin(0) + C = 0 + C = C

    Substitute the initial condition: s(0)=2s(0) = 2, so C=2C = 2.

  4. s(t)=4sin(t)+2s(t) = 4\sin(t) + 2

    Substitute C=2C = 2 into the general solution to get the particular solution.

Answer: s(t)=4sin(t)+2s(t) = 4\sin(t) + 2

This shows why the constant CC matters: it represents the initial position. Without it, you'd have infinitely many position functions. In oscillating motion, cos(t)dt=sin(t)+C\int \cos(t)\,dt = \sin(t) + C links velocity to displacement.

Common mistakes

Where Integral of Cos x usually goes wrong
Answer came out wrong
Writing cosxdx=sinx+C\int \cos x\,dx = -\sin x + C
Integration reverses differentiation: if ddxsinx=cosx\frac{d}{dx}\sin x = \cos x, then cosxdx=sinx+C\int \cos x\,dx = \sin x + C with a positive sine.
Writing cosxdx=sinx\int \cos x\,dx = \sin x (omitting +C+C)
Always include +C+ C in your final answer: cosxdx=sinx+C\int \cos x\,dx = \sin x + C.
Applying the formula to cos(x2)dx\int \cos(x^2)\,dx
Check the argument inside cosine: cosxdx\int \cos x\,dx is straightforward, but cos(x2)dx\int \cos(x^2)\,dx requires substitution or numerical methods and does not have an elementary antiderivative.
The mistakeWhy it is wrongThe fix
Writing cosxdx=sinx+C\int \cos x\,dx = -\sin x + CStudents often confuse the derivative rule (where ddxsinx=cosx\frac{d}{dx}\sin x = \cos x) with integration and incorrectly flip the sign.Integration reverses differentiation: if ddxsinx=cosx\frac{d}{dx}\sin x = \cos x, then cosxdx=sinx+C\int \cos x\,dx = \sin x + C with a positive sine.
Writing cosxdx=sinx\int \cos x\,dx = \sin x (omitting +C+C)The constant of integration is part of the indefinite integral; without it, you are giving only one solution instead of the general family of antiderivatives.Always include +C+ C in your final answer: cosxdx=sinx+C\int \cos x\,dx = \sin x + C.
Applying the formula to cos(x2)dx\int \cos(x^2)\,dxWhen the argument of cosine is nonlinear (like x2x^2), the integral does not have a simple closed form; this formula does not apply.Check the argument inside cosine: cosxdx\int \cos x\,dx is straightforward, but cos(x2)dx\int \cos(x^2)\,dx requires substitution or numerical methods and does not have an elementary antiderivative.

Tips and when to use something else

  • For cos(kx)dx\int \cos(kx)\,dx where kk is a nonzero constant, use the formula cos(kx)dx=sin(kx)k+C\int \cos(kx)\,dx = \frac{\sin(kx)}{k} + C; the denominator adjusts for the coefficient inside cosine.
  • Do not confuse this with the derivative: ddxcosx=sinx\frac{d}{dx}\cos x = -\sin x (negative), but cosxdx=sinx+C\int \cos x\,dx = \sin x + C (positive).
  • For products such as xcosxdx\int x\cos x\,dx or excosxdx\int e^x\cos x\,dx, use integration by parts or other advanced techniques instead of this basic formula.
  • When you see a complex argument like cos(ex)dx\int \cos(e^x)\,dx or cos(x)dx\int \cos(\sqrt{x})\,dx, check whether an elementary antiderivative exists; many such integrals require numerical or series methods.

Frequently asked questions

What is the difference between the derivative of cosine and the integral of cosine?
The derivative of cosine is negative sine: ddxcosx=sinx\frac{d}{dx}\cos x = -\sin x. Integration reverses differentiation, so cosxdx=sinx+C\int \cos x\,dx = \sin x + C. The signs are opposite: the derivative introduces a negative, but the integral gives a positive sine.
Why must I add +C+C to cosxdx=sinx+C\int \cos x\,dx = \sin x + C?
The constant CC represents all possible vertical shifts of the antiderivative. Infinitely many functions differ only by a constant, and all have the same derivative cosx\cos x. For indefinite integrals, the +C+ C captures the entire family of solutions.
Can I apply this formula directly to cos(2x)dx\int \cos(2x)\,dx?
No, you need substitution or the adjusted formula: cos(2x)dx=sin(2x)2+C\int \cos(2x)\,dx = \frac{\sin(2x)}{2} + C. The denominator changes because of the coefficient 2 inside the cosine; always include +C+ C.
When do I need a different method instead of this formula?
Use cosxdx=sinx+C\int \cos x\,dx = \sin x + C only when the integrand is exactly cosx\cos x or cos\cos of a linear function like cos(kx)\cos(kx). If cosine is multiplied by another function like xx or exe^x, use integration by parts; if the argument is nonlinear like cos(x2)\cos(x^2), use substitution or recognize that no elementary antiderivative exists.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18