# How do I evaluate ${\Large\int}\cfrac{\mathrm{sin}x+\mathrm{tan}x}{\mathrm{cos}^{2}x}\mathrm{d}x$?

I've got

$$\int\frac{\sin{x}+\tan{x}}{\cos^{2}{x}} \, dx =\int\frac{\sin{x}}{\cos{x}} \, dx + \int\frac{\tan{x}}{\cos^{2}{x}} \, dx \\ =\int \tan{x} \, dx + \int\frac{\sin{x}\times \cos{x}}{\cos{x}}\times \frac{1}{\cos{x}} \, dx \\ =\int\tan{x} \, dx + \int(\sin{x} \sec{x}) \, dx$$

What am I doing wrong?

• Lot of steps are wrong. Can you try to justify each step ? The mistakes have nothing to do with integrals but have to do with basic definitions and manipulations of the trig functions. You should attempt integrals once you do the basic trigonometry correctly otherwise you will not appreciate any of the solutions – Shailesh Sep 22 '15 at 1:30

Bioche's rules say you make the $u=\cos x$ substitution. Your intetgral can be rewritten as $$\int\frac{\sin x+\tan x}{\cos^2x}\mathrm d\mkern1mu x=\int\biggl(-\frac{1}{u^2}--\frac{1}{u^3}\biggr)\mathrm d\mkern1mu u$$ I think you can finish from here.
Notice, $$\int\frac{\sin x+\tan x}{\cos^2 x}dx$$ $$=\int\frac{\sin x}{\cos^2 x}dx+\int\frac{\tan x}{\cos^2 x}dx$$ $$=\int(\cos x)^{-2}\sin x\ dx+\int\tan x\sec^2 x dx$$ $$=-\int(\cos x)^{-2}\ d(-\cos x)+\int\tan x\ d(\tan x)$$ $$=-\left(\frac{(\cos x)^{-1}}{-1}\right)+\frac{\tan^2 x}{2}+C$$ $$=\color{red}{\sec x+\frac{\tan^2 x}{2}+C}$$