Evaluation of $\int e^x\tan x\left(1-2\sec^2 x\right)dx$ Evaluation of Following Integrals.
$(a)\;\;\displaystyle \int e^x\tan x\left(1-2\sec^2 x\right)dx\;\;\;\; (b)\;\; \int \left(1+x-\frac{1}{x}\right)e^{x+\frac{1}{x}}dx$
$\bf{My\; Try::}$ For $(a)$
Given $\displaystyle \int e^x\tan x\left(1-2\sec^2 x\right)dx = \int e^x(\tan x-2\sec^2 x\cdot \tan x)dx$
Now Let $f(x)=\tan x\;,$ Then $\displaystyle f^{'}(x)=\sec^2 x$ and $\displaystyle f^{''}(x)=2\sec x\tan x$
So Integral Convert into $\displaystyle \int e^x\left(f(x)-f^{''}(x)\right)dx$
Now How can I solve after that
Help me
Thanks

For (a)
$$\int e^{x}\tan(x)(1-2\sec^{2}(x))dx=\int e^{x}\tan(x)dx-\int e^{x}\underbrace{(2\tan(x)\sec^{2}(x))}_{(\sec^{2}(x))'}dx$$
The first integral becomes:
$$e^{x}\tan(x)-\int e^{x}\sec^{2}(x)dx$$
by an application of integration by parts. The second integral becomes 
$$=e^{x}sec^{2}(x)-\int e^{x}\sec^{2}(x)$$
by an application of integration by parts. Putting this together we get:
$$(e^{x}\tan(x)-\int e^{x}\sec^{2}(x)dx)-(e^{x}\sec^{2}(x)-\int e^{x}\sec^{2}(x)dx)=e^{x}(\tan(x)-sec^{2}(x))$$
For (b)
$$\int (1+x-\frac{1}{x})e^{x+\frac{1}{x}}dx=\int e^{x+\frac{1}{x}}dx+\int x\,\underbrace{(1-\frac{1}{x^{2}})e^{x+\frac{1}{x}}}_{(e^{x+\frac{1}{x}})'}dx$$
$$=\int e^{x+\frac{1}{x}}+xe^{x+\frac{1}{x}}-\int e^{x+\frac{1}{x}}dx=xe^{x+\frac{1}{x}}$$
