I'll give you a question, please answer with step-by-step reasoning process.
Hey Jude is a song by the English rock band the Beatles, written by Paul McCartney and credited to Lennon -- McCartney. The ballad evolved from Hey Jules, a song McCartney wrote to comfort John Lennon's son, Julian, during his parents' divorce. Hey Jude begins with a verse-bridge structure incorporating McCartney's vocal performance and piano accompaniment; further instrumentation is added as the song progresses. After the fourth verse, the song shifts to a fade-out coda that lasts for more than four minutes.\n\nAnswer this question: who was the song hey jude written for

John Lennon 's son , Julian
To answer the above question, the relevant sentence is: The ballad evolved from "Hey Jules", a song McCartney wrote to comfort John Lennon's son, Julian, during his parents' divorce.

.

Therefore, the answer is John Lennon 's son , Julian