# Evaluare $I(y)=\int_0^1\frac{1}{y+\cos(x)}dx$. Hence determine $J(y)=\int_0^1\frac{1}{(y+\cos(x))^2}dx$

Consider the following integral: $$I(y)=\int_0^1\frac{1}{y+\cos(x)}dx$$ with Weierstrasse substitution I showed that

$$I(y)=\frac{2}{\sqrt{y^2-1}}\arctan\left(\sqrt{\frac{{y-1}}{y+1}}\right).$$

It is this next part that I am not sure about: Hence detertemine $$J(y)=\int_0^1\frac{1}{(y+\cos(x))^2}.$$

My attempt:

Since $$I(y)\pm J(y)$$ yields no simplication, the most obvious approach would be to rewrite $$I(y)$$ as $$I(y)=\int_0^1\frac{(y+\cos(x))}{(y+\cos(x))^2}=yJ(y)+\underbrace{\int_0^1\frac{cos(x)}{(y+\cos(x))^2}dx}_{K(y)}$$ Applyling Weierstrasse substitituion for $$K(y)$$: $$K(y)=2\int_0^1\frac{(1-x^2)}{((y-1)x^2+(y+1))^2}dx=-2\int_0^1\frac{\frac{1}{y-1}((y-1)x^2+(y+1))-\frac{y+1}{y-1}-1}{((y-1)x^2+(y+1))^2}$$ $$=-2\left(\underbrace{\frac{1}{y-1}\int_0^1\frac{1}{(y-1)x^2+(y+1)}dx}_{\text{elementary integral}\to \arctan()}-\underbrace{\frac{2}{y-1}\int_0^1\frac{1}{((y-1)x^2+(y+1))^2}dx}_{\text{evaluated with } \tan(u)=\sqrt{\frac{y-1}{y+1}}x}\right)$$ so what follows is quite elmenatary.

However it seems to me that $$K(y)$$ is by no means simpler than $$J(y)$$, (i.e. the same approach can be used for $$J(y)$$ but without having to use the result for $$I(y)$$) so this is clearly not the point of the question?

• $$J(y) = -\frac{d}{dy} I(y)$$ Commented Dec 24, 2020 at 11:16
• @JackD'Aurizio would you mind explaining how you see that? Commented Dec 24, 2020 at 11:21
• @A-LevelStudent its just differentiation under sign of integral $$J(y)=\int_0^1 \frac{d}{dy}( \frac{1}{y+\cos x})=\frac{d}{dy} \int_0^1 \frac{1}{y+\cos x}$$ Commented Dec 24, 2020 at 11:26
• @AlbusDumbledore thansk for that, I didn't know you are 'allowed' to do that. Why is that allowed? (I've never come across this sort of thing in school before.) Commented Dec 24, 2020 at 11:27
• @A-LevelStudent you are welcome! neither did i study that in school(1 am in 12th) i jsut came acroos it while preparing for a competitive exam .It is just modified leibnitz rule see here. Commented Dec 24, 2020 at 11:31

As @JackD'Aurizio pointed out, we trying to find:

$$\frac{\partial}{\partial\text{n}}\left(\frac{1}{\text{n}+\cos\left(x\right)}\right)\tag1$$

Using the chain rule, we get:

$$\frac{\partial}{\partial\text{n}}\left(\frac{1}{\text{n}+\cos\left(x\right)}\right)=-\frac{1}{\left(\text{n}+\cos\left(x\right)\right)^2}\cdot\frac{\partial}{\partial\text{n}}\left(\text{n}+\cos\left(x\right)\right)\tag2$$

Differentiate the sum term by term:

$$\frac{\partial}{\partial\text{n}}\left(\frac{1}{\text{n}+\cos\left(x\right)}\right)=-\frac{1}{\left(\text{n}+\cos\left(x\right)\right)^2}\cdot\left(\frac{\partial}{\partial\text{n}}\left(\text{n}\right)+\cos\left(x\right)\cdot\frac{\partial}{\partial\text{n}}\left(1\right)\right)=$$ $$-\frac{1}{\left(\text{n}+\cos\left(x\right)\right)^2}\cdot\left(1+\cos\left(x\right)\cdot0\right)=-\frac{1}{\left(\text{n}+\cos\left(x\right)\right)^2}\tag3$$

So, we have:

$$\int_0^1\frac{1}{\left(\text{n}+\cos\left(x\right)\right)^2}\space\text{d}x=-\int_0^1\frac{\partial}{\partial\text{n}}\left(\frac{1}{\text{n}+\cos\left(x\right)}\right)\space\text{d}x=$$ $$-\frac{\partial}{\partial\text{n}}\left(\int_0^1\frac{1}{\text{n}+\cos\left(x\right)}\space\text{d}x\right)\tag4$$

I suppose that the trick is

$$\frac{1}{(y+\cos (x))^2}=\frac{y}{\left(y^2-1\right) (y+\cos (x))}-\frac{y \cos (x)+1}{\left(y^2-1\right) (y+\cos (x))^2}$$