Differential of ln(cos(x)) is -sin(x)/cos(x)=-tan(x)=-(a0+a1x+a2x^2+a3x^3+...+a[n]x^n), where a0, a1, etc., are the coefficients in an infinite series, general nth term a[n]x^n. The coefficients can be found through differentiation and substitution of x=0. When x=0, tan(0)=0 so a0=0.
Differential of -tan(x)=-(sec(x))^2; the next differential is -2sec(x)sec(x)tan(x)=-2(sec(x))^2tan(x)=-2(tan(x)+(tan(x))^3)
4th differential: -2((sec(x))^2+3(tan(x))^2(sec(x))^2). If y=tan(x) then y'=1+y^2 and y"=2yy'=2y(1+y^2)=2y+2y^3. y'"=2y'+6y^2y'=2+2y^2+6y^2+6y^4=2+8y^2+6y^4=2(1+4y^2+3y^4)=2(1+3y^2)(1+y^2). Also when x=0, y=0.
The 4th differential is 16yy'+24y^3y'=8yy'(2+3y^2)=8y(1+y^2)(2+3y^2).
As a power series the consecutive differentials at x=0 are a1; 2a2; 6a3; 24a4; ... r!a[r] where r is the rth differential. Therefore, we deduce that a[r]=0 when r is even. Take a4, for example. Because of the factor 8y the 4th differential is zero. Take a3: y'"=2=6a3, so a3=1/3.
The 5th differential is:
8y'(1+y^2)(2+3y^2)+8y(2yy')(2+3y^2)+8y(1+y^2)(6yy')=8(1+y^2)^2(2+3y^2)+16y^2(1+y^2)(2+3y^2)+48y^2(1+y^2)^2. This becomes:
8(1+y^2)((1+y^2)(2+3y^2)+2y^2(2+3y^2)+6y^2(1+y^2))=
8(1+y^2)(2+5y^2+3y^4+2y^2(5+6y^2))=
8(1+y^2)(2+15y^2+15y^4)
At y=0, this becomes 16. a5=16/5!=16/120=2/15.
The 6th differential is:
16yy'(2+15y^2+15y^4)+8(1+y^2)(30yy'+60y^3y')=
16y(1+y^2)(2+15y^2+15y^4)+240y(1+y^2)^2(1+2y^2)=
16y(1+y^2)(2+15y^2+15y^4+15(1+y^2)(1+2y^2))=
16y(1+y^2)(2+15y^2+15y^4+15(1+3y^2+2y^4))=
16y(1+y^2)(17+60y^2+45y^4). As expected, this zero when y=0.
The 7th differential is:
16(1+y^2)^2(17+60y^2+45y^4)+16y(2y(1+y^2)(17+60y^2+45y^4)+16y(1+y^2)(120y(1+y^2)+180y^3(1+y^2)).
When y=0 this becomes: 16*17=272. Therefore, a7=272/7!=272/5040=17/315.
If we can express the rth differential in terms of y we can calculate a[r]=
(rth differential when y=0)/r!.
Once we have a series for -tan(x), we can integrate it to get a series for ln(cos(x)) and integrate it again to get the integral of ln(cos(x)).
So far, the series for -tan(x) is -(x+x^3/3+2x^5/15+17x^7/315+...)
Integrating this we get: c-(x^2/2+x^4/12+x^6/45+17x^8/2520+...), where c is a constant.
Another approach is to use the expansion of ln(1+u)=u-u^2/2+u^3/3-... .
If we write ln(cos(x))=1/2ln(cos^2(x))=1/2ln(1-sin^2(x))=-(1/2)(sin^2(x)-sin^4(x)/2+sin^6(x)/3-...). We can write sin^2(x)=(1-cos(2x))/2. cos(4x)=2cos^2(2x)-1, so cos^2(2x)=(cos(4x)+1)/2
sin^4(x)=((1-cos(2x))/2)^2=(1+cos^2(2x)-2cos(2x))/4=(1+(cos(4x)+1)/2-2cos(2x))/4.
The powers of sin(x) can be converted to sines and cosines of multiple angles in a series. Each term is easily integrated, even if somewhat painstakingly, as indicated above.
More...