Simplification of Trigo expression 
Simplify $$\frac{\tan^2 x+\cos^2 x}{\sin x+ \sec x}$$

My attempt, 
$$=\frac{(\cos^2x+\frac{\sin^2x}{\cos^2x})}{\frac{\sin x \cos x+1}{\cos x}} $$
$$=\frac{\cos^4 x+\sin^2 x}{\cos^2 x}\cdot \frac{\cos x}{\sin x \cos x+1}$$
$$=\frac{\cos^4 x+\sin^2 x}{\cos x(\sin x \cos x+1)}$$
I'm stuck at here. The given answer is $\sec x -\sin x$

From where you were stuck,
$$\frac{\cos^4 x+\sin^2 x}{\cos x(\sin x \cos x+1)} = \frac{\cos^2x(1 - \sin^2x) + \sin^2x}{\cos x(\sin x \cos x+1)} = \frac{(\cos^2x + \sin^2x) - \cos^2x\sin^2x}{\cos x(\sin x \cos x+1)} = \frac{1 - \cos^2x\sin^2x}{\cos x(\sin x \cos x+1)} = \frac{(1+\sin x \cos x)(1-\sin x \cos x)}{\cos x(\sin x \cos x+1)} = \frac{1-\sin x\cos x}{\cos x}$$ $$=\sec x -\sin x$$
