# How it is possible to vary the pressure of a gas under constant $V$ by varying $T$ while also considering the expansion or contraction of the gas?

Is it possible to vary pressure of a given quantity of a gas without changing its volume by varying only temperature in real life? Why the varying temperature does not change the volume? Why the gas did not expand due increase in temperature? How exactly the volume of the gas is maintained to be constant? What does the textbooks actually mean by saying varying pressure without varying volume? In general, what my doubt is , how exactly we maintain one parameter to be constant by varying the remaining two?

The quick answer is: If your gas is trapped in a rigid container of fixed volume (like, say, a metal drum, or a thermos), if you increase the temperature of the gas by heating it, without changing the volume of the container, this will cause the pressure to increase. (Think of how a pressure cooker might explode from built-up pressure!)

Of course, in real life there's other factors such as (the relatively insignificant) thermal expansion of the vessel from the heat.

Edit: Assuming that the minute changes are negligible, a constant temperature can be achieved easily. Maintaining a constant pressure is certainly tricker!