I'm trying to calculate the curvlenght for y=ln(cosx) , $\displaystyle 0 \leq x \leq \frac{\pi}{6}$. But I can not figure out what I'm doing wrong.

Using sec(x) is not allowed (because we don't learn that here in Sweden).

Using formula: $\displaystyle ds = \int \sqrt{1 + (\frac{dy}{dx})^2} dx$ where $\displaystyle \frac{dy}{dx} = \frac{-sinx}{cosx}$.

$\displaystyle \int \sqrt{ 1 + (\frac{dy}{dx})^2 } dx = \int \sqrt{ 1 + (\frac{-sinx}{cosx})^2 } dx$$\displaystyle = \int \sqrt{ 1 + (tanx)^2 } dx = $

$\displaystyle // 1+tan^2(x) = \frac{1}{cos^2(x)} // $

$\displaystyle =\int \sqrt{\frac{1}{cos^2(x)}} dx = \int \frac{\sqrt{1}}{\sqrt{cos^2(x)}} dx = \int \frac{1}{cosx} dx =$

$\displaystyle // \frac{1}{cosx} = \frac{cosx}{cos^2(x)} // $

$\displaystyle = \int \frac{cosx}{cos^2x} dx = $

$\displaystyle // cos^2(x) = 1- sin^2(x) //$

$\displaystyle = \int \frac{cosx}{ 1 - sin^2(x) } dx =$$\displaystyle \int \frac{1}{1 - sin^2(x)} * cosx dx $

$\displaystyle //$ Using $\displaystyle u = sinx $ , $\displaystyle du = cosx dx // $

$\displaystyle = \int \frac{1}{1 - u^2} du = \int \frac{1}{(1 - u)(1+u)} du = $

$\displaystyle // \frac{1}{(1 - u)(1+u)} = \frac{A}{1-u} + \frac{B}{1+u} \Rightarrow $$\displaystyle A+Au+B-Bu = 1 \Leftrightarrow A+B=1$ and $\displaystyle A-B=0 \Leftrightarrow A=\frac{1}{2} , B=\frac{1}{2} //$

$\displaystyle \int \frac{1}{ 1 - u^2 } du = \frac{1}{2} \int \frac{1}{1+u} + \frac{1}{1-u} du = \frac{1}{2}( ln|1+u| + ln|1-u| ) =$

$\displaystyle // ln(A) + ln(B) = ln(A*B)$ , $\displaystyle (1+u)(1-u)=1-u^2 //$

$\displaystyle = \frac{1}{2}ln|1-u^2| = $

$\displaystyle //$ changing back $\displaystyle u=sinx //$

$\displaystyle = \frac{1}{2}ln|1-sin^2(x)| = \frac{1}{2}ln|cos^2(x)| = ln|cosx|$

$\displaystyle ds=\int \sqrt{ 1 + (\frac{-sinx}{cosx})^2 } dx = ln|cosx|$

Setting $\displaystyle 0 \leq x \leq \frac{\pi}{6}$

But when calculating $\displaystyle ln|cos( \frac{ \pi }{6})|-ln|1|$ I get -0,14... The correct answer should be (according to the book) $\displaystyle \frac{1}{2}ln(3)$ which is about 0,5