f = \[Piecewise] { {Sin[10 x]/Sqrt[-x], -\[Infinity] < x < 0}, {1/Sqrt[x], 0 < x < 1}, {Sin[2000 x] x^2, 1 < x < 2}, {Cos[2 x]/x, 2 < x < \[Infinity]} };

Plot[f, {x, -10, 10}]

NIntegrate[f, {x, -Infinity, Infinity}]