# Integrate $f(y)=\int_{0}^{\frac{\pi}{2}} \ln(y^2 \cos^2x+ \sin^2x) .dx$

This Integral came up while attempting another question:

$$f(y)=\int_{0}^{\frac{\pi}{2}} \ln(y^2 \cos^2x+ \sin^2x) .dx$$

The suggested solution was as follows: $$f'(y) = 2y \int_{0}^{\pi/2}\frac{cos^{2}x}{sin^{2}x + y^{2}cos^{2}x}dx$$ $$= 2y \int_{0}^{\pi/2}\frac{dx}{tan^{2}x + y^{2}}$$ $$= 2y \int_{0}^{\pi/2}\frac{sec^{2}x - tan^{2}x }{tan^{2}x + y^{2}}dx$$ $$= 2y . \frac{1}{y} tan^{-1}( \frac{1}{y}) |_{0}^{\infty} -2y\frac{\pi}{2} + y^{2}f'(y)$$ $$f'(y) = \frac{\pi}{1 + y}$$ Unfortunately, I was unable to understand the how to get the last 3 steps. As per my understanding,

$$f'(y)= 2y \int_{0}^{\pi/2}\frac{sec^{2}x - tan^{2}x }{tan^{2}x + y^{2}}dx$$ Splitting into 2 integrals, $$= 2y\int_0^{\pi/2}\dfrac{\sec^2 x}{\tan^2 x + y^2}dx-2y \int_{0}^{\pi/2}\frac{tan^{2}x }{tan^{2}x + y^{2}}dx$$ Substituting $\tan(x)=u$ in the first integral, $$2y\int_0^{\pi/2}\dfrac{\sec^2 x}{\tan^2 x + y^2}dx$$ $$= 2y\int_0^{\infty}\dfrac{du}{u^2 + y^2}$$ $$=2y\times \dfrac{1}{y}\tan^{-1}(\dfrac{u}{y})|_0^\infty$$ However, this does not seem to agree with the given solution. Also, I have no idea as to how to integrate $-2y \int_{0}^{\pi/2}\frac{tan^{2}x }{tan^{2}x + y^{2}}dx$ ould somebody please be so kind as to point out my error in computing the first integral and also help me integrate the second integral? Many, many thanks in advance!

• Sir, I couldn't understand. What should I multiply by 1? – Ishan Jun 8 '15 at 15:22

Your calculation of $2y\int_0^{\pi/2}\sec^2 x/(\tan^2 x + y^2)\, dx$ is correct so far, and the value is $\pi$. Now

\begin{align}2y\int_0^{\pi/2} \frac{\tan^2 x}{\tan^2 x + y^2}\, dx &= 2y\int_0^{\pi/2} \left(1 - \frac{y^2}{\tan^2 x + y^2}\right)\, dx \\ &= 2y\cdot\frac{\pi}{2} - y^2\cdot 2y\int_0^{\pi/2} \frac{1}{\tan^2 x + y^2}\, dx\\ &= \pi y - y^2 f'(y), \end{align}

and therefore

$$2y\int_0^{\pi/2} \frac{\sec^2 x - \tan^2 x}{\tan^2x + y^2}\, dx = \pi - \pi y + y^2f'(y),$$

that is,

$$f'(y) = \pi - \pi y + y^2 f'(y).$$

Solving for $f'(y)$,

$$f'(y) = \frac{\pi - \pi y}{1 - y^2} = \frac{\pi(1 - y)}{(1 - y)(1 + y)} = \frac{\pi}{1 + y}.$$

• Thanks so much Sir! Sir, could you please explain something to me? What motivated you to rewrite the second integral as : \begin{align}2y\int_0^{\pi/2} \frac{\tan^2 x}{\tan^2 x + y^2}\, dx &= 2y\int_0^{\pi/2} \left(1 - \frac{y^2}{\tan^2 x + y^2}\right)\, dx \\ \end{align} It's just that I'm trying to understand general methods that are followed when facing certain types of Integrals. – Ishan Jun 8 '15 at 15:40
• you want to rewrite this part as a function of $f'(y)$ – tired Jun 8 '15 at 15:42
• But Sir, how do you realise that? It did not strike me even once to try to rewrite it as $f'(y)$ whereas you understood that merely by looking at the Integral. – Ishan Jun 8 '15 at 15:43
• @BetterWorld you want to know the motivation? Well, since I can't compute $f'(y)$ directly, I need an equation in $f'(y)$. If you look at the fourth line of the solution you posted, there is an $f'(y)$ present in the calculation. This comes from $2y \int_0^{\pi/2} \tan^2 x/(\tan^2 x + y^2)\, dx$. The trick is to add and subtract $y^2$ to $\tan^2 x$ to get $$\frac{\tan^2 x}{\tan^2 x + y^2} = 1 - \frac{y^2}{\tan^2 x + y^2}$$ Then integrate. – kobe Jun 8 '15 at 16:16
• Alright Sir, thanks a lot! – Ishan Jun 8 '15 at 16:21