We know that entropy of a system only depends on heat energy (supplied to or extracted from system) not on any other work (expansion work + non expansion work) by mathmatical expression ∆S = dQrev / T.
Now suppose we a closed container (whose walls are adiabatically insulated), with a movable piston, is filled with an ideal gas. According to defination to entropy we can't increase or decrease entropy of this system as it's walls are thermally insulated so we can't supply heat. But if we compress piston , molecules gets closer and when we pull piston , there is more space available for molecules. Do these changes not affect the disorder or randomness of molecules ?
1.If yes then why entropy doesn't change ?
2.If no then why randomness of molecules is independent of work ?
And also why entropy depend on temperature, means if I supply same amount of heat to system at two different temperatures, why entropy change is different in both cases ?