I want to compute
$$\sin t * \sin t=\int_0^t \sin u \sin (t-u) \, d u.$$
I have already tried complex replacement:
$$\int_0^t \sin u \sin (t-u) \, \mathrm d u = Im{\int_0^t e^{iu} e^{i(t-u)}\,d u }=Im\int_0^t e^{it}\, d u .$$
The last expression is obviously not $\sin t * \sin t$, which I was looking for. What did I do wrong? I would be glad at any help.
The mistake here is that $Im(a \cdot b) \neq Im(a) \cdot Im(b)$. For example $e^{i\theta} \cdot e^{-i\theta} = 1$ and so $Im(e^{i\theta} \cdot e^{-i\theta}) = 0 \neq -\sin^2(\theta) = Im(e^{i\theta}) \cdot Im(e^{-i\theta})$.
Instead, expand $\sin(t-u)$ in the integrand as $\sin(t)\cos(u)-\cos(t)\sin(u)$. Which yields $$\sin(t)\int_0^t \sin(u)\cos(u) du - \cos(t) \int_0^t \sin^2(u)du.$$
The first integral can be accomplished by rewriting $\sin(u)\cos(u) = 1/2 \sin(2u)$ and the second can be integrated by changing $\sin^2(u) = 1/2(1-\cos(2u))$.
If you want to do this with a complex replacement then you can replace $\sin(\theta) = \frac{e^{i\theta}-e^{-i\theta}}{2i}$.
This gives $$\int_0^t \left( \frac{e^{iu}-e^{-iu}}{2i} \right) \left( \frac{e^{i(t-u)}-e^{-i(t-u)}}{2i} \right)du.$$
You can then multiply the numerator out and integrate each exponential one at a time.