Evaluating an integral in physics question $$U_{C} = \frac{1}{C} \int\!\frac{\cos(100\pi t + \pi/4)}{10}\,dt$$
Find $U_{C}$,  the answer is $U_{C}=\left(3.2\times 10^{-4}\right)/C\times \cos(100\pi t - \pi/4)$.
Can someone show to to get this answer?
 A: $$U_{C} = \frac{1}{C} \int\!\frac{\cos(100\pi t + \pi/4)}{10}\,dt$$
$$=\frac1C \frac{\sin(100\pi t+\frac\pi4)}{100\pi\cdot 10} +K$$
Now, as $\sin(\frac\pi2+x)=\cos x,$
$$\sin\left(100\pi t+\frac\pi4\right)=\sin\left(\frac\pi2+100\pi t-\frac\pi4\right)=\cos\left(100\pi t-\frac\pi4\right)$$
and use $$\frac{10}{\pi}\approx 3.18309886184\approx3.2$$
A: First, we make the substitution $u = 100\pi t + \pi/4$, so that $du = 100\pi dt$.
Then, substituting, the integral becomes: 
$$U_{c} = \frac{1}{C} \int \cos(u) \cdot \frac{1}{10} \cdot \frac{1}{100\pi}du$$
Integrating, we see that this is:
$$U_{c} = \frac{\frac{1}{1000\pi}}{C}\sin(u) + K$$
or, approximately, with substitution in for $u$:
$$U_{c} = \frac{3.2 \cdot 10^{-4}}{C} \sin(100\pi t + \pi/4) + K$$
Using the fact that $\sin(\theta) = \cos(\theta - \pi/2)$, we see that this is:
$$U_{c} = \frac{3.2 \cdot 10^{-4}}{C} \cos(100\pi t + \pi/4 - \pi/2) + K = \frac{3.2 \cdot 10^{-4}}{C} \cos(100\pi t - \pi/4) + K$$
A: There are two things going on in the answer.  One is that a $ \ u-$ substitution performed on the indefinite integral will lead to
$$U_{C} \ = \ \frac{1}{C} \ \cdot \ \frac{1}{10} \ \cdot \frac{1}{100 \pi} \  \cdot \ \sin(100 \pi t \ +  \frac{\pi}{4}) \ \approx \ \frac{3.183 \cdot 10^{-4}}{C}   \cdot  \sin(100 \pi t \ +  \frac{\pi}{4}) \ . $$
The other manipulation is that it was apparently desired to keep a cosine function in the expression, so the trig identity $ \ \cos \theta \ = \sin ( \frac{\pi}{2} \pm \theta ) \ $ was applied, changing the "phase shift" in the final result.
