We can separate the integral.
#f(x) = int(cotx)dx - int(tan2x)dx#
#f(x) = int(cosx/sinx)dx - int((sin2x)/(cos2x))dx#
For #int(cosx/sinx)dx#
Let #u = sinx#, then #du = cosxdx# and #dx = (du)/cosx#.
#int(tanx) = int(cosx/u)((du)/cosx) = int(1/u)du = ln|u| = ln|sinx|#
For #int(tan2x)#:
Let #u = 2x#. Then #du = 2dx -> dx = 1/2du#.
#int(sin2x)/(cos2x)dx = int(sinu/cosu)1/2du = 1/2int(sinu/cosu)du#
Let #v = cosu#. Then #dv = -sinudu# and #du = (dv)/(-sinu)#.
#1/2int(sinu)/(cosu)du = 1/2int(sinu)/v * (dv)/(-sinu) = -1/2int(1/v)dv = -1/2ln|cosu| = -1/2ln|cos2x|#
Putting this together, we get:
#f(x) = ln|sinx| + 1/2ln|cos2x| + C -># We can't forget to add the constant, #C#.
Our initial values are that when #x= pi/3#, #y = -1#. Use this to solve for #C#:
#-1 = ln|sin(pi/3)| + 1/2ln|cos(2(pi/3))| + C#
#-1 = ln(sqrt(3)/2) + 1/2ln|1/2| + C#
#C = -1 - 1/2ln(3/4) + 1/2ln(1/2)#
#C = -1 - 1/2(ln(3/4) + ln1/2)#
#C = -1 - 1/2(ln(3/8))#
This can be approximated to #C = -0.51#.
Therefore, the function with these initial values is #f(x) = ln|sinx| + 1/2ln|cos2x| - 0.51#.
Hopefully this helps!