# Thread: Trig Integral

1. ## Trig Integral

$\displaystyle\int(sin x + cos x)^2dx$

Here are the steps that the book took:
$\displaystyle\int sin^2 x + 2\sin(x) cos(x) + cos^2 x$

$\displaystyle\int ((sin^2 x + cos^2 x)2sin(x)cos(x))dx$

$\displaystyle\int(1+2sin(x)cos(x))dx$

$\displaystyle\int 1dx + \int 2sin(x)cos(x)dx= x+2 \int sin(x)cos(x)dx$

Let u=sin(x); du=cos(x)dx

$\displaystylex+2\int (sin(x)+cos(x))dx=x+2\int u\ du$

$\displaystyle = x+2\frac{u^{2}}{2}du+c = x+u^2 + c = x+sin^2(x)+c$

My question is, on this step:

$\displaystyle\int1\ dx + \int(2sinxcosx)dx$

Could I have substituted and come up with this:

$\displaystyle\int1\ dx + \int sin(2x)dx$

$\displaystyle = x-\frac{1}{2}cos(2x)+c$

2. Originally Posted by dbakeg00
My question is, on this step:

$\displaystyle\int1\ dx + \int(2sinxcosx)dx$

Could I have substituted and come up with this:

$\displaystyle\int1\ dx + \int sin(2x)dx$

$\displaystyle = x-\frac{1}{2}cos(2x)+c$
Yes, that is correct.

Regards.

3. Yes, and if you convert it back, you get:

$\begin{array}{cl}x-\frac{1}{2}cos(2x)+c &= x - \dfrac12 (1 -2sin^2(x)) + c \\

&= x - \dfrac12 + sin^2(x) + 2 \\

& = x + sin^2(x) - \dfrac12 + c\end{array}$

Where this time, the constant is a different constant from the one the book gave.