# Thread: integral of x/cos^2x dx

1. ## integral of x/cos^2x dx

Hello!
Could someone help me with:

$\int\frac{x}{cos^2x}dx$?

I think it should be how to get rid of trigonometrics...
Many thanks!!!

2. ## Re: integral of x/cos^2x dx

Originally Posted by Boo
Hello!
Could someone help me with:

$\int\frac{x}{cos^2x}dx$?

I think it should be how to get rid of trigonometrics...
Many thanks!!!
\displaystyle \begin{align*} \int{\frac{x}{ \cos^2{(x)} }\,dx} &= \int{x\sec^2{(x)}\,dx} \end{align*}

Now apply integration by parts with \displaystyle \begin{align*} u = x \implies du = dx \end{align*} and \displaystyle \begin{align*} dv = \sec^2{(x)}\,dx \implies v = \tan{(x)} \end{align*} and the integral becomes

\displaystyle \begin{align*} \int{x\sec^2{(x)}\,dx} &= x\tan{(x)} - \int{\tan{(x)}\,dx} \\ &= x\tan{(x)} + \int{\frac{-\sin{(x)}}{\cos{(x)}}\,dx} \\ &= x\tan{(x)} + \int{\frac{1}{w}\,dw}\textrm{ after making the substitution } w = \cos{(x)} \implies dw = -\sin{(x)}\,dx \\ &= x\tan{(x)} + \ln{|w|} + C \\ &= x\tan{(x)} + \ln{\left| \cos{(x)} \right| } + C \end{align*}