Integrate $\int_{0}^{\pi/2}{\frac{x\cos\left(x\right)-\sin\left(x\right)}{\sin\left(x\right)+x^2}}dx$ 
$$\int_{0}^{\pi/2}{\dfrac{x\cos\left(x\right)-\sin\left(x\right)}{\sin\left(x\right)+x^2}}dx$$

I am unable to exploit the properties of definite integral, neither it seems that indefinite integration is possible.
 A: As suggested in the comments I believe you meant to write
\begin{align}
\int_0^{\pi/2}\frac{x\cos{(x)}-\sin{(x)}}{\sin^2{(x)}+x^2}\mathrm{d}x
&=\int_0^{\pi/2}\frac{x\csc{(x)}\cot{(x)}-\csc{(x)}}{1+x^2\csc^2{(x)}}\mathrm{d}x\\
&=-\int_0^{\pi/2}\frac{\csc{(x)}-x\csc{(x)}\cot{(x)}}{1+(x\csc{(x)})^2}\mathrm{d}x\\
&=-\int_0^{\pi/2}\frac{(x\csc{(x)})'}{1+(x\csc{(x)})^2}\mathrm{d}x\\
&=-[\arctan{(x\csc{(x)})}]_0^{\pi/2}\\
&=-\arctan{\left(\frac{\pi}2\csc{\left(\frac{\pi}2\right)}\right)}+\lim_{x\to0^+}\arctan{(x\csc{(x)})}\\
&=-\arctan{\left(\frac{\pi}2\right)}+\lim_{x\to0^+}\arctan{\left(\frac1{\sin{(x)}/x}\right)}\\
&=-\arctan{\left(\frac{\pi}2\right)}+\arctan{\left(\lim_{x\to0^+}\frac1{\sin{(x)}/x}\right)}\\
&=-\arctan{\left(\frac{\pi}2\right)}+\arctan{(1)}\\
&=-\left(\frac{\pi}2-\arctan{\left(\frac2{\pi}\right)}\right)+\frac{\pi}4\\
&=\arctan{\left(\frac2{\pi}\right)}-\frac{\pi}4\\
\end{align}
Where I have used the identities
$$\lim_{x\to0}\frac{\sin{(x)}}x=1$$
$$\arctan{(x)}+\arctan{\left(\frac1x\right)}=\frac{\pi}2\quad\forall x\gt0$$
and the fact that both $\arctan{(x)}$ and $1/x$ are continuous at $1$.
A: I think that power 2 of $\sin x$ is missed and solve the other one as below. At the first sight, the numerator of the integrand seems to be an antiderivative of $x\sin x$. However, the negative sign in between reminds me that it should be an antiderivative of $\dfrac{\sin x}{x}$. So I decided to divide both numerator and denominator of the integrand by $x^2$ and it works wonderfully.
$\begin{aligned} \int_{0}^{\frac{\pi}{2}} \frac{x \cos x-\sin x}{\sin ^{2} x+x^{2}} d x =& \int_{0}^{\frac{\pi}{2}} \frac{\frac{x \cos x-\sin x}{x^{2}}}{\frac{\sin ^{2} x}{x^{2}}+1}  d x \\=& \int_{0}^{\frac{\pi}{2}} \frac{d\left(\frac{\sin x}{x}\right)}{\left(\frac{\sin x}{x}\right)^{2}+1} \\=&\left[\tan ^{-1}\left(\frac{\sin x}{x}\right)\right]_{0}^{\frac{\pi}{2}} \\=& \tan ^{-1}\left(\frac{2}{\pi}\right)-\frac{\pi}{4} \quad\left(\because \lim _{x \rightarrow 0} \frac{\sin x}{x}=1\right) \end{aligned}$
