# How do you differentiate  y= cos(pi/2x^2-pix)  using the chain rule?

$- \sin \left(\frac{\pi}{2} {x}^{2} - \pi x\right) \cdot \left(\pi x - \pi\right)$
First, take the derivative of the outer function, cos(x): $- \sin \left(\frac{\pi}{2} {x}^{2} - \pi x\right)$.
But you also have to multiply this by the derivative of what's inside, ($\frac{\pi}{2} {x}^{2} - \pi x$). Do this term by term.
The derivative of $\frac{\pi}{2} {x}^{2}$ is $\frac{\pi}{2} \cdot 2 x = \pi x$.
The derivative of $- \pi x$ is just $- \pi$.
So the answer is $- \sin \left(\frac{\pi}{2} {x}^{2} - \pi x\right) \cdot \left(\pi x - \pi\right)$