Area Between Curves
> with(plots):
(page 434) If f and g are continuous and
for all x
[a,b] then the area A of the region bounded by y = f(x), y = g(x), x = a and x = b is
= the "integral of the 'top' function minus the 'bottom' function."
e.g. Find the region bounded by
and
.
> f:=x+1:g:=9-x^2:plot({f,g},x=-6..6,y=-10..10,colour=black);
> limits:=solve(f=g);
> Area:=Int((g-f),x=limits[2]..limits[1]);
> value(%);
> evalf(%,3);
=> The bounded area is ~ 31.6 sq. units.
e.g Find the area bounded by
and
.
> eq1:=y=x-1;eq2:=y^2=2*x+6;
> implicitplot({eq1,eq2},x=-6..8,y=-4..6,colour=black,numpoints=1000);
> solve({eq1,eq2});
There is a problem in that as you move from left to right the top and bottom functions change! From x = -3 to -1,
is the top function and
is the bottom function.From x = -1 to x = 5,
is the top function
but
is the new bottom function and this must be taken into account when finding the area! See below.
> Top:=sqrt(2*x+6);Bottom1:=-Top;Bottom2:=x-1;
> Area:=Int(Top-Bottom1,x=-3..-1)+Int(Top-Bottom2,x=-1..5);
> value(Area)*`square units`;
Integration "along the y-axis"
The last e.g. was a
lot
of work because of the nature of the region. If you look at it with respect to the y-axis though it becomes much simpler. As you move along the y-axis from bottom to top there is a single (and simple)
rightmost
function of
y
(namely
) and a single (and simple)
leftmost
function of y (namely
). It follows that this would be a much smpler problem if we
integrate with respect to y
, moving from "down" to "up" (i.e. from the negative to positive y direction). See below, keeping in mind that we know from before the y coordinates of the intersection points.
> right:=y+1;left:=(y^2-6)/2;
> Area2:=Int(right-left,y=-2..4);
> value(Area2)*`square units`;
You can see we get the same answer and it's much less work!
In general
: If
and
are continuous functions and
for all
y
[c,d] then the area bounded by f and g between y = c and y = d is
.
More e.g.'s: Find the area of the region bounded by the given curves.
A)
and
> f:=x^2:g:=x^3:plot({f,g},x=-2..2,y=-2..2,colour=black);
> solve(f=g);
> A:=Int(f-g,x=0..1);value(A)*`sq units`;
B)
,
.
> eq1:=y^2=x;eq2:=x-2*y=3;implicitplot({eq1,eq2},x=-1..10,y=-4..4,colour=black);
> solve({eq1,eq2});
> right:=3+2*y;left:=y^2;
> A:=Int(right-left,y=-1..3);value(A)*`sq units`;
# 47, pg 439:
Find the values of c so that the region enclosed by
and
is 576.
> top:=c^2-x^2;bottom:=x^2-c^2;
> solve(top=bottom);
> area:=Int(top-bottom,x=-c..c);area:=value(area);
> solve(area=576,c);
=> c can be 6 or -6.