Answer
The answers:
$y=f(x)=-x^2+x+1$.
$dy/dx=-2x+1$.
Work Step by Step
First way:
Using Eq. (8) we have
$dy/dx=(y'(\theta))/(x'(\theta))=(-\sin {\theta} + 2\cos \theta \sin \theta)/(-\sin \theta)=1-2 \cos\theta$.
Second way:
Since $x=\cos \theta$ and so $\sin^2 \theta=1-\cos^2 \theta=1-x^2$. Substituting these into $y=\cos \theta+\sin^2 \theta$ gives
$y=x+1-x^2$,
$y=f(x)=-x^2+x+1$.
Differentiating $f(x)$ we get
$dy/dx=-2x+1$.
Since $x=\cos \theta$, this is the same as $1-2\cos \theta$.