# How do I get the slope on a circle?

I have drawn a circle by doing this in Matlab: syms x; ezplot(cos(x),sin(x))

I get the tangent point at which I want my tangent to be by taking $x = \cos(3.1415)$, $y = \sin(3.1415)$, but now I am confused because normally I would differentiate the function to get the slope.

Now I have two functions that created my curve, which one do I differentiate to get the slope?

-
Do you mean differentiate as opposed to derive? –  glebovg Nov 8 '12 at 1:33
@glebovg: I would have rejected the edit had I got there in time: you changed things that were perfectly understandable (and at least one that was correct as written). It’s useful to people answering the question to have an idea of the OP’s command of English: it may affect their choice of wording. –  Brian M. Scott Nov 8 '12 at 2:22
I honestly think Blub meant derive instead of differentiate. If they ask what a differential is, chances are they haven't taken Calculus. Perhaps he meant he'd normally derive an equation in the form $y=mx+b$ to determine the slope. (Unlikely, but possible.) –  anorton Nov 8 '12 at 2:25

Any point $P: (x,y)$ on the unit circle satisfies the relation $$x^2 + y^2 =1$$ Hence, we get that $$2x + 2y \dfrac{dy}{dx} = 0\implies \dfrac{dy}{dx} = - \dfrac{x}y$$ Since the usual parameterization of the circle is $x = \cos(\theta)$ and $y = \sin(\theta)$, the slope at a given $\theta$ is given by $$\text{Slope at }\theta = -\dfrac{\cos(\theta)}{\sin(\theta)} = - \cot(\theta)$$ For instance, if you are interested in the slope at $\theta = \pi/6$, then it is $-\cot(\pi/6) = - \sqrt{3}$.

-

If you seek $dy/dx$, note that $$\frac{{dy}}{{dt}} = \frac{{dy}}{{dx}}\frac{{dx}}{{dt}}$$ by the chain rule, so $$\frac{{dy}}{{dx}} = \frac{{\frac{{dy}}{{dt}}}}{{\frac{{dx}}{{dt}}}}.$$ Now let $x = \cos (t)$ and $x = \sin (t)$ and compute the derivatives. This is called parametric differentiation.

-
I'm really new to math, what is dy and dx in this case? –  Blub Nov 8 '12 at 1:38
They are differentials. Have you taken calculus? –  glebovg Nov 8 '12 at 1:39

The prior answers have all used calculus. I'm going to post an answer using only trig.

The following diagram from Wikipedia's Trig Page is helpful.

However, that diagram also has a fault--the picture is very cluttered. :) Thus, I've redrawn it for you, labeling the components important for this problem:

Note that $\csc\theta$ returns the distance from the origin to the y-intercept of the tangent line, and $\sec\theta$ returns the distance from the origin to the x-intercept of the tangent line.

Let $m$ represent slope: $$m=\frac{\Delta y}{\Delta x}=\frac{\csc\theta}{\sec\theta}$$ Simplifying, this gives: $$m=\cot\theta$$

Now, for your particular point, you will run into some difficulty: $$m=\cot\pi=undefined$$ To interpret this, note that $\cot\pi$ is undefined because you are dividing by zero. This means that you had some change in the $y$ direction, but none in the $x$ direction. The only type of line like this is a vertical one. :)

Let me know if this needs more explaining--I'll edit the answer to make it clearer.

-