Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I calculated this integral :

$$\int{x \cdot \sin^2(x) dx}$$

By parts, knowing that $\int{\sin^2(x) dx} = \frac{1}{2} \cdot x - \frac{1}{4} \cdot \sin(2x) +c$. So I can consider $\sin^2(x)$ a derivative of $\frac{1}{2} \cdot x - \frac{1}{4} \cdot \sin(2x)$, and I get this result:

$$\frac{1}{4} \cdot x^2 - \frac{x}{4} \cdot \sin(2x) + \frac{1}{4} \cdot \sin^2(x) +c$$

I get the confirm on wolfram if I try to compute the derivative of $\frac{1}{4} \cdot x^2 - \frac{x}{4} \cdot \sin(2x) + \frac{1}{4} \cdot \sin^2(x) +c$, but here if I try to compute the integral of $\int{x \cdot \sin^2(x) dx}$ I get this result:

$$\frac{x^2}{4} -\frac{1}{4} \cdot x \cdot \sin(2x) -\frac{1}{8} \cdot \cos(2x) $$

But $\frac{1}{8} \cdot \cos(2x)$ isn't equal to $\frac{1}{4} \cdot \sin^2(x)$, which is the correct result?

share|improve this question
    
$\cos (2x) = \cos^2 x - \sin^2 x = 1 - 2\sin^2 x$, so $-\frac18 \cos (2x) - \frac14\sin^2 x$ is constant. –  Daniel Fischer Jul 6 '13 at 19:40

2 Answers 2

up vote 4 down vote accepted

We have that $\sin^2 x = \frac{1-\cos (2x)}{2}$. Therefore, $\frac14 \sin^2 x = \frac{1-\cos (2x)}{8} = \frac18 - \frac18 \cos (2x)$. The extra $\frac18$ is taken care of by the constant of integration. In other words, if two functions differ by a constant, they have the same derivative. This is something that happens often when integrating trigonometric functions because of the various identities.

share|improve this answer

By the double angle identity for cosine, they differ by a constant. Add a constant of integration $d$ to your answer, and the two answers will be equivalent.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.