How to find integral $$ \int x \operatorname{e}^x \sin^2 x\ dx $$ Trying to use integration by parts , but stuck on $$ ((\operatorname{e}^x + x\operatorname{e}^x)\sin x + \cos x \operatorname{e}^x x)\cos x dx $$
-
3Do you mean $\sin(x^{2})$ or $\sin^{2}(x)$? – Matthew Cassell Mar 02 '17 at 11:49
-
@Mattos Second, thank you. – Eugene Korotkov Mar 02 '17 at 11:52
-
Replace $sin(x) = \frac{e^{ix}-e^{-ix}}{2i}$ is manageable. – Paul Mar 02 '17 at 11:52
-
I can't using this, how to solve without this? – Eugene Korotkov Mar 02 '17 at 11:53
3 Answers
Integration by parts is actually not necessary if you know Euler's formula. First, use the reduction formula:
$$\sin^2(x)=\frac{1-\cos(2x)}2$$
Which splits our integral into two parts:
$$2I=\int xe^x\ dx-\int xe^x\cos(2x)\ dx$$
The first is rather simple:
$$\int e^{xt}\ dx=\frac{e^{xt}}t$$
Differentiate both sides and set $t=1$ to get
$$\begin{align}\int xe^x\ dx&=\frac d{dt}\frac{e^{xt}}t\bigg|_{t=1}\\&=(x-1)e^x\end{align}$$
the second may likewise be handled by noting that $\sin(x)=\Im(e^{ix})$:
$$\begin{align}\int e^x\sin(xt)\ dx&=\Im\int e^{(1+it)x}\ dx\\&=\Im\frac{e^{(1+it)x}}{1+it}\\&=\frac{e^x(\sin(xt)-t\cos(xt))}{t^2+1}\end{align}$$
We may then take the derivative and set $t=2$ to get
$$\begin{align}\int xe^x\cos(2x)\ dx&=\frac d{dt}\frac{e^x(\sin(xt)-t\cos(xt))}{t^2+1}\bigg|_{t=2}\\&=\frac{e^x}{25}[(10x-4)\sin(2x)+(5x+3)\cos(2x)]\end{align}$$
We may then add our results to get
$$2\int xe^x\sin^2(x)\ dx=\frac{e^x}{25}[(10x-4)\sin(2x)+(5x+3)\cos(2x)+25(x-1)]$$
Plus a constant.
- 74,685
HINT:
Integrate by parts
$$\int x\cdot e^x\sin^2x\ dx= x\int e^x\sin^2x\ dx-\int\left(\dfrac{dx}{dx}\cdot \int e^x\sin^2x\ dx\right)dx$$
Now use $\cos2x=1-2\sin^2x$ to find $$2I=\int e^x2\sin^2x\ dx=\int e^x\ dx-\int e^x\cos2x\ dx$$
and follow Integration of $e^{ax}\cos bx$ and $e^{ax}\sin bx$
- 274,582
-
1Can't understand your answer, could you say how you get this, please. – Eugene Korotkov Mar 02 '17 at 11:58
-
@EugeneKorotkov, Are you ok with the Integrate by parts used here? Updated the answer as well – lab bhattacharjee Mar 02 '17 at 12:00
-
Yes, but I first time see thing like this. For example, $\integral{f'(x)g(x)dx}= f(x)g(x) - \integral(g'(x)f(x)dx$ – Eugene Korotkov Mar 02 '17 at 12:10
-
@EugeneKorotkov, Write $dv=z\implies v=\int z\ dx$ in http://mathworld.wolfram.com/IntegrationbyParts.html – lab bhattacharjee Mar 02 '17 at 12:13
-
Look up the Tableau Method for integration by parts. It makes the process much easier and avoids errors with - signs. – Paul Mar 02 '17 at 13:02
Hint:
Get rid of the annoying square using
$$\sin^2x=\frac{1-\cos 2x}2.$$
Then use complex numbers, noting that
$$\cos2x=\Re(e^{i2x}).$$
Now, by parts
$$\int xe^x(1-e^{i2x})dx=\int x\left(e^x-e^{(1+i2)x}\right)dx=x\left(e^x-\frac{e^{(1+i2)x}}{1+i2}\right)-\int \left(e^x-e^{(1+i2)x}\right)dx\\ =x\left(e^x-\frac{e^{(1+i2)x}}{1+i2}\right)-\left(e^x-\frac{e^{(1+i2)x}}{(1+i2)^2}\right).$$
The final step will be to expand the complex exponentials, divide by the complex denominators and take the real parts.
$$\frac{e^{ix}}{a+ib}=\frac{(\cos x+i\sin x)(a-ib)}{a^2+b^2}\to\frac{a\cos x+b\sin x}{a^2+b^2}.$$
-
@SimplyBeautifulArt: fixed, thanks for the notice. Does such a typo deserve two downvotes ? – Mar 02 '17 at 15:32
-