6

Evaluate $$\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 I really can't understand how to proceed further ? The main fact is that we have to find $f(y)$ and not $f'(y)$. Can we apply the formula of $[\cos(A)+\cos(B)]$ ?

The formula of $\cos(A)+\cos(B)$ is $2\cos(\frac{A+B}{2})\cos(\frac{A-B}{2})$.

But seriously speaking I don't know how to proceed further because the numerator is $1$ and the denominator is $2\cos(\frac{A+B}{2})\cos(\frac{A-B}{2})$.

I just need some help in solving the numerator part of this integral.

Answer is given $(\csc(y)\ln|\sec(y)|)$.

Integreek
  • 8,530

5 Answers5

5

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}

Quanto
  • 120,125
  • Going from the second to the third integral, how does the factored out $\csc^2(y/2)=1/\sin^2(y/2)$ not appear before the $\tan^2(x/2)$ term? – Suzu Hirose Jun 10 '22 at 22:32
  • $\csc^2\frac y2$ is pulled out, appearing in front of the integral – Quanto Oct 22 '24 at 15:05
4

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)$.

Gary
  • 36,640
Suzu Hirose
  • 11,949
  • 2
    (+1) Nice work. –  Jun 11 '22 at 04:18
  • But Weierstrass substitution can be applied only when both are functions of x i . e. f(sin(x),cos(x)). But in the question one is a function of x and the other is a function of y. –  Jun 11 '22 at 04:24
  • 3
    @DEBSANKARROY There is no integration over $y$ here, $\cos y$ is a constant, and there is no Weierstrass substitution of anything related to $y$. – Suzu Hirose Jun 11 '22 at 04:26
3

By Euler’s formula,

$$\cos x=\frac{e^{ix}+e^{-ix}}2$$

Using this in the given integral,

$$f(y)=2\int_0^y\frac{\mathrm dx}{e^{ix}+e^{-ix}+2\cos y}$$

$$\implies f(y)=-2i\int_0^y\frac{ie^{ix}\mathrm dx}{e^{2ix}+2e^{ix}\cos y+1}$$

Substitute $e^{ix}=t$:

$$f(y)=-2i\int_1^{e^{iy}}\frac{\mathrm dt}{t^2+2t\cos y +1}$$ $$\implies f(y)=-2i\int_1^{e^{iy}}\frac{\mathrm dt}{(t+\cos y)^2+(\sin y)^2}$$ $$\implies f(y)=\frac{-2i}{\sin y}\left[\tan^{-1}\left(\frac{t+\cos y}{\sin y}\right)\right]_1^{e^{iy}}$$ $$\implies f(y)=-2i\csc y\left(\tan^{-1}(2\cot y+i)-\tan^{-1}\left(\cot\frac{y}2\right)\right)$$

Now, using $\tan^{-1} z=\frac{i}2\log\left(\frac{i+z}{i-z}\right)=-i\tanh^{-1}iz$, we get:

$$f(y)=-2i\csc y\left(\frac{i}2\log\left(\frac{\cot y+i}{-\cot y}\right)-\frac{\pi}2+\cot^{-1}\left(\cot\frac{y}2\right)\right)$$ $$\implies f(y)=-2i\csc y\left(\frac{i}2\log\left(\frac{\cos y+i\sin y}{-\cos y}\right)+\frac{i\log(-1)}2+\cot^{-1}\left(\cot\frac{y}2\right)\right)$$ $$\implies f(y)=-2i\csc y\left(\frac{i}2\ln\sec y+\frac{i}2\log(e^{iy}) +\cot^{-1}\left(\cot\frac{y}2\right)\right)$$ $$\implies f(y)=-2i\csc y\left(\frac{i}2\ln\sec y\right)$$ $$\therefore\boxed{f(y)=\csc y\ln\sec y}$$

Integreek
  • 8,530
1

We make the substitution, $$\tan\left(\frac{x}{2}\right)=t$$ $$I(a,b)=\int \frac{1}{a+b(\cos x)} \,\mathrm dx$$

$$I(a,b)=2\int \frac{1}{(a+b)+t^2(a-b)} \,\mathrm dt$$

$$I(a,b)=\frac{2}{(a-b)} \int \frac{1}{\left(\sqrt{\frac{a+b}{a-b}}\right)^2+t^2}\,\mathrm dt$$

Hint : $\displaystyle \int \frac{1}{a^2+t^2}\,\mathrm dt=\frac{1}{a} \tan^{-1}\left(\frac{t}{a}\right)+c.$

$$I(a,b)=\frac{2}{\sqrt{{(a+b)}{(a-b)}}} \tan^{-1}\left(\frac{t}{\sqrt{\frac{a+b}{a-b}}}\right)+c$$

$$\boxed{I(a,b)=\frac{2}{\sqrt{{(a+b)}{(a-b)}}} \tan^{-1}\left(\frac{\tan\left(\frac{x}{2}\right)}{\sqrt{\frac{a+b}{a-b}}}\right)+c}$$

Now the original integral;

$$I=\int_0^y \frac{1}{\cos y + \cos x} \mathrm dx$$

Set $a = \cos y$ and $b = 1$,

$$\boxed{I(\cos(y),1)=\frac{2}{\sqrt{{(1+\cos y)}{(\cos y-1)}}} \tan^{-1}\left(\frac{\tan\left(\frac{x}{2}\right)}{\sqrt{\frac{1+\cos y}{\cos y-1}}}\right)+c}$$

Note $\cos y$ is a constant and not another variable to worry about.

Applying bounds $[0,y]$,

$$\boxed{I(\cos(y),1)=\frac{2}{\sqrt{{(1+\cos y)}{(\cos y-1)}}} \tan^{-1}\,\left(\frac{\tan\left(\frac{y}{2}\right)}{\sqrt{\frac{1+\cos y}{\cos y-1}}}\right)}$$

Alternate closed form :

$$\boxed{I(\cos(y),1)=\frac{2\mathrm{i}\mathrm{e}^{\mathrm{i}y} \left(\ln\left(\left|\mathrm{e}^{\mathrm{i}y - \mathrm{i}x} + 1\right|\right) - \ln\left(\left|\mathrm{e}^{-\mathrm{i}x} + \mathrm{e}^{\mathrm{i}y}\right|\right)\right)}{\mathrm{e}^{2\mathrm{i}y} - 1}+c}$$

Applying bounds $[0,y]$,

$$\boxed{I(\cos(y),1)=\csc(y)\ln|\sec(y)|}$$

If you are confused, do refer this for clear understanding of $\cos y$ is just a distraction

Note : Usage of these two have been made; $\cos x = \dfrac{e^{ix}+e^{-ix}}{2}$ and see this

Amrut Ayan
  • 8,887
1

Let $\;x=2\arctan t,\quad t=\tan\dfrac x2,\quad y=2p,\;$ then $$I=\int\limits_0^{\tan p} \dfrac1{\dfrac{1-t^2}{1+t^2}+\cos(2p)}\dfrac{2\text dt}{1+t^2} = \int\limits_0^{\tan p}\dfrac{dt}{\cos^2(p)-t^2\sin^2(p)}$$ $$=-\dfrac1{\sin^2(p)}\int\limits_0^{\tan p}\;\dfrac{dt}{t^2-\cot^2(p)} =-\dfrac1{2\sin^2(p)\cot p}\;\ln\left|\dfrac{t-\cot p}{t+\cot p}\right| \bigg|_0^{\tan p}$$ $$=-\dfrac{1}{\sin 2p}\ln\left|\dfrac{\tan p-\cot p}{\tan p+\cot p}\right| =-\dfrac{1}{\sin 2p}\ln\left|\dfrac{\sin^2 p-\cos^2 p}{\sin^2 p+\cos^2 p}\right|,$$ $$\color{green}{\mathbf{I=-\dfrac{1}{\sin y}\,\ln|\cos y|}}.$$