Math generally favors lump-sum investing over long periods, but dollar-cost averaging may still make sense depending on your financial situation.