# Math Help - differentiate

1. ## differentiate

Could someone please explain to me fully how to differentiate this

-xcosx + sin x + C

thanks Nat.

2. Originally Posted by Natasha1
Could someone please explain to me fully how to differentiate this

-xcosx + sin x + C

thanks Nat.
Since this is a sum of terms, we can differentiate each term separately:

The derivative of -xcosx uses the product rule: (uv)' = uv' + u'v
-x(cosx)' + (-x)'cosx = xsinx - cosx

The derivative of sinx is straightforward: (sinx)' = cosx
The derivative of C is the derivative of a constant: (C)' = 0

So
(-xcosx + sinx + C)' = xsinx - cosx + cosx + 0 = xsinx