Answer:
a)

b)

Step-by-step explanation:
a) The first part requires that we use line integral to evaluate directly.
The line integral is

where C is counterclockwise around the triangle with vertices (0, 0), (1, 0), and (1, 2)
The boundary of integration is shown in the attachment.
Our first line integral is

The equation of this line is y=0, x varies from 0 to 1.
When we substitute y=0 every becomes zero.

Our second line integral is

The equation of this line is:

y varies from 1 to 2.
We substitute the boundary and the values to get:


The 3rd line integral is:

The equation of this line is

x varies from 0 to 1.
We substitute to get:


The value of the line integral is


b) The second part requires the use of Green's Theorem to evaluate:

Since C is a closed curve with counterclockwise orientation, we can apply the Green's Theorem.
This is given by:


We choose our region of integration parallel to the y-axis.


