I need to draw the following figure in my latex using TikZ. I did the following:
\begin{tikzpicture}
\draw (-2,0) -- (2,0);
\draw (0,-2) -- (0,2);
\draw (0,0) circle (1cm);
\draw (1,-.3) node[right] {(2,0)};
\draw (-1,-.3) node[left] {(-2,0)};
\end{tikzpicture}
But how can I shade the upper semi-circle and how can I draw the arrows in between?
Additional Question
Thank you so much for your answer. But I have one more doubt: If I use these command in my question I get the diagram right aligned and above the question. But I need it to be beside the question. And sometimes I need to define exactly where I want it to be. What should I do for this?
\question Evaluate $\displaystyle\iint_R dxdy,$ where $R$ is the shaded region in the figure.
\begin{tikzpicture}
\draw (-2,0) -- (2,0);
\draw (0,-2) -- (0,2);
\draw (0,0) circle (1cm);
\draw (1,-.3) node[right] {(2,0)};
\draw (-1,-.3) node[left] {(-2,0)};
\draw[pattern=north west lines] (-1,0) --(1,0) arc[start angle=0, end angle=180, radius=1cm];
\end{tikzpicture}
Best Answer
Perhaps there is a better way, but here is one brute force way. You need to load the
tikzlibraries
patterns
andarrows.meta
in your preamble.