For assistance checking the derivative h'(x), try the Derivative Calculator.
Polynomial and Exponential: f (x)=x e^{x} (g(x)=x, h'(x)=e^{x}) [a,b]=[0.5,1.5] 
Polynomial and Trigonometric: f (x)=x cos(x) (g(x)=x, h'(x)=cos(x)) [a,b]=[0,Pi/2] 

Exponential and Trigonometric: f (x)=e^{x} cos(x) (g(x)=e^{x}, h'(x)=cos(x)) [a,b]=[0,Pi/2] 
Logarithmic: f (x)=ln(x) (g(x)=ln(x), h'(x)=1) [a,b]=[2,6] 
In the right graph, the curve graphed is given by (u,v)=(g(x),h(x)) for x in [a,b], with areas between the curve and the vertical v axis colored blue and red as in the right graph (but oriented differently), and areas between the curve and the horizontal u axis colored green (for positive areas) and orange (for negative areas).
Values of c=g(a) and d=g(b) (interval endpoints on the uaxis), and e=h(a) and f=h(b) (interval endpoints on the vaxis) are also shown  the total net area of the colored regions in the right graph will be dfce.
Moreover, the corresponding blue and red regions will have the same area in the two graphs.
Recall the formula for Integration by Parts: ∫u dv = uv  ∫v du
In the "Polynomial and Exponential" example above, the overall shaded region in the right graph appears as an inverted "L" shape, from a large rectangular region (with area df) minus a smaller rectangular region (with area ce). This corresponds to the uv term of the Integration by Parts formula, evaluated with the endpoints a and b. The area shaded green in the example corresponds to the integral ∫v du (v on vertical axis with respect to u on horizontal axis). Subtracting this region from the "L" shaped region leaves only the blue region in the right graph. This blue region corresponds to the integral ∫u dv (u with respect to v), and has the same area as the region shaded blue in the left graph.
Be aware that regions in the right graph may overdraw (for example, a blue region may overdraw an orange region)  in this case, the overdrawn regions combine colors, but the resulting combinations are somewhat unpredictable, and may even include solid black or white regions. The endpoints of the intervals in the examples above have been carefully chosen to avoid this possibility.
Update: With the upgrade to the Java2 platform for this applet, the behavior in the right graph when regions overdraw is different  the regions overdraw as if they are simply semitransparent layers. This makes the color combinations a bit more predictable.