in berlin he attended weierstrass classes and theory of analytic functions lessons in heidelberg