MHB Integral of trigonometric function

tmt1
Messages
230
Reaction score
0
I have this integral to solve.

$$\int_{}^{} (sinx + cos x)^2 \,dx$$

I first start by simplifying the expression:

$$\int_{}^{} sin^2x + 2sinxcosx + cos^2x \,dx$$

$$2sinxcosx$$ is $$sin2x$$ (a trigonometric identity) and $$ sin^2x + cos^2x = 1 $$ a trigonometric identity.

So, after simplifying, I get:

$$\int_{}^{} 1 \,dx + \int_{}^{} sin(2x) \,dx$$

$\int_{}^{} 1 \,dx$ is equal to $x$

now I have

$$ \int_{}^{} sin(2x) \,dx$$

Using, u-substitution, I can set $u = 2x$ and $du = 2dx$ and $dx = du/2$

so

$$ \frac{1}{2}\int_{}^{} sin(u) \,du$$

which would be

$$ - \frac{1}{2} cos(u) $$

And I can substitute in the value of u, so

$$ - \frac{1}{2} cos(2x) $$

so, if I get the result of the first integral, I get

$$ x - \frac{1}{2} cos2x + C$$

However, the answer is showing:

$$ x + sin^2x + C$$.

Is $sin^2x$ equal to $\frac{1}{2} cos2x$ or did I calculate this incorrectly?
 
Physics news on Phys.org
First let me say a word about using pre-defined function in $\LaTeX$. Certain oft-used functions, such as the trigonometric functions, and known to the script we use (MathJax), and so if you preced them with a backslash, they will appear in normal text, rather than italicized and thereby differentiating them from a string of variables. For example:

\sin(x)

produces:

$$\sin(x)$$

This is easier to read. Okay, having said that, what's going here is that:

$$-\frac{1}{2}\cos(2x)$$ and $$\sin^2(x)$$

differ by only a constant, and when two functions differ by only a constant, then they can both be the legitimate anti-derivative of a given function.

We observe that:

$$\cos(2x)=1-2\sin^2(x)\implies \sin^2(x)-\left(-\frac{1}{2}\cos(2x)\right)=\frac{1}{2}$$

We see the difference between those terms is simply a constant. And therefore, we may conlcude that both anti-derivatives are valid. Let's look at it this way...suppose we say an indefinite integral has two valid anti-derivatives:

$$I=f(x)+C_1$$

$$I=g(x)+C_2$$

Now, let's subtract the latter from the former:

$$0=(f(x)-g(x))+(C_1-C_2)$$

If we find then that $f(x)-g(x)$ is a constant, which we'll call $C_3$, we may write:

$$0=C_3+(C_1-C_2)\implies C_1=C_2-C_3,\,C_2=C_1+C_3$$

We wind up with our arbitrary constant still being simply arbitrary constants. :)
 
Back
Top