# Tangent Line to Parametric Curves

Sometimes function is defined parametrically, but we still need to find equation of tangent line.

So, let parametric curve is defined by equations `x=f(t)` and `y=g(t)`.

Suppose `f` and `g` are differentiable functions and we want to find the tangent line at a point on the curve where `y` is also a differentiable function of `x`.

Then using Chain Rule we can write `(dy)/(dt)=(dy)/(dx)(dx)/(dt)`.

If `(dx)/(dt)!=0` then we solve for `(dy)/(dx)`:

`large color(red)((dy)/(dx)=((dy)/(dt))/((dx)/(dt)))`.

This equation allows us to find the slope `(dy)/(dx)` of tangent line without having to eliminate parameter `t`.

We see from equation that the curve has

**horizontal tangent**when `(dy)/(dt)=0` (provided that `(dx)/(dt)!=0`).**vertical tangent**when `(dx)/(dt)=0` (provided that `(dy)/(dt)!=0`).

**Example 1.** Find equation of tangent line at point (5,-1) to the curve `x=3t^4+t^2+1` and `y=t^5-2t`. Where curve has horizontal and vertical tangents?

`(dx)/(dt)=3*4t^(4-1)+2*t^(2-1)=12t^3+2t`.

`(dy)/(dt)=5*t^(5-1)-2*1t^(1-1)=5t^4-2`.

At the point with parameter value t, the slope is

`(dy)/(dx)=((dy)/(dt))/((dx)/(dt))=(5t^4-2)/(12t^3+2t)`.

Point (5,-1) corresponds to `t=1`, so `(dy)/(dx)|_(t=1)=(5*1^4-2)/(12*1^3+2*1)=3/14`.

Therefore, equation of tangent line is `y+1=3/14(x-5)` or `y=3/14 x-29/14` (blue line).

Curve has horizontal tangent when `(dy)/(dt)=0` or `5t^4-2=0`. So, tangent line is horizontal at `t=+-root(4)(2/5)~~+-0.795271`.

When `t=0.795271` `(x,y)=(1.8324576,-1.272433)`.

When `t=-0.795271` `(x,y)=(1.8324576,1.272433)`.

Curve has vertical tangent when `(dx)/(dt)=0` or `12t^3+2t=0`. So, tangent line is horizontal at `t=0`.

When `t=0` `(x,y)=(0,0)`.

As appears from graph our answers are correct (green line is vertical tangent, red lines are horizontal tangents).

Finally, let's see example when there can be more than one tangent line at point.

**Example 2**. Find equation of tangent line to `x=t^2`, `y=t^3-4t` at point `(4,0)`.

First let's find values of `t` for which `x=4` and `y=0`.

So, `t^2=4` when `t=+-2` and `t^3-4t=t(t^2-4)=0` when `t=0` and `t=+-2`.

So, `x=4`, `y=0` when `t=+-2`. Note that we obtained two values for `t`, so there will be two tangent lines.

Now, let's find derivative:

`(dy)/(dx)=((dy)/(dt))/((dx)/(dt))=(3t^2-4)/(2t)`.

When `t=2` we have that `(dy)/(dx)|_(t=2)=(3*2^2-4)/(2*2)=2`.

So, first tangent line is `y-0=2(x-4)` or `y=2x-8`.

When `t=-2` we have that `(dy)/(dx)-|_(t=2)=(3*(-2)^2-4)/(2*(-2))=-2`.

Thus, second tangent line is `y-0=-2(x-4)` or `y=-2x+8`.

As can be seen there are two tangents at point where curve crosses itself, so there are one tangent line for each instance that the curve goes through the point.