.
Hello,
we use the parameterization $\displaystyle g(t) =e^{it}$ for $\displaystyle t\in\left[0,2\pi\right]$. We can denote by $\displaystyle R(\cos t,\sin t)$ the function we have to compute the integral. We have $\displaystyle \int_0^{2\pi}R(\cos t,\sin t) dt=\int_{C(0,1)}\frac{1}{iz}R\left(\frac 12 \left(z+\frac{1}{z}\right),\frac{1}{2i}\left(z-\frac{1}{z}\right)\right) dz$ because $\displaystyle g'(t) = ie^{it}$.
Notice first that by a usual substitution ($\displaystyle y=x-\pi$, and don't forget the rule about integrals of even functions) our integral, call it $\displaystyle I$, is equal to $\displaystyle \displaystyle 2\int_0^{\pi}\frac{d\theta}{1+8\cos^2(\theta)}$. So, $\displaystyle \displaystyle \frac{1}{2}I=\int_0^{\pi}\frac{d\theta}{1+8)\frac{ e^{2i\theta}+2+e^{-2i\theat}}{2})}=2\int_0^{\pi}\frac{d\theta}{10+8e^ {4i\theta}+16e^{2i\theta}}e^{2i\theta}=2\oint_{|z| =1}\frac{dz}{10+8z^2+16z}$. From where the rest is simple residue calculation.
The systematic way to do these problems is to start by making the substitution $\displaystyle z = e^{i\theta}$. Then $\displaystyle dz = ie^{i\theta}d\theta = izd\theta$, so that $\displaystyle d\theta = \dfrac{dz}{iz}$. Also, as $\displaystyle \theta$ goes from 0 to $\displaystyle 2\pi$, z goes round the unit circle, so that the integral becomes a contour integral round the unit circle. Finally, $\displaystyle \cos\theta = \frac12(z+z^{-1})$ and $\displaystyle \sin\theta = \frac1{2i}(z-z^{-1})$.
For the first problem, $\displaystyle \cos^4\theta+\sin^4\theta = \frac1{16}\bigl((z+z^{-1})^4 + (z-z^{-1})^4\bigr) = \frac18(z^4+6+z^{-4})$, and so
$\displaystyle \displaystyle\int_0^{2\pi}(\cos^4\theta+\sin^4\the ta)\,d\theta = \oint\tfrac18(z^4+6+z^{-4})\frac{dz}{iz} = \frac1{8i}\oint(z^3+6z^{-1}+z^{-5})\,dz}$.
The only pole of the integrand comes at the origin, and the residue is obviously 6 (being the coefficient of $\displaystyle z^{-1}$), so you should find it easy to use the residue theorem to get the value of the integral.
Do the second problem in the same way. You should find that
$\displaystyle \displaystyle\int_0^{2\pi}\frac1{1+8\cos^2\theta}\ ,d\theta = \oint\frac1{1+2(z+z^{-1})^2}\frac{dz}{iz} = \ldots = \frac1i\oint\frac z{(2z^2+1)(z^2+2)}\,dz$ (after a bit of simplification). There are two poles inside the unit circle, at $\displaystyle z = \pm\frac1{\sqrt2}i$. Find the residue at each of them, and use the residue theorem to get the value of the integral.