Question: How to plot the tangent line of a equation given an x value?

Hi, I am stumped I've tried many ways but end up getting a graph with nothing on it or errors. I am trying to plot the tangent line to the equation f(x) = 2cosx-x^2 at x = 2; In addition, how would I plot the tangent line and the equation on one graph with distinctive line pattern for example, one being blue and dotted, while the other being red solid).

 

Thanks in advance!

Please Wait...