# Homework Help: Integral of sine function

1. Nov 30, 2014

### Physicsrapper

Find the value of the integral:
a) ∫0π(sinx + 2)dx

Formula I found:
sin x dx = -cos x + C

My calculation: F(x) = -cosx + 2x
=> (-cosπ + 2π)-(-cos0) = -1 + 2π + 1 = 2π , but the solution should be 2π +2

b) ∫0sin(x/2)dx

My calculation: F(x) = -cosx/2
=> -cosπ + cos0 = 0 ; but the solution should be 4

What did I wrong in those equations? Can anyone help?

2. Nov 30, 2014

### SteamKing

Staff Emeritus
sin x + 2 ≠ sin x

You can't pretend the 2 doesn't exist and then ignore it when you integrate.

3. Nov 30, 2014

### Simon Bridge

Take care: cos(0)=1, cos(pi)=-1

4. Dec 1, 2014

### pasmith

$-\cos\pi = -(-1) = 1$.

The integral of $\sin(x/2)$ is $-2\cos(x/2) + C$.