How would I find the function given the magnitude plot and the phase response? I'm wondering how I'd find the Fourier Transform X(jw) given the following information: 

My understanding is that the expression for the continuous time fourier transform (CTFT) is magnitude(CTFT)exp(jw*phase), but I'm unsure how to use this expression here, since the phase is different for different values of w. I tried to do something piecewise: 

from (-pi to 0): 
X(jw)=rect(w/(pi))*exp(pi/2*j) = j*rect(w/pi)

from (0 to pi): 
X(jw)=rect(w/(pi))*exp(-pi/2*j) = -j*rect(w/pi)

This doesn't agree with the answer key: 
X(jw)=jrect((w+pi/2)/pi) - jrect((w-pi/2)/pi). 

Would appreciate any thoughts on how to better approach this problem, since I'm very confused. Thanks!

***please note, here, j is used instead of i, the imaginary number (sqrt(-1))
There is more than one way to write the same thing. You can use $rect()$ functions or define it piece-wise, but in the end it is the same thing, since the $rect()$ is just a shorthand for a piece-wise definition. 

If you do it in sections, you don't need to use $rect()$ function at all, you could simply write is as

$$X(j \omega) = \begin{cases}
 &amp;  j \text{ if } -\pi &lt; \omega &lt; 0\\ 
 &amp; -j \text{ if } 0 &lt; \omega &lt; \pi \\ 
 &amp; 0  \text{ otherwise}
\end{cases}
$$

The answer just puts it together as two rectangle functions: one for negative frequencies and one for the positive ones. 

Either way would be correct and I don't think one is "better" than the other unless there are some clear criteria what "better" means.