TITLE: Taylor series $\ln(\tan(x))-\ln(x)$ for point $0$
QUESTION [5 upvotes]: Well. 
I want to find the Taylor series for the function:
$$f(x) = \ln(\tan(x))-\ln(x),$$
order $5$ for point $c=0$.
Maple's result is:
$$\ln(\tan(x))-\ln(x) = \frac 13x^2+\frac 7{90}x^4+O(x^6).$$
And my simple question is: How?
I really don't see how I can find the Taylor series when $\ln(\tan(0))-\ln(0)$ (which is the first term in the Taylor series) is undefined?

REPLY [3 votes]: Your function is $\ln(\sin(x)) - \ln(\cos(x)) - \ln(x)$, whose derivative is $\cot(x) + \tan(x) - {1 \over x}$. The power series for these functions are well-known and can be looked up readily. So put them together, integrate term by term and you will get the Taylor series for $\ln(\tan(x)) - \ln(x)$. Wolfram alpha gives
$${x^2 \over 3} + {7x^4 \over 90} + {62x^6 \over 2835} + {127 x^8 \over 18900} + {146 x^{10} \over 66825} + ...$$