Rav Hai Gaon per Mekoros L'Toldos HaChinuch B'Yisroel Volume 2 4-5 said that it is permitted to teach children Arabic and mathematics in order to assist them in learning Torah.