Effects of capital taxation on economies with different demographic changes: short term versus long term