function horizontalRegion(f, g, a, b)
%HORIZONTALREGION   Plots a horizontally simple region
%   HORIZONTALREGION(f, g, a, b) plots the region between y = a
%   and y = b, bounded by the graphs x=f(y) and x=g(y).
x0 = f(fminbnd(f, a, b));
x1 = g(fminbnd(@(x) -g(x), a, b));
fimplicit(@(x,y) x - f(y), [x0, x1, a, b]), hold on
fimplicit(@(x,y) x - g(y), [x0, x1, a, b], 'Linewidth', 2)
ycoord = linspace(a, b, 20);
xcoord = [f(ycoord); g(ycoord)];
plot(xcoord, [ycoord;ycoord]), hold off
end