Consider the signal:
$\begin{align*} f(t) &= \sin(\omega t) \tag{$0 \leq t \leq 2\pi/\omega$}\\ &= 0 \tag{elsewhere} \end{align*}$
How to compute the Fourier transform of $f(t)$? I tried writing sin in terms of complex exponentials but it gets complicated. Thanks a lot for the help.
Fourier transform (FT) of one cycle of sine wave can also be obtained by using the FT of infinite cycle sine wave and the FT of a rectangular wave by using the multiplication property of the FT. Discussion below is just a technique. Kindly figure out how can you use the method below for your one cycle sine wave.
Consider the following functions and their FTs (From http://en.wikipedia.org/wiki/Fourier_transform)
$x(t)=\sin(\omega_0 t)$ -- FT$(x(t))=X(\omega)= \frac{\sqrt{2\pi}}{2 i} \left(\delta(\omega-\omega_0)-\delta(\omega+\omega_0 \right)$
$y(t)=rect(at)$--FT $[y(t)]=Y(\omega)=\frac{1}{\sqrt{2 \pi a^2}} sinc(\frac{\omega}{2 \pi a})$ -- $a$- width of the rectangular wave. We can take $a=2 \pi$ to cut one cycle of sine wave from the infinite cycle sine wave.
A one cycle sine wave $z(t)$ can then be created by the product $z(t)=x(t)y(t)$. Then, the FT of $z(t)$ is the convolution of $X(\omega)$ and $Y(\omega)$ (Multiplication property of FT).
Then $Z(\omega)=X(\omega)*Y(\omega)$ which can be given as
$Z(\omega)= \frac{1}{2 i\sqrt{a^2}} \left( sinc(\frac{\omega-\omega_0}{2 \pi a})-sinc(\frac{\omega+\omega_0}{2 \pi a}) \right)$
Please note that $X(\omega)$ is the FT of a single cycle sine wave (probably) whose domain may be from $-\pi/2$ to $+\pi/2$ (because the rectangualr function considered above it symmetric w.r.t zero). Please check it. If you want the result from 0 to $2 \pi$, additionally, please use the shifting theorem of FT to get your answer. I hope this helps you a bit.