Maybe you should check your syntax, because I get the expected result:
In[246]:= Integrate[x Sin[x], x]
Out[246]= -x Cos[x] + Sin[x]
As for your symbolic integration, Mathematica finds the symbol x
inside your function, so it assumes that the function depends on x. In Mathematica syntax, Subscript[x, i]
is a function of x
and i
, it is not a symbol distinct from x
. Try integrating with respect to y
:
Integrate[Subscript[x, i], x]
Integrate[Subscript[x, i], y]