Evaluation of the integral $\int 3x \cos x^2 \, dx$

I want to solve this:

$$\int 3x \cos x^2 \, dx$$

I get this answer:

$$\frac{\sin 2x}{2}+\frac{\cos 2x}{4}+C$$

but the answer should be:

$$\frac{3 \sin x^2}{2}+C$$

Am I doing anything wrong or is it possible to rewrite the solution in another way so that they are the same?

EDIT

Here is my calculation:

$$3\int x\cos^2x = 3\int x\frac{1}{2}(1+\cos2x)dx=\frac{3}{2}\int x+x\cos2x dx=\frac{3x^2}{4}\int x\cos2x dx=\frac{\sin2x}{2}-\int \frac{\sin2x}{2}dx=\frac{\sin2x}{2}x+\frac{\cos2x}{24}$$

But as said, the assumption $\cos^2x=\cos x^2$ is clearly wrong.

• Your version is not equivalent to the correct answer. – André Nicolas Dec 18 '14 at 20:59
• To get the answer you are heading for, it would seem that the integral should be written as $$\int3x\cos\left(x^2\right)\,\mathrm{d}x$$ – robjohn Dec 18 '14 at 21:00
• Show us the steps you used to get to your answer? Because then we can help identify some of the errors in your way :) – Chinny84 Dec 18 '14 at 21:03
• @robjohn I know many math teachers and professors who hate the common shorthand of omitting the brackets/parentheses from trig functions for exactly this reason. – KSmarts Dec 18 '14 at 21:03
• Updated with steps! – theva Dec 18 '14 at 22:21

HINT: Let $t=x^2$, $dt=2x\,dx$ and the rest should be simple.

So: yes, there is a mistake in your solution. Your answer cannot be identical with the correct one, because the former function is periodic and the latter not.

• This looks like a perfectly good hint. Why the downvote? – robjohn Dec 18 '14 at 21:05
• I suspect that I misunderstood the $cosx^2$ i interpreted it as cos^2x... – theva Dec 18 '14 at 21:05
• @theva even accounting for that you don't get the result you show..we can help if you show us then we can fix your issue. – Chinny84 Dec 18 '14 at 21:20

Hint:

U-Substitution first

$$u = x^2$$ Therefore $$du = 2xdx$$ then $$\frac{du}{2x} = dx$$

$$\int 3x \cos x^2 \, dx =\int 3x \cos x^2 \frac{du}{2x} = \int \frac{3}{2} \cos u \, du = \frac{3}{2}\int \cos u\, du$$

Now you can figure integral of cos out by yourself...

$$\int 3x \cos(x^2) \, dx = \frac{3}{2} \sin(x^2) + C$$

as can be checked by

$$\left[\frac{3}{2} \sin(x^2) + C \right]' = \frac{3}{2} \, \cos(x^2)\, 2x = 3x \cos(x^2)$$

If you do not see it, you could use the substitution $u = x^2$: $$\int 3x \cos(x^2) \, dx = \int 3x \cos(u) \, \frac{du}{2x} = \int \frac{3}{2} \cos(u) \, du= \frac{3}{2} \sin(u) + C = \frac{3}{2} \sin(x^2) + C$$