# Find $\int\frac{e^{2x}-e^x+1}{(e^x\sin x+\cos x)(e^x\cos x-\sin x)}dx$.

Find $$\int\frac{e^{2x}-e^x+1}{(e^x\sin x+\cos x)(e^x\cos x-\sin x)}dx$$ I observed that $$(e^x\sin x+\cos x)'=e^x\cos x+e^x\sin x-\sin x$$ and I tried to denote this by $$t$$ to change the variable but I failed. Any help?

• where did you get this? I am not sure there is an elementary antiderivative. – Vasya Mar 7 at 15:48
• Its from a magazine of mathematics. Any help is welcomed. – user651692 Mar 7 at 15:54
• Have you tried expanding out the denominator? – Alex Nelson Mar 7 at 15:55
• Also, I don't think your observation $(e^x\sin x+\cos x)=e^x\cos x-\sin x$ is true, what happens at $x=5\pi$? – Alex Nelson Mar 7 at 16:03
• Its $(e^x\sin x+\cos x)'=e^x\cos x-\sin x$. Sorry for this. I edit it. – user651692 Mar 7 at 16:24

let $$f(x)=e^x\cos x-\sin x$$ and
$$g(x)=e^x\sin x+\cos x$$
and $$e^{2x}-e^x+1=(e^x\cos x-\sin x)(e^x\sin x+\cos x)'-(e^x\sin x+\cos x)(e^x\cos x-\sin x)'$$
integration is $$\displaystyle \int\frac{f(x)g'(x)-g(x)f'(x)}{f(x)g(x)}dx$$
$$\int\frac{g'(x)}{g(x)}dx-\int\frac{f'(x)}{f(x)}dx=\ln\bigg|\frac{g(x)}{f(x)}\bigg|+C$$