Find an equation of the tangent line to the curve $y = x\cos(x)$ at the point $(\pi, -\pi)$ I concluded that the equation is
$$(y + \pi) = (\cos(x) + x-\sin(x)) (x - \pi)$$
1) Is this correct so far?  Wolfram doesn't seem to process this correctly.
2) How would I expand this to get it in $y$-intercept form? I know I can plug $\pi$ into my derivative, but i'm not sure what to make of plugging $x$ into it. I feel like it wouldn't be correct, or it would be correct but it would be so verbose the data would be unusable. 
 A: Your derivative, which we need for slope, is close, but $y'$ should be  $$y' =\underbrace{(1)}_{\frac d{dx}(x)}\cdot(\cos x) + (x)\underbrace{( -\sin x)}_{\frac d{dx}( \cos x)}= \cos x -x\sin x$$  Now, for slope itself, we evaluate $y'(\pi) = \cos (\pi) - \pi\sin(\pi) = -1 - 0 = -1$. 
That gives you the equation of the line: $$y+\pi = -(x -\pi)$$
To get the slope-intercept form, simply distribute the negative on the right, and subtract $\pi$ from each side to isolate $y$: $$y + \pi = -x+ \pi \iff y = -x$$
A: Your gradient of the tangent line is not correct.
Step 1. Differentiate $y=x\cos x$. $y'=\cos x-x\sin x$.
Step 2. Find the gradient of the tangent line by putting $x=\pi$ into $y'$; thus $m=-1$.
Step 3. Write the equation of the line in the form $y-y_0=m(x-x_0)$; thus $y+\pi=-1(x-\pi)$ (or $y=-x$)
To find the $y$-intercept, you put $x=0$, so $A(0,0)$ is your $y$-intercept.
A: Recall that the product rule is
$$\dfrac{d}{dx}[f(x)g(x)] = f'(x)g(x) + f(x)g'(x)$$
Let $f(x) = x$ and $g(x) = \cos(x)$.  Then, $f'(x) = 1$ and $g'(x) = -\sin(x)$.  So the derivative of $y = x\cos(x)$ is
$$y' = \cos(x) - x\sin(x)$$
Then, at $x = \pi$
$$y'(\pi) = \cos(\pi) - \pi \cdot \sin(\pi) = -1 - \pi \cdot 0 = -1$$
Thus, the equation of the tangent line is
$$y + \pi = -(x - \pi)$$
