Evaluate $\int_0^y \frac{1}{\cos x + \cos y} dx$ 
Find $$\int_0^y \frac{1}{\cos x + \cos y} dx$$

Actually I have tried the question by taking the above integration as f(y). Then I applied Newton- Leibnitz rule of differentiation of an integral. But I can't approach further. Kindly help me. By applying Newton Leibnitz theorem, I found $f'(y)=\frac {\sec(y)}{2}$. But how to approach further? Answer is given $(\csc(y)\ln|\sec(y)|)$.
 A: With $\cos x = 2\cos^2\frac x2-1$ and $\cos y = 1-2\sin^2\frac y2$
\begin{align}
&\int_0^y \frac1{\cos x+\cos y}dx \\
=&\ \frac12 \int_0^y \frac1{\cos^2\frac x2-\sin^2\frac y2}dx 
= \csc^2\frac y2\int_0^y \frac{d(\tan\frac x2)}{\cot^2\frac y2-\tan^2\frac x2}\\
=& \ \csc y \ln \frac {\cot \frac y2 + \tan \frac y2 } {\cot \frac y2 - \tan \frac y2 } 
= \csc y \ln \frac {1+ \tan^2\frac y2 } {1- \tan^2\frac y2 }  = \csc y \ln \sec y
\end{align}
A: First I'll do the indefinite integral $I$ using the Weierstrass substitution:
$$
\begin{align}
I
&=\int{dx\over \cos x+\cos y}\\
&=\int{2/(1+t^2)dt\over(1-t^2)/(1+t^2)+\cos y}\\
&=
{2\over 1+\cos y}
\int
{dt \over 1-t^2p^2}\\
\end{align}
$$
where I define $p=\sqrt{(1-\cos y)/ (1+\cos y)}$.
This can be done with partial fractions to give
$$
I={1\over p(1+\cos y)} [\ln(1+pt)-ln(1-pt)]+C
$$
Now $1/p(1+\cos y)=1/\sqrt{1-\cos^2 y}=\csc y$ and $p=\tan (y/2)$ by substituting half-angle formulas for $\cos y$. Substituting in the limit $t=0$ into $I$ gives zero, and the upper limit $t=\tan(y/2)$ gives a value of $$\ln{1+\tan^2(y/2)\over 1-\tan^2(y/2)},$$ which a bit of trigonometry reduces to $\ln(1/\cos y)$.
