A unpolarized light of avg intensity I passes through polarizer the amplitude of E is after coming out is
Answers
Malus's law is about the effect of a polariser on polarised light. You've clearly read a badly written version of it. What your author likely meant to say was:
One begins with unpolarised light;
The first polariser quells the unaligned component of the unpolarised light and outputs polarised light (with half the input's intensity). This polarised output has intensity I0 in your notation;
Of the polarised output from the first polariser, the second polariser lets through a fraction (cosθ)2 where θ is the angle between the axes of the polarisers. So I say again: I0 is the intensity of the polarised input to the second polariser, not the intensity of the unpolarised input to the system of two polarisers. With this proviso, the output intensity is I0(cosθ)2.