# How to integrate this : $\int \frac{x^2+\cos^2 x}{1+x^2}\csc^2xdx$

How to integrate :

$\int \frac{x^2+\cos^2x}{1+x^2}\csc^2xdx$

I am not getting any clue how to move further, request you to please provide hint, will be of great help.

Thanks..

• but that was $cosec^2x$ not cosecx dx\$ – sultan Apr 17 '17 at 11:29

\begin{align} \int \frac{x^2+\cos^2x}{1+x^2}\csc^2xdx&=\int \frac{x^2+(1-\sin^2x)}{1+x^2}\csc^2xdx\\ &=\int \frac{(x^2+1)-\sin^2x)}{1+x^2}\csc^2xdx\\ &=\int\bigg[1-\frac{\sin^2x}{1+x^2}\bigg]\csc^2xdx\\ &=\int\bigg[\csc^2x-\frac{1}{1+x^2}\bigg]dx\\ &=-\cot x-\arctan x+C \end{align}

Let \begin{align} f(x) &= \frac{x^2+\cos^2x}{1+x^2} \csc^2x \\ &= \frac{x^2+ 1- \sin^2x}{1+x^2} \cdot \frac{1}{\sin^2x}\\ &= \frac{1}{\sin^2x} - \frac{1}{1+x^2}. \end{align} These two terms can be integrated easily.

Before integrating, let's do some changes

$$\frac{(x^2+\cos^2 x)\csc^2x}{1+x^2}=\frac{x^2\csc^2x+\cos^2 x\csc^2x}{1+x^2}=\frac{x^2\csc^2x+\cot^2 x}{1+x^2}=\frac{x^2\csc^2x+\csc^2 x-1}{1+x^2}=\frac{-1+(1+x^2)\csc^2x}{1+x^2}=-\frac{1}{1+x^2}+\csc^2x.$$

But

$$\int -\frac{1}{1+x^2}dx=-\arctan x+C$$

and

$$\int \csc^2xdx=-\cot x+C.$$

So

$$\int \frac{(x^2+\cos^2 x)\csc^2x}{1+x^2}dx=-\arctan x-\cot x+C.$$