Calculus II: Homework 6.1.50

Homework solution to 6.1.50

Problem 6.1.50

Part a

Here, we are asked to pick values for certain quantities that will split the following (shaded) area in half:

f[x_] = 1/x^2
Plot[f[x],{x,1,4},AxesLabel->{"x","y"},Filling->Axis,AxesOrigin->{0,0}]

First, we want to draw a (vertical) line at x=bthat bisects the area. This means we will split the region up into two areas. If we chose b=2, the split would look like this:

b=2
area1 = Plot[f[x],{x,1,b},Filling->Axis,FillingStyle->Green,AxesOrigin->{0,0}];
area2 = Plot[f[x],{x,b,4},Filling->Axis,FillingStyle->Red,AxesOrigin->{0,0}];

Show[ area1,area2,AxesOrigin->{0,0},AxesLabel->{"x","y"},PlotRange->{All,All}]

What we have above is for the specific line x=2 as the line that creates two regions.  What are the areas of the two regions? The area is given by the integral of the function  over the x limits of the region, so we have

Integrate[f[x],{x,1,2}]
Integrate[f[x],{x,2,4}]

We see that the area under the curve from 1 to 2 (the green area) is 1/2, and the area under the curve from 2 to 4 (the red area) is 1/4. The areas are not the same, so the b we have chosen (remember, we picked b=2) is wrong. How do we find the correct value of b? Well, what do we want? We want the area under the curve from 1 to b to equal the area under the curve from b to 4. The area under the curve is the integral. That will give us an equation! First, we have to Clear any variables that we assigned earlier:

Clear[b]
equation = Integrate[f[x],{x,1,b}] == Integrate[f[x],{x,b,4}]

Oh dear, that doesn't look good. The problem is Mathematica needs to know that b is between 1 and 4 before it can evaluate the integral (that's what the assumptions mean). We could do the integral by hand (it is a pretty simple integral), or just do the following.

Integrate[f[x],{x,1,b},Assumptions->{1<b<4}]

Integrate[f[x],{x,b,4},Assumptions->{1<b<4}]

equation=%==%%

We can now ask Mathematica to solve the equation for b:

Solve[equation,b]

We see that the b value we want is b=8/5. Let's check our answer:

b=8/5
area1 = Plot[f[x],{x,1,b},Filling->Axis,FillingStyle->Green,AxesOrigin->{0,0}];
area2 = Plot[f[x],{x,b,4},Filling->Axis,FillingStyle->Red,AxesOrigin->{0,0}];

Show[ area1,area2,AxesOrigin->{0,0},AxesLabel->{"x","y"},PlotRange->{All,All}]


Integrate[f[x],{x,1,b}]
Integrate[f[x],{x,b,4}]

Yes! We are correct.

Part b

The second way to bisect the area is by the (horizontal) line y=b. If we chose y=1/2, then we would have the two regions defined as follows.

Plot[{f[x],1/2},{x,1,4},AxesLabel->{"x","y"}]

Notice that we need to know where the graphs intersect, that is, where the line y=b=1/2intersects the curve f[x]. We can find that by solving the equation:

Solve[f[x]==1/2,x]

So at x=c=(Sqrt[2])(we do not use the negative root since it is not part of the domain that we are interested in), the line y=b=1/2 intersects the function f[x]. Knowing this, we can plot the regions, and find the area of the regions. We will use Mathematica to help us:

b = 1/2
c = Sqrt[2]
area1 = Plot[{f[x],b},{x,1,c},Filling->{1},FillingStyle->Red,AxesOrigin->{0,0}];
area2 = Plot[f[x],{x,c,4},Filling->Axis,FillingStyle->Green,AxesOrigin->{0,0}];
area3 = Plot[b,{x,1,c},Filling->Axis,FillingStyle->Green,AxesOrigin->{0,0}];

Show[area1,area2,area3,PlotRange->{All,All}]

See how we get the two areas? What is the value of the two areas? To get these areas, we could integrate with respect to x, but notice that the green area would have a change of definition of (Subscript[y, T])when we passed x=c=(Sqrt[2]). Using
Area = (∫_a^b)((Subscript[y, T])- (Subscript[y, B]))dx
This means the areas would be:

Integrate[f[x]-1/2,{x,1,Sqrt[2]}]
Integrate[1/2,{x,1,Sqrt[2]}]+Integrate[f[x],{x,Sqrt[2],4}]

These areas are not the same, because we chose y=1/2, which was an incorrect guess. But now we understand the problem enough to find the correct y! What we want is for the areas to be equal. So we can leave y unspecified and then impose the condition that the areas are equal to give us an equation we can solve for y. We could do this by hand, but let's use Mathematica to help us out.

First, I am going to clear Mathematica's memory of any of the constants I am using, just so I am sure what we do is right!

Clear[y,b,c]

First, we need to find the point where the two curves intersect. This is done via:

y = b
Solve[f[x]==y,x]

Now we know that when y=b, the curves will intersect at the point {c,b}=((1/(Sqrt[b])),b), so we can proceed to find an equation that equates the two areas:

c = 1/Sqrt[b]
equation = Integrate[f[x]-b,{x,1,c}] ==Integrate[b,{x,1,c}]+Integrate[f[x],{x,c,4}]

Whoops! Another problem with assumptions. What we need to tell Mathematica is that 0<b<1, or equivalently 1<c<4:

c = 1/Sqrt[b]
equation = Integrate[f[x]-b,{x,1,c},Assumptions->{1<c<4}] ==Integrate[b,{x,1,c},Assumptions->{1<c<4}]+Integrate[f[x],{x,c,4},Assumptions->{1<c<4}]

Let's solve this equation for b:

Solve[%,b]

Let's convert that symbolic answer to a numerical answer:

N[%]

Which one do we choose? Remember that we are looking for a line y=b which divides the region into two equal areas. That means that b has to be less than 1. If  b=2.59974, the line doesn't intersect the region at all! Aside: Can you think of what this number represents? Therefore, we choose b=0.150255. Let's check our result:

b =0.15025512860841106
Integrate[f[x]-b,{x,1,c}]
Integrate[b,{x,1,c}]+Integrate[f[x],{x,c,4}]

We see that we are correct!

b = 0.150255
c = 1/Sqrt[b]
area1 = Plot[{f[x],b},{x,1,c},Filling->{1},FillingStyle->Red,AxesOrigin->{0,0}];
area2 = Plot[f[x],{x,c,4},Filling->Axis,FillingStyle->Green,AxesOrigin->{0,0}];
area3 = Plot[b,{x,1,c},Filling->Axis,FillingStyle->Green,AxesOrigin->{0,0}];

Show[area1,area2,area3,PlotRange->{All,All}]

There is an easier way to do this, if we were to integrate with respect to y instead of x. Then the problem becomes essentially the same as what we did in part a!