# How is isobaric process compatible with change of volume of gas?

We have an ideal gas enclosed in cylinder whose top is covered by a piston of certain weight $mg$. At this stage, the piston is at rest which means the force by which the gas acts on the piston ($F=PA$ where $P$ is the gas pressure and $A$ is the cross sectional area of the cylinder) is equal to $mg$.

Now if this system was subject to an isobaric process, then its temperature and volume change with its pressure held constant(suppose $T$ and $V$ increase). But this is confusing, since during the process the piston is continuously changing its position, which implies it's being acted upon by a certain net force; Now the weight of the piston $mg$ is constant, so the force $F=PA$ by which the gas acts on the piston must have increased, but since $A$ is constant, therefore $P$ must have increased; therefore $P$ is not constant.

So How isobaric process is physically possible?

To clarify, Newton's 1st law says: $pA-mg=0$. By decreasing e.i. temperature, volume will decrease and the piston moves. To start moving there must be acceleration. That means, as you rigthfully say, you must have $pA-mg=ma$ with an acceleration $a\neq 0$ present. And this will necessarily change $p$, since all other values are constant.
Usually in textbook problems you will often see a sentence like, "if the piston is moved slowly" or "if the temperature is raised slowly" or similar. This is simply to avoid this contradiction. If the piston moves slowly, then the acceleration is still $a\approx 0$ and negligible.