If f'(x)=sinx and f(pi)=3, then f(x)=

A. Cosx+4
B. Cosx+3
C. -cosx+2
D. -cosx-2
E. -cosx+4

f'(x)=sin(x)

then by the derivative of trig functions, f(x)=-cos(x)+C
Now solve for C in
f(π)=-cos(π)+C=3

-cosx+2

3 + cosx

To find the function f(x), you need to integrate f'(x) with respect to x.

∫sin(x) dx = -cos(x) + C

Where C is a constant of integration. To determine the value of the constant C, use the given initial condition f(pi) = 3.

When x = pi:
f(pi) = -cos(pi) + C = 3

Since cos(pi) = -1:
-(-1) + C = 3
1 + C = 3
C = 2

Now that we have the value of C, we can substitute it back into the integrated form:

f(x) = -cos(x) + 2

Comparing this with the answer options, we can see that the correct answer is:

C. -cos(x) + 2