In the year following his marriage, he thought it prudent, on account of some opinions he had unadvisedly promulgated, (of what nature does not very distinctly appear,) to withdraw himself from Gratz into Hungary. Thence he transmitted several short treatises to his friend Zehentmaier, at Tubingen--"On the Magnet," "On the Cause of the Obliquity of the Ecliptic," and "On the Divine Wisdom, as shown in the Creation." Little is known of these works beyond the notice taken of them in Zehentmaier's answers. Kepler has himself told us, that his magnetic philosophy was built upon the investigations of Gilbert, of whom he always justly spoke with the greatest respect.
About the same time a more violent persecution had driven Tycho Brahe from his observatory of Uraniburg, in the little island of Hueen, at the entrance of the Baltic. This had been bestowed on him by the munificence of Frederick I. of Denmark, who liberally furnished him with every means of prosecuting his astronomical observations. After Frederick's death, Tycho found himself unable to withstand the party which had constantly opposed him, and was forced, at a great loss and much inconvenience, to quit his favourite island. On the invitation of the emperor, Rudolph II., he then betook himself, after a short stay at Hamburg, to the castle of Benach, near Prague, which was assigned to him with an annual pension of three thousand florins, a truly munificent provision in those times and that country.
Kepler had been eager to see Tycho Brahe since the latter had intimated that his observations had led him to a more accurate determination of the excentricities of the orbits of the planets. By help of this, Kepler hoped that his theory might be made to accord more nearly with the truth; and on learning that Tycho was in Bohemia, he immediately set out to visit him, and arrived at Prague in January, 1600. From thence he wrote a second letter to Tycho, not having received the answer to his former apology, again excusing himself for the part he had appeared to take with Raimar against him. Tycho replied immediately in the kindest manner, and begged he would repair to him directly:--"Come not as a stranger, but as a very welcome friend; come and share in my observations with such instruments as I have with me, and as a dearly beloved associate." During his stay of three or four months at Benach, it was settled that Tycho should apply to the emperor, to procure him the situation of assistant in the observatory. Kepler then returned to Gratz, having previously received an intimation, that he might do so in safety. The plan, as it had been arranged between them was, that a letter should be procured from the emperor to the states of Styria, requesting that Kepler might join Tycho Brahe for two years, and retain his salary during that time: a hundred florins were to be added annually by the emperor, on account of the greater dearness of living at Prague. But before everything was concluded, Kepler finally threw up his situation at Gratz, in consequence of new dissensions. Fearing that this would utterly put an end to his hopes of connecting himself with Tycho, he determined to revive his claims on the patronage of the Duke of Wirtemberg. With this view he entered into correspondence with Mästlin and some of his other friends at Tubingen, intending to prosecute his medical studies, and offer himself for the professorship of medicine in that university. He was dissuaded from this scheme by the pressing instances of Tycho, who undertook to exert himself in procuring a permanent settlement for him from the emperor, and assured him, even if that attempt should fail, that the language he had used when formerly inviting him to visit him at Hamburg, should not be forgotten. In consequence of this encouragement, Kepler abandoned his former scheme, and travelled again with his wife to Prague. He was detained a long time on the road by violent illness, and his money became entirely exhausted. On this he wrote complainingly to Tycho, that he was unable without assistance to travel even the short distance which still separated them, far less to await much longer the fulfilment of the promises held out to him.