Question: What components do you need to include in a purpose of this text type of question when given a discourse to analyse?
For me, in a discourse analysis, you dont have to discuss the purpose too much.
Here i'll give an example. If you look up the grill'd careers application questionnaire, some parts are informal and others formal. In this case, you could say something like "the purpose of this text is to extract information from the reader but to also build rapport through the use of informal language techniques to create small social distance by giving the impression of having a laid back environment". Dont mind the example, its the one i was looking at (job hunting).
This is how I would introduce the purpose of the discourse text which would come into my intro. But if your teacher says different listen to he/she, i graduated last year so I might not be up to date

hope i helped

Also i havent done englang in a while...so i might not be totally coherent