Let's say that an ideal gas does work on a piston, thus increasing the volume of the gas in its insulated cylinder. The pressure of the gas is assumed to be constant; therefore, by the ideal gas law, $PV =nRT$, the temperature of the ideal gas should increase.
Now let's look at this problem from the angle of the First Law of Thermodynamics, $\Delta U = Q-W$. The gas does work on the piston, therefore $W$ is positive. There is no heat added to the system, so $Q=0$. So, $\Delta U = -W$. So, the internal energy of the ideal gas particles has now decreased according to the First Law of Thermodynamics, meaning the ideal gas's temperature has decreased.
According to the Ideal Gas Law, temperature has increased whereas according to the First Law it has decreased.
Please tell me what I am doing wrong here. Your help would be greatly appreciated!