# How to integrate $\int{e^{\sin x}(\frac{x\cos^2{x}-\sin{x}}{\cos^2{x}}) dx}$

I'm stuck with this problem, and even after numerous tries, I can't seem to solve it. Please help me with this: $$\int{e^{\sin x}\biggl(\frac{x\cos^2{x}-\sin{x}}{\cos^2{x}}\biggr) dx}$$

Also, I'm always doubtful about how to proceed with indefinite integration problems which involve substitutions. While I know that they have to be solved by comparing them to some standard forms, I feel like there's more to it.

Could you please tell me how I should proceed and what's the catch in such problems?

I'd like to state that I know that we try to simplify the expression by substituting with a larger expression's elemental change, i.e $df(x)$.

• What makes you think this integral is solvable? – Vasya Sep 8 '18 at 1:34
• @Vasya literally my first comment on almost every indefinite integral question. – Don Thousand Sep 8 '18 at 1:46
• If we simplify the integral given, we get $\int xe^{\sin(x)} + ...$, which does not have an elementary antiderivative, making the entire integral unsolvable. – Christopher Marley Sep 8 '18 at 1:49
• @Vasya I found it in a book. – Utkarsh Verma Sep 8 '18 at 1:54
• @UtkarshVerma Are you sure you copied it correctly? Does the book confirm the existence of a solution? – Christopher Marley Sep 8 '18 at 1:57

Let us assume that the answer in the book is correct and let us compare

$$I=\frac d {dx} \left(e^{\sin(x)}(x - \sec(x))\right) \qquad \text{to} \qquad J=e^{\sin (x)}\left(\frac{x\cos^2(x)-\sin(x)}{\cos^2(x)}\right)$$ So $$I=e^{\sin (x)} (x \cos (x)-\tan (x) \sec (x))=e^{\sin (x)}\left(\frac{x\cos^\color{red}{3}(x)-\sin(x)}{\cos^2(x)}\right)$$

One more typo in a textbook !

The problem should be $$\int e^{\sin (x)}\left(\frac{x\cos^\color{red}{3}(x)-\sin(x)}{\cos^2(x)}\right)\,dx$$

Try this to confirm.

Edit

Using series expansion around $x=0$ $$I=-\frac{4 x^3}{3}-\frac{4 x^4}{3}-\frac{17 x^5}{15}+O\left(x^6\right)$$ $$J=-\frac{5 x^3}{6}-\frac{5 x^4}{6}-\frac{37 x^5}{40}+O\left(x^6\right)$$ are "quite" different.