Sometimes courthouses are not the answer.
Envision a doughnut that is centered around your capital city.
In the doughnut hole, where courruption is low, courthouses really won't help a lot. To be effective, a courthouse needs to reduce corruption by 2 gold per turn, since each courthouse has an upkeep of 1 gold per turn. If it reduces corruption by one gold it hasn't gained you anything.
Outside the doughnut, corruption is too high for courthouses to make a difference. Don't build them there. Instead, irrigate everything, plant a lot of cities, let them grow to their natural max size (6 or 12, depending on the availablity of fresh water) and then hire as many geeks/taxmen as you can. The tax revenue and science that is generated by specialist citizens is not affected by corruption in any shape, form or fashion. It goes straight to researching the next tech or into the treasury; 3 beakers per turn per scientist and 2 gold per turn per taxman.
Inside the doughnut is where courthouses are worthwhile. Exactly how big this area is will vary. My own rule of thumb is that courthouses are good investments when the corruption is between 30% to 60% (early game) and perhaps as low as 20% in the Industrial Age or later, depending on how many shields the city is producing.
What the Forbidden Palace does is make the doughnut hole and the doughnut larger.