and alexandra would have done anything rather than insult this gentle man who had instilled her with his own philosophy of life , as well as educating her in mathematics , philosophy , history , and latin .