# Need help with this indefinite integral question please.

1. Oct 9, 2016

### Gundam44

1. The problem statement, all variables and given/known data
find the following integral:

cos(x/2) - sin(3x/2) dx

2. Relevant equations
I think the substitution method has to be used.
Solve integrals by parts.

3. The attempt at a solution
Let u = x/2
cosu

du/dx=1/2, I then inverted it so dx/du = 2/1 = 2
So dx=2du

Now I have cosu2du

Do I take out the constant ie: constant multiple rule?

I am not confident about where to go next.

Any help would be vastly appreciated, thank you.

Last edited by a moderator: Oct 9, 2016
2. Oct 9, 2016

### Ray Vickson

Please turn off the bold font; it looks like you are yelling at us and is super distracting.
Mod note: Fixed...I believe this is a matter of the formatting of the three numbered sections being inadventently carried over to the following text.
Of course $\int c f(u) \, du = c \int f(u) \,du$ for any function $f(u)$ and any constant $c$.

Last edited by a moderator: Oct 9, 2016
3. Oct 9, 2016

### mastrofoffi

You should substitute not only in the cosine argument, but also in sine, so after the substitution you are left with $$\int 2(cos(u) - sin(3u))du$$ right?
Now you are just a little step away from your result; integrals have linearity so yes, you can take the 2 out of the integral and easily calculate the primitives of the two terms.

4. Oct 9, 2016

### Gundam44

Sorry I was using the template and that was how it came out, it's my first post but I will make sure it is turned of from now on. Thank you very much for the help, helps to have a bit of confidence as I am doing this as an open uni course.

5. Oct 9, 2016

### Gundam44

Oh thank you very much mastrofoffi, I was reluctant to go on to the second part as I was concerned about the first but that makes a lot of sense.

6. Oct 9, 2016

### Ray Vickson

The OP could also write $\int [\cos(x/2)-\sin(3x/2)] \, dx = \int \cos(x/2) \, dx - \int \sin(3x/2) \, dx$, and use two separate substitutions: $u = x/2$ in the first integral and $u = 3x/2$ in the second one.

7. Oct 9, 2016

### PeroK

Note that you can always check the answer to an indefinite integral by differentiating the answer to check you get the original function back.

In principle, you should never be unsure whether you have the right answer.

Using this approach you could also check for yourself the linearity of integrals and that, in particular, you can take a constant outside the integral.

8. Oct 9, 2016

### Gundam44

Okay I have had a good crack at it, my answer is:

2sin(x/2) - 2/3(-cos 3x/2) + c

Any thoughts?

9. Oct 9, 2016

### Staff: Mentor

10. Oct 9, 2016

### PeroK

My thought is that you should differentiate that and see what you get.

11. Oct 9, 2016

### PeroK

12. Oct 9, 2016

### Gundam44

Sorry I missed that post, so many posts, I feel this is going okay as my first ever forum though. I will now differentiate.

13. Oct 9, 2016

### Ray Vickson

Good. That is something you should get into the habit of doing automatically, always.

14. Oct 9, 2016

### Gundam44

Differentiated and got -sin(3x/2) so yeah looks good. Thank you very much for the help, I really appreciate it.

15. Oct 9, 2016

### Gundam44

Yeah makes complete sense as it's the reverse of integration.