An integration that wolfram cannot help me. $$\int e^{x\sin x+\cos x}\frac{x^4\cos^3 x-x\sin x+\cos x}{x^2\cos^2x}dx$$
I noted the fact that $\frac{d(x\cos x)}{dx}=-x\sin x+\cos x$ but I cannot apply the substitution on it.

Let's write an antiderivative Ansatz $f(x)\exp (x\sin x+\cos x)$ so $$f^\prime(x) + f(x)x\cos x=x^2\cos x-\frac{1}{x}\sec x\tan x+\frac{1}{x^2}\sec x\\=x^2\cos x-\left(\frac{1}{x}\sec x\right)^\prime=1+x\cos^2 x-\left(\frac{1}{x}\sec x\right)^\prime-\frac{1}{x}\sec x\cdot x\cos x.$$But by inspection, this has solution $f(x)=x-\frac{1}{x}\sec x$.
