+ (b) Analysis for f(x) = - x^4/20 + 11/15 x^3 - 17/5 x^2 + 24/5 x + 6.

We use a sum squared function (which we explain below) to minimize for solving two distance equations will not work in this case.

- We enter the function and determine where it crosses the axes in order to get a reasonable plot.

Input := 

f[x_] = - x^4/20 + 11/15 x^3  - 17/5 x^2 + 24/5 x + 6;
Input := 

solRoots = Solve[f[x]==0,x]//N
Output =


{{x -> 3.84235 - 2.34586 I}, 

  {x -> 3.84235 + 2.34586 I}, {x -> -0.764367}, 

  {x -> 7.74633}}

Input := 

xl = x/.solRoots[[3]]; xr = x/.solRoots[[4]];
Input := 

fPlot = Plot[f[x],{x,xl,xr},AspectRatio->Automatic]
Output =


-Graphics-

- We believe that the circle will be tangent to the curve at two points, say (x0, f(x0)) and (x1, f(x1)) and tangent to the x-axis at say (a, 0). We need to determine these three values: x0, x1, and a.

- We find the lines perpendicular to the curve at the points of tangency and determine where they intersect. Then the distances from each of the tangency points to the center of the inscribed circle should be the same and should be equal to the height from the x-axis.

Input := 

eq0 = y - f[x0] == -1/f'[x0] (x - x0);
Input := 

eq1 = y - f[x1] == -1/f'[x1] (x - x1);
Input := 

sol = Expand[Solve[{eq0,eq1},{x,y}]];

- pt is the point of intersection of the lines perpendicular to the curve at the points of tangency.

Input := 

pt = {x,y}/.sol[[1]];

- So we see we have the point of intersection pt = (x, y) in terms of x0 and x1. We need to determine x0 and x1 and hence need two equations in these unknowns. Thus we determine the x0 and x1 values so that

(1) the distance from pt to (x1, f(x1)) is the same as the distance from pt to (x0, f(x0)) and

(2) the distance from the x axis to pt is the same as the distance from pt to, say (x0, f(x0)) .

- Here we square both sides of the above distance equation and substract to obtain expressions in x0 and x1 which must equal zero.

- Then we square each expression and add them to get a function r(x0,x1) which is equal to 0 if and only if each of the distance equations is satisfied.

- In order to determine when the non-negative function r(x0,x1), the sum of two squares, is zero we determine where this function has a minimum.

- We do this because Mathematica's FindRoot command for this system of equations resulting from the distance equations did not converge.

Input := 

d1 = (pt[[1]] - x0)^2 + (pt[[2]] - f[x0])^2 -
	((pt[[1]] - x1)^2 + (pt[[2]] - f[x1])^2) == 0; 
Input := 

d2 = (pt[[1]] - x0)^2 + (pt[[2]] - f[x0])^2 - 
	pt[[2]]^2 == 0;
Input := 

r[x0_,x1_] = d1[[1]]^2 + d2[[1]]^2;
Input := 

solp = FindMinimum[r[x0,x1],{x0,0},{x1,4},
		MaxIterations->50]
Output =


           -19

{1.98784 10   , {x0 -> -0.457193, x1 -> 3.55029}}

- So now we have the x coordinates of our two points of tangency (x0, f(x0)) and (x1, f(x1)) on the curve. We call them z0 and z1 respectively.

Input := 

z0 = x0/.solp[[2]]; z1 = x1/.solp[[2]];

- And we determine the point, newpt, which will serve as the center of the circle.

Input := 

newpt = pt/.solp[[2]]
Output =


{2.22639, 2.70259}

- This means our contact with the x-axis occurs at point (a, 0) where a is given below:

Input := 

a = pt[[1]]/.solp[[2]]
Output =


2.22639

- And the radius of the maximum inscribed circle is given by rad below:

Input := 

rad = pt[[2]]/.solp[[2]]
Output =


2.70259

- We plot the two points of tangency (x0, f(x0)) and (x1, f(x1)) on the curve.

Input := 

pts = Show[Graphics[{PointSize[.10],Point[{z0,f[z0]}],
	Point[{z1,f[z1]}]}],
	AspectRatio->Automatic,
	PlotRange->{{-4,10},{-4,10}}]
Output =


-Graphics-

- We plot the circle which is tangent to the two points (x0, f(x0)) and (x1, f(x1)) on the curve and the x-axis.

Input := 

circle = ParametricPlot[{rad Cos[t] + a,
	rad Sin[t] + rad},
	{t,0, 2 Pi},AspectRatio->Automatic,
	PlotRange->{{-4,10},{-4,10}}]
Output =


-Graphics-

- And we superimpose all three plots to see the situation.

Input := 

Show[fPlot,pts,circle]
Output =


-Graphics-

- Finally we determine the area of this maximum circle inscribed in our region.

Input := 

MaxArea = Pi newpt[[2]]^2//N
Output =


22.9461