# Why do I get two answer when calculating this integral from two ways?

Assuming $a(t)=a_0\sin(\omega t)$, $v(0)=0$ and $x(0)=0$.

I hope you know about basic relation between position, velocity and acceleration. They are derivatives of the proceeding one.

I went on calculating like so:

$$\require{cancel} (\mathbf{1})\ \ \ \ \ \ \ \ v(t)=\int a_0 \sin(u)\frac{du}{\omega}=\frac{a_0}{\omega}\cdot-\cos(\omega t)+\cancelto{0}{C}=\color{blue}{-\frac{a_0}{\omega}\cos(\omega t)}$$

$$(\mathbf{2})\ \ \ \ \ \ \ \ v(t)=\int_0^ta_0 \sin(\omega t')dt'=a_0\int_0^t\sin(u)\frac{du}{\omega}=\frac{a_0}{\omega}\left[-\cos(\omega t)\cancelto{+1}{-(-\cos(0)})\right]$$

$$\implies v(t)=\color{red}{\frac{a_0}{\omega}(1-\cos(\omega t))}$$

$$\color{red}{\frac{a_0}{\omega}(1-\cos(\omega t))}\neq\color{blue}{-\frac{a_0}{\omega}\cos(\omega t)}$$

• Because you take constant to be $0$ in the first case and $1$ in the second. Why? In physics terms, you start time at different instances in the first and second case – Yuriy S Jul 27 '16 at 8:08
• @You'reInMyEye . In the second method there is no constant because it's a difinite integral. – AHB Jul 27 '16 at 8:10
• In you first line you can't take the constant to be $0$ since you want to have $0=v(0)=\frac{a_0}{\omega}\cdot (-\cos(\omega \cdot 0))+C$. – Olivier Oloa Jul 27 '16 at 8:13
• @AHB, you chose the second limit to be $0$. In the first case you chose the constant to be $0$. Both times you were solving the same integral, but picked different limits. Or alternatively, if you were solving indefinite integral in the first case, you should've left the constant undefined – Yuriy S Jul 27 '16 at 8:13
• I must say, great job at formatting! – Yuriy S Jul 27 '16 at 9:24

On the first line you get $$v(t)=\frac{a_0}{\omega}\cdot (-\cos(\omega \cdot t))+C$$ then by putting $t=0$, you have $v(0)=0$ giving \begin{align} &0=\frac{a_0}{\omega}\cdot (-\cos(\omega \cdot 0))+C \\\\&0=-\frac{a_0}{\omega}+C \\\\&C=\frac{a_0}{\omega}. \end{align}