Calculus · real student question

For y = 2cos(x), state the domain and find the derivative.

Question

For

y=2cosxy=2\cos x

state the domain and find yy'.

Step-by-step solution

  1. Determine the domain. The cosine function is defined for every real input — there is no division, no even root and no logarithm to restrict it — and multiplying by 22 changes nothing. Hence

    D=R\mathcal{D}=\mathbb{R}

  2. Pull the constant out. The constant multiple rule says ddx[cf(x)]=cf(x)\dfrac{d}{dx}\left[cf(x)\right]=c\,f'(x), so the 22 simply waits outside:

    y=2ddx(cosx)y'=2\cdot\frac{d}{dx}\left(\cos x\right)

  3. Differentiate the cosine. The standard derivative carries a minus sign:

    ddxcosx=sinx\frac{d}{dx}\cos x=-\sin x

    Losing this minus sign is the most common error with trigonometric derivatives. (The argument is plain xx, so no chain rule factor is needed here.)

  4. Combine.

    y=2(sinx)=2sinxy'=2(-\sin x)=-2\sin x

  5. Verify numerically and structurally. A central difference with h=106h=10^{-6} matches 2sinx-2\sin x at x=0.3x=0.3, 1.41.4 and 2.92.9 to within 10610^{-6} ✓. Structural check: y=2cosxy=2\cos x has maxima at x=0,2π,x=0,2\pi,\ldots and minima at x=π,x=\pi,\ldots, and indeed y=2sinxy'=-2\sin x vanishes exactly at every multiple of π\pi ✓. The range of yy' is [2,2][-2,2], so the curve's steepest slopes are ±2\pm2, attained at x=π2x=\tfrac{\pi}{2} and 3π2\tfrac{3\pi}{2}.

Answer

D=R,y=2sinx\mathcal{D}=\mathbb{R},\qquad y'=-2\sin x

Need to solve a different problem like this? Open the solver →