Find, correct to two decimal places, the coordinates of the point on the curve y=tanx that is closest to the point (1,1).

So first i found d^2 = (x-1)^2 + (y-1)^2

so f(x) = (x-1)^2 + (tanx - 1)^2

then f'(x) = 2x - 2 + 2(tanx -1)((secx)^2) = 0

from here i do not know how to solve for x to get the x value.

could i get some help please =)

thank you