Define g(θ)=1+cosθsinθ for real θ.
(i) Find all values of θ in the open interval (0,2π) for which g(θ) is not defined.
(ii) Rewrite g(θ) in terms of tan2θ.
(iii) Using the result of part (ii), determine the range of g for all permissible values of θ.