\(\text{Actually, although I know how to do differentiation,}\\\text{ it's still a bit hard to get the original one from guessing by the}\\\text{differentiated one.(I mean, doing integration)}\)
\(\text{How, actually, do I do integration by parts, for example,}\\\text{ I want to calculate}\int{(\cos x)(e^{\sin x})dx}?\)
This is why I said the trick is often in choosing the right terms for u and v. If you choose the wrong ones you can easily make things worse, as you have demonstrated. When this happens it's generally a good idea to go back and choose differently!
That said, there are occasions when the process needs to be repeated. However, my advice is that, if you get something that is even more complicated than you started with, go back and make a different choice for u and v.
Actually, although I know how to do differentiation,
it's still a bit hard to get the original one from guessing by the
differentiated one.(I mean, doing integration)
How, actually, do I do integration by parts, for example,
I want to calculate
\(\int{(\cos x)(e^{\sin x})dx}?\)
\(\begin{array}{|lcll|} \hline \int{\cos x\cdot e^{\sin x}\ dx} \ ? \\ \text{Substitute: } u = e^{\sin x} \qquad du = e^{\sin x} \cdot \cos x \ dx \quad dx = \frac{du}{u\cdot \cos x} \\ \hline \end{array} \)
\(\begin{array}{|lcll|} \hline && \int{\cos x\cdot e^{\sin x}\ dx} \\ &=& \int{\cos x\cdot u \cdot \frac{du}{u\cdot \cos x} } \\ &=& \int{\ du} \\ &=& u + c \\ \int{\cos x\cdot e^{\sin x}\ dx} &=& e^{\sin x} + c \\ \hline \end{array}\)
As below. The trick is often in choosing the right terms for u and v. I've used a different example from the one you suggested as it's fairly obvious that, in your example, the integral is just e^sin(x) (as heureka has shown).
.
For 2sin(x)dx, the 2 is just a constant, and since you know that dcos(x)/dx is -sin(x), then the integral is just -2cos(x).
\(I=\int x \cos(x) dx\\ \begin{array}{rl}u=\cos x & du=-\sin x dx\\ dv=xdx&v=\dfrac{x^2}{2}\end{array}\)
\(\text{Then }\)
\(\begin{array}{rll}I=\int udv & u\cdot v = \dfrac{x^2\cos x}{2}&\int vdu = \int\dfrac{-x^2\sin x}{2}dx\\\end{array}\)
And I am stuck??
What if I am stuck in this situation? Do I do integration by parts again?
This is why I said the trick is often in choosing the right terms for u and v. If you choose the wrong ones you can easily make things worse, as you have demonstrated. When this happens it's generally a good idea to go back and choose differently!
That said, there are occasions when the process needs to be repeated. However, my advice is that, if you get something that is even more complicated than you started with, go back and make a different choice for u and v.