MATH 166 Lecture 12: Example 2

Find the centroid of the planar lamina R bounded by
y=
x
and
y=
3
x
.

Plot the graphs of each curve to determine region R.

R=Plot[
x
,
3
x
,{x,0,1},Filling->1->{2},Epilog->Text["y =
x
",{0.4,0.8}],Text["y =
3
x
",{0.8,0.4}]]
Out[]=

Choose f(x) to be the upper function and g(x) to be the lower function. Also determine values for endpoints x = a and x = b of the interval on which these functions are defined.

In[]:=
f[x_]:=
x
In[]:=
g[x_]:=
3
x
Solve[f[x]==g[x],x]
Out[]=
{{x0},{x1}}
In[]:=
a=0;
In[]:=
b=1;

Find the coordinates of the centroid (
x
,
y
) using the formulas established in Lecture 12.

xbar=
b
∫
a
x(f[x]-g[x])x
b
∫
a
(f[x]-g[x])x
Out[]=
12
25
ybar=
b
∫
a
1
2
(f[x]+g[x])(f[x]-g[x])x
b
∫
a
(f[x]-g[x])x
Out[]=
3
7

Plot the centroid.

Centroid=ListPlot[​​{Labeled[{xbar,ybar},"(​
x
​,​
y
​)"]},PlotRange->{{0,1},{0,1}}]
Out[]=

Put the graphs of region R and centroid (
x
,
y
) on the same graph.

Show[{R,Centroid}]
Out[]=