# How do you find the derivative of y=cos(x-1) ?

Aug 19, 2014

One uses the chain rule, which states that for a function $y \left(x\right) = g \left(h \left(x\right)\right) ,$ the derivative $\frac{\mathrm{dy}}{\mathrm{dx}} = h ' \left(x\right) g ' \left(h \left(x\right)\right) \mathrm{dx}$

For this question, we must utilize the Chain rule. In this particular example, $g \left(h \left(x\right)\right) = \cos \left(x - 1\right) , h \left(x\right) = x - 1$ The derivative $\frac{d}{\mathrm{dx}} \left(x + c\right) = \frac{d}{\mathrm{dx}} \left(x\right) + \frac{d}{\mathrm{dx}} \left(c\right) = 1 + 0 = 1$, so $\frac{d}{\mathrm{dx}} \left(h \left(x\right)\right) = \frac{d}{\mathrm{dx}} \left(x - 1\right) = 1$.

Regarding $g \left(h \left(x\right)\right)$, since we are already accounting for the derivative of $h \left(x\right)$, simply find the derivative for $g \left(x\right)$. We know that the derivative of the cosine function is the negative sine function, from our knowledge of trigonometric function derivatives. Thus, $\frac{d}{\mathrm{dx}} \left(\cos x\right) = - \sin \left(x\right)$.

NOTE: If we had not accounted for the derivative of h(x), we might instead use substitution, defining a variable $u$ such that $u = h \left(x\right)$, and worked from there. However, we have accounted for $h ' \left(x\right)$ so this is currently unnecessary.

Now that we have our answers, we use the formula for the chain rule.

$\frac{\mathrm{dy}}{\mathrm{dx}} = h ' \left(x\right) g ' \left(h \left(x\right)\right) \mathrm{dx} = \left(1\right) \left(- \sin \left(x - 1\right)\right) \mathrm{dx} = - \sin \left(x - 1\right) \mathrm{dx} = - \sin \left(x - 1\right)$

$\frac{\mathrm{dy}}{\mathrm{dx}} = - \sin \left(x - 1\right)$

Psykolord: I'm not comfortable seeing Leibniz and Lagrange on the same side of the equal sign. It's okay for integrals, but I'm not sure it's okay for derivatives. It's certainly doesn't look correct on your second last line: $- \sin \left(x - 1\right) \mathrm{dx} = - \sin \left(x - 1\right)$. Please check your notes to verify that your solution is correct.