I'm trying to solve the system of equations:

I rearrange for g(x) in the second equation and substitute that into the first which after a little rearrangement gives:

tan(2x)((-(f'(x))^2)/(f(x)) + f''(x)) + 2f'(x) = 0

I tried to use the integrating factor method but I can't seem to get anything from it, any help please?