# Find a function using definite integral from the second fundamental theorem of calculus

I need to find a function whose derivative is $\sin x^3$ and whose value at $0$ is $2$. I have the solution and understand its integral part formally. What I don't understand formally (but do understand intuitively) is why we add $2$ to the definite integral. See the correct solution below.

$$\int_{0}^x \sin(t^3)dt + 2$$

The result I have obtained myself is the definite integral according to the Second Fundamental Theorem of Calculus.

Suppose you don't have the $+2$, and just the formula $$\int_0^x \sin(t^3) \, dt$$ Now, the requirement is that the "value at $0$ is $2$". In other words when you plug $x=0$ into this formula, you are supposed to get $2$. So, let's plug in $x=0$ and see what we get: $$\int_0^0 \sin(t^3) \, dt$$ Well, that's equal to $0$. In fact $\int_a^a f(t) \, dt = 0$ no matter what the function $f(t)$ is and no matter what $a$ is.
Oops! We were supposed to get $2$, not $0$.
How do we fix that? By adding $2$: $$\int_0^x \sin(t^3) \, dt + 2$$ And now, when you plug in $x=0$ to this formula, you get $2$, as required.