Calculate the taylor polynomial of second degree for $a(x)=\ln(\cos x)$ where $x_{0}=0$
$$a(x)= \ln(\cos x)$$
$$a'(x)=\frac{1}{\cos x}\cdot(-\sin x)=\frac{-\sin x}{\cos x}=-\tan x$$
$$a''(x)= \frac{-\cos x \cdot \cos x -(-\sin x \cdot (-\sin x))}{\cos^{2}x}=\frac{-cos^{2}x-\sin^{2}x}{\cos^{2}x}=-1-\frac{\sin^{2}x}{\cos^{2}x}=1-\tan^{2}x$$
$$T(_{2,0}a)(x)=\frac{\ln(\cos(0))}{0!}\cdot (x-0)^{0}+\frac{-\tan(0)}{1!}\cdot (x-0)^{1}+\frac{-1-\tan^{2}(0)}{2!}\cdot (x-0)^{2}$$
$$T(_{2,0}a)(x)=\frac{0}{1}\cdot1+\frac{0}{1}\cdot x+\frac{(-1-0)}{2!}\cdot x^{2}$$
$$T(_{2,0}a)(x)=-\frac{1}{2}x^{2}$$
I hope it's correct because it took me a lot time to learn about taylor and doing this task? There are ways of calculating it faster? This is so long and time consuming...
It is correct. The derivative of tangent comes up often and is worth memorizing.
$$D_\theta \tan \theta = \sec^2 \theta$$
which is equivalent to $\tan^2 \theta + 1$ by the pythagorean theorem.
edit: it is almost correct; you got the right answer in the end, but check your signs when calculating $D_x(-\tan x)$.