Hello mehrad
I am not an administrator, but if you won’t mind, i can answer your question.
If task 2 you mention means Writing task, it is definite that a tester should use formal English and show the examiner your English competency in an academic way.
As for Speaking task, as long as you say it correctly, both informal and formal will do. In spite of that, using formal English is still recommended. Because a vareity of expression in Speaking test will also be seen as one of criteria to estimate your band score.
Thanks for your question. Bob is correct in saying that a more formal style is required for the IELTS writing tasks, both Task 1 and Task 2.
This does not mean that you have to avoid all features of informal language such as phrasal verbs or extracts of spoken language, especially if you are using quotations, but you should try and use more formal verbs and appropriate linking words to separate proper, well-structured sentences.
Have a look at the Writing Module ‘Mobile Phones’ which compares formal and informal language.