DerivCalc
Mathematically reviewed · Published November 9, 2026 · How answers are verified

Derivative of sin(3x)

sin(3x) is sine with its input tripled. The graph runs three times as fast, so the slope is three times as large: the chain rule multiplies cos(3x) by 3.

Answer
3cos(3x)
Differentiate with respect to x
Try sin(3x) in the calculator →

Step-by-step solution

1
Identify the layers

Let u=3x. The outer function is sin(u); the inner function is 3x. In the calculator, type sin(3x).

2
Differentiate both layers

(sin u)′=cos(u)=cos(3x), and u′=3.

3
Multiply

f′(x)=3cos(3x).

Domain and graph behavior

Defined for every real x. The period is 2π/3, a third of the period of sin(x), and the values stay in [−1, 1]. Maxima occur where 3x=π/2+2kπ, so x=π/6+2kπ/3; minima at x=π/2+2kπ/3. The slope at each zero of the function is ±3, three times steeper than sin(x) at its zeros.

Second derivative

f″(x)=d/dx[3cos(3x)]=−9sin(3x), which is −9 times the original function. At the maximum x=π/6, f″=−9, so the peak is concave down. In general the nth derivative is 3ⁿ·sin(3x+nπ/2).

Common mistake

The classic slip is writing cos(3x) and leaving out the 3. A second is confusing sin(3x) with 3sin(x): 3sin(x) has derivative 3cos(x), a different function. Check by value: at x=π/6, 3cos(3x)=0 because sin(3x) peaks there, while 3cos(x)≈2.598.

Practice problems

Differentiate sin(3x+1)

Answer: 3cos(3x+1): the constant inside does not change the inner derivative 3.

Differentiate sin(3x)cos(3x)

Answer: 3cos(6x). The function equals sin(6x)/2, so the derivative is 6cos(6x)/2.

A check with the triple-angle identity

sin(3x)=3sin(x)−4sin³(x). Differentiating gives 3cos(x)−12sin²(x)cos(x)=3cos(x)(1−4sin²(x)). Expanding 3cos(3x)=3(4cos³(x)−3cos(x)) and using cos²=1−sin² produces the same expression, so the chain-rule answer is confirmed without using it.

The general pattern sin(kx)

For any constant k, d/dx sin(kx)=k·cos(kx). The sin(2x) solution is the case k=2, and this page is k=3. Higher k means a shorter period, 2π/k, and a steeper slope, up to k. In physics, k plays the role of angular frequency, and the factor k is why velocity amplitude equals frequency times displacement amplitude.

A numerical check

At x=0 the formula gives 3. At x=π/9 it gives 3cos(π/3)=1.5. At x=π/6 it gives 0, matching the peak. Centered secants with h=0.0001 reproduce all three values to at least six decimal places.

More worked variations

x·sin(3x): sin(3x)+3x·cos(3x).

sin²(3x): 2sin(3x)·cos(3x)·3=3sin(6x).

sin(−3x): −3cos(−3x)=−3cos(3x).

Questions students ask

Why does the 3 come out in front?

It is the derivative of the inner function 3x. The chain rule multiplies the outer derivative cos(3x) by the inner derivative 3.

Is the derivative of sin(3x) the same as 3cos(x)?

No. 3cos(3x) keeps the 3x inside cosine. 3cos(x) is the derivative of 3sin(x), a different function.

See it: graph, values and a tangent line

Blue is sin(3x); dashed orange is 3·cos(3x), three times as tall. The inner 3 makes the wave repeat every 2π/3, so three full waves fit between −π and π.

−π−π/20π/2πf(x) = sin(3x)f′(x) = 3·cos(3x) (dashed)

The peaks fall at x = −π/2, π/6 and 5π/6 and the valleys at −5π/6, −π/6 and π/2; at each one the orange curve crosses zero.

Up to the first peak and back, in steps of π/12

xf(x)f′(x)f is…
003rising
π/12√2/23√2/2rising
π/610peak (flat)
π/4√2/2−3√2/2falling
π/30−3falling

Tangent line at x = 0

Height: f(0) = 0. Slope: f′(0) = 3.

Point-slope form: y = 3x, so the tangent line is y ≈ 3x.

Right at the origin sin(3x) leaves the axis three times as steeply as sin(x). For small x, sin(3x) ≈ 3x.

Check it numerically

Rise over run across a tiny gap at x = 0 (h = 0.00001): [f(0 + h) − f(0 − h)] / 2h ≈ 3, matching f′(0) = 3.

Second derivative

f″(x) = −9·sin(3x). f″ = −9·f. In general sin(kx) satisfies f″ = −k²·f: the bigger k is, the faster the oscillation.

Related chain-rule derivatives

sin(2x)sin(x)cos(2x)sin(x²)sin³(x)

Review the chain rule and chain rule practice problems, or read our verification method and limitations.