Since a compressor compresses air, the air temperature increases due to P1/T1=P2/T2. When the temperature is increased it would be harder to compress - so would removing the heat from the air inside the compressor reduce the energy required by the compressor, and increase the efficiency of the engine? Also, since the turbine accepts hot air and uses the expansion of the gas to do work, would adding the heat extracted from the compressor to the turbine area increase efficiency even further?
Heat removal like that is sometimes done in gas turbine engines, not by cooling the compressor during operation, but by the use of an isobaric intercooler between the low and high pressure compressors. These kinds of configurations are common in industrial gas turbines used for electric power generation, marine propulsion and other applications where extra weight is not as large of an issue as is with aviation gas turbines.
As far as adding this extracted heat energy back into the gas flow through the turbine section, this would not be possible as compressor outlet temps are in the neighborhood of 450°F where exhaust gases exit at around 1000°F, preventing a return of the compressor heat to the turbine section for extra power. Typically intercooler exhaust is simply vented into the atmosphere.
More commonly, gas turbines are used in combined cycle powerplants which make use of the gas turbine exhaust heat to power a water boiler driving a steam turbine and secondary generator. Some of the thermodynamic cycles used in these systems can be quite elaborate and can achieve an exergetic efficiency of over 60%, making them the most efficient heat engines on the planet.
TL;DR: You are absolutely right!
your basic considerations are correct. There can be a thermodynamic advantage (inter)cooling the compressor and pre-/re-heating the turbine.
The obstacles are in the engineering and commercial field.
- Engineering: Designing heat-exchangers which are small, light, and low-loss.
- Commercial: Reduce cost.
I am currently only aware of one european research program (NEWAC to overcome these obstacles but I am sure there are others.
It is possible to increase efficiency of a gas turbine in two ways: by cooling air before it enters a compressor, or by heating air after it leaves a compressor. It is therefore possible with an internal heat exchanger - if the heat flows opposite to what is posed in the OP: from the hot exhaust gases to the air delivered by the compressor.
From the Wikipedia article for Brayton cycle (which is what takes place inside a gas turbine):
Recuperator – If the Brayton cycle is run at a low pressure ratio and a high temperature increase in the combustion chamber, the exhaust gas (after the last turbine stage) might still be hotter than the compressed inlet gas (after the last compression stage but before the combustor). In that case, a heat exchanger can be used to transfer thermal energy from the exhaust to the already compressed gas, before it enters the combustion chamber. The thermal energy transferred is effectively reused, thus increasing efficiency as well.
Note that the heat must be added after the compressor/before the combustion chamber. From the same article:
Transferring heat from the outlet (after the last turbine) to the inlet (before the first compressor stage) would reduce efficiency, as hotter inlet air means more volume, thus more work for the compressor.
In that light, cooling air before it enters a compressor increases efficiency. Adding heat after the turbine decreases efficiency but does increase thrust, as afterburners demonstrate.