The slope of the tangent line of r at #theta = (-pi)/3#, is the same as the derivative of the function for that exact x-value. Therefore, we need to differentiate both sides of the function, so we get an expression for #d/(d theta)# r.

#d/(d theta) [r] = d/(d theta) [-2sin(3theta) - 12cos(theta/2)]#

#d/(d theta) [r] = d/(d theta) [-2sin(3theta)] - d/(d theta)[-12cos(theta/2)]#

From this point, we need to know how to differentiate #sin theta# and #cos theta#:

#d/(d theta) sin theta = cos theta#

#d/(d theta) cos theta = -sin theta#

We need to know how the chain rule works as well. In this case, we have to substitute #3theta# with #u# and #theta/2# with #v#. When we then differentiate, we have to also differentiate our substitute. (If you want to have a further explanation, notify me).

We then have:

#d/(d theta) [r] = d/(d theta) [-2sin(u)] - d/(d theta)[12cos(v)]#

#d/(d theta) [r] = -2cos(u) * d/(d theta) [u] - (-12sin(v) * d/(d theta)[v])#

Let's now substitute #u# and #v# back to our original functions.

#d/(d theta) [r] = -2cos(3theta) * d/(d theta) [3theta] - (-12sin(theta/2) * d/(d theta)[theta/2])#

#d/(d theta) [r] = -2cos(3theta) * 3 + 12sin(theta/2) * 1/2 = -6cos(3theta) + 6sin(theta/2) #

Now we have an expression for # d/(d theta) r(theta)#, where we can put in any values we want, and get the slope for whatever #theta#-value we want. So let's put in #theta = (-pi)/3#:

#d/(d theta) [r((-pi)/3)]# = #d/(d theta) [r] = -6cos(3(-pi)/3) + 6sin((-pi)/(3*2))#

#= -6cos(-pi) + 6sin(-pi/6)#

#cos (-pi) =-1# and #sin((-pi)/6) = -1/2#

This gives us that the slope, for #theta = (-pi/3)#, is:

#-6(-1) + 6 * (-1/2) = 6-3 = 3#