When I try to integrate function $x(\log(x)-1)$ from $-1$ to $1$, analytically I get $0.0000 - 1.5708i$
When I try to integrate it numerically, using $10$ points gaussian quadrature I get $0.0000 - 1.5826i$. For $4$ gaussian points, the numerical integration gives me $0.0000 - 1.6376i$ as is expected for less number of gaussian points.
The thing that keeps puzzling me is when I split the integration into negative region and positive region and sum them up later, I will be able to get a perfect result. For example, for bounds $[-1,0]$ with $10$ gaussian points, the numerical integration gives $0.7500 - 1.5708i$. Similarly for bounds $[0,1]$, it gives $-0.75$. Adding the split parts up will give me the correct result of $0.0000 - 1.5708i$.
So again, why is splitting the numerical integration for function consisting of logarithm on negative and positive axis required for better accuracy?