This behemoth of an equation is derived through a somewhat lengthy process. I will first outline the steps by which the derivation will proceed and then perform those steps.

We are given a function in polar coordinates, #f(theta)#. We can take the derivative, #f'(theta)#, but in order to actually find a line in cartesian coordinates, we will need #dy/dx#.

We can find #dy/dx# by using the following equation:

#dy/dx = (f'(theta)sin(theta) + f(theta)cos(theta))/(f'(theta)cos(theta) - f(theta)sin(theta))#

Then we'll plug that slope into the standard cartesian line form:

#y = mx + b#

And insert the cartesian converted polar coordinates of our point of interest:

#x = f(theta)cos(theta)#

#y = f(theta)sin(theta)#

A few things that should be immediately obvious and will save us time down the line. We are taking a line tangent to the point #theta = pi#. This means that #sin(theta) = 0# so...

1) Our equation for #dy/dx# will actually be:

#dy/dx = f(pi)/(f'(pi))#

2) Our equations for the cartesian coordinates of our point will become:

#x = -f(theta)#

#y = 0#

Starting to actually solve the problem, then, our first order of business is finding #f'(theta)#. It isn't hard, just three easy derivatives with chain rule applied to two:

#f'(theta) = -5 - 3/2 cos((3pi)/2 - pi/3) + 1/2 sec^2 (theta/2 - pi/3)#

Now we want to know #f(pi)#:

#f(pi) = -5pi - sin((7pi)/6) + tan(pi/6)#

#= -5pi - 1/2 + 1/sqrt3#

#= (sqrt3(1 - 10pi) + 2)/(2sqrt3)#

And #f'(pi)#...

#f'(pi) = -5 - 3/2 cos((7pi)/6) + 1/2 sec^2 (pi/6)#

#= -5 + (3sqrt3)/4 + 2/3#

#= (9sqrt3 - 52)/12#

With these in hand, we are ready to determine our slope:

#dy/dx = f(pi)/(f'(pi))#

#= (sqrt3(1 - 10pi) + 2)/(2sqrt3) * 12/(9sqrt3 - 52)#

#=(6(1-10pi) + 4sqrt3)/(9sqrt3 - 52)#

We can plug this in as #m# in #y = mx +b#. Recall that we previously determined that #y=0# and #x = -f(theta)#:

#0 =-((6(1-10pi) + 4sqrt3)/(9sqrt3 - 52))((sqrt3(1 - 10pi) + 2)/(2sqrt3)) + b#

#0 =-((3(1-10pi) + 2sqrt3)/(9sqrt3 - 52))((sqrt3(1 - 10pi) + 2)/(sqrt3)) + b#

#0 =-((sqrt3(1-10pi) + 2)/(9sqrt3 - 52))(sqrt3(1 - 10pi) + 2) + b#

#b = ((sqrt3(1 - 10pi) + 2)^2)/(9sqrt3 - 52)#

We can combine our previously determined #m# with our newly determined #b# to give the equation for the line:

#y = (6 - 60pi + 4sqrt(3))/(9sqrt(3) -52) x + ((sqrt(3)(1 - 10pi) +2)^2)/(9sqrt(3) - 52)#