# How to find $\int \frac{x\sqrt{1+\tan ^2x}}{\cos x}dx$

How to perform integration by substitution of the following expression?

$$\int \frac{x\sqrt{1+\tan ^2x}}{\cos x}dx$$

I've already reached to this part of the solution, but I'm having a hard time, figuring out, what to do next.

Step 1: $$=\int\frac{x\sqrt{\frac{\cos ^2x+\sin ^2x}{\cos ^2x}}}{\cos x}dx$$ Step 2: $$=\int \frac{x\sqrt{1/\cos ^2x}}{\cos x}dx$$ Step 3: $$=\int \frac{x\sec x}{\cos x}dx$$ Step 4: $$\int \frac{x}{\cos ^2x}dx$$ but what next?

• Well, start with $\tan^{2}(x) + 1 = \sec^{2}(x)$. – Joshua Wang Jan 26 at 2:25
• Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc. – KingLogic Jan 26 at 2:33
• Yep I've already reached to this part of the solution,but I'm having a hard time, figuring what to do next. x.sqrt(cos^2x+sin^2x/cos^2x)dx/cosx= x.sqrt(1/cos^2x)dx/cosx = (x.secx)dx/cosx. but what next? – Qazi Zainullah Jan 26 at 2:33
• Next time try integral calculator online for indefinite Integration.🤗 – Aatmaj Jan 26 at 3:02

Its probably easiest to write the integral as: $$I=\int x\sec^2 x\,dx$$ now do integration by parts: $$u=x\Rightarrow u'=1,v'=\sec^2x\Rightarrow v=\tan x$$ so: $$I=x\tan x-\int\tan x\,dx$$ can you finish it from here?