Stuck on this? Solve it with AI
Calculus · real student question

Find the derivative of f(x) = x * cos(x + 3) + 7.

Question

Differentiate

f(x)=xcos⁡(x+3)+7f(x) = x\cos(x+3) + 7

Step-by-step solution

  1. Split the function into pieces. Differentiation is linear, so handle xcos⁡(x+3)x\cos(x+3) and the constant 77 separately. The derivative of any constant is 00, so the +7+7 contributes nothing — it shifts the graph vertically without changing any slope.

  2. Set up the product rule on the first term. With u=xu = x and v=cos⁡(x+3)v = \cos(x+3):

    ddx[uv]=u′v+uv′\frac{d}{dx}\left[uv\right] = u'v + uv'

  3. Differentiate each factor. u′=1u' = 1. For vv, the chain rule gives

    v′=−sin⁡(x+3)⋅ddx(x+3)=−sin⁡(x+3)⋅1=−sin⁡(x+3)v' = -\sin(x+3)\cdot\frac{d}{dx}(x+3) = -\sin(x+3)\cdot 1 = -\sin(x+3)

    The inner derivative is 11 because the argument is a pure shift; had it been cos⁡(3x+3)\cos(3x+3) there would be an extra factor of 33.

  4. Assemble the derivative.

    f′(x)=1⋅cos⁡(x+3)+x(−sin⁡(x+3))=cos⁡(x+3)−xsin⁡(x+3)f'(x) = 1\cdot\cos(x+3) + x\left(-\sin(x+3)\right) = \cos(x+3) - x\sin(x+3)

  5. Check at a convenient point. At x=−3x = -3 the argument is 00, so f′(−3)=cos⁡0−(−3)sin⁡0=1f'(-3) = \cos 0 - (-3)\sin 0 = 1. A central difference of ff at x=−3x = -3 with step 10−610^{-6} also returns 1.0000001.000000. At x=0x = 0: f′(0)=cos⁡3=−0.989992f'(0) = \cos 3 = -0.989992, matching the numerical derivative to six decimals.

Answer

f′(x)=cos⁡(x+3)−xsin⁡(x+3)f'(x) = \cos(x+3) - x\sin(x+3)

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