# Thermodynamics effect of change of temperature on equilibrium

I'm studying thermodynamics and I don't understand, why, when we are asked which effect has a rise in temperature on the equilibrium constant of a reaction, we can't use the formula: $\Delta G= \Delta H-T \Delta S$, and say that if the reation is entropic, the change in free energy will more negative, therefore the reaction will be more spontaneous and the equilibrium shifts towards the products.

In my exercices books, it is said, that, according to le Chatelier's principle,the equilibrium will try to "fight" the new constraint and if it is exothermic,the equilibrium will shift towards the reactants, and if it is endothermic towards the products.

Le Chatelier's principle seems intuitive to me for the compression of a gas: when compressed, the molecules are now more narrow and they combine faster than they separate. But I don't see why it can be used in the raise of temperature.

But if you want to use $\Delta G = \Delta H - T\Delta S$ to check how the equilibrium behaves, you will only see the effect the temperature has on the free energy. It relates to the equilibrium via $$\Delta G = -RT\ln K \Longleftrightarrow K = \exp\left(-\frac{\Delta G}{RT}\right)$$ This means that if you raise the temperature the expression in the exponent gets closer to 0, which in turn means that the overall $K$ becomes larger. So the equilibrium shifts towards the products.
However, I have neglected the influence of the entropy above. The formula should be, when completely written out: $$K = \exp\left(-\frac{\Delta H - T\Delta S}{RT}\right)$$