Jamie's question from Yahoo Answers regarding centroids

  • MHB
  • Thread starter Chris L T521
  • Start date
  • Tags
    Centroids
In summary: If you don't have LaTeX installed on your computer, you can use an online compiler like Overleaf. Hope that helps!In summary, the conversation discusses finding the centroid of a region bounded by the curves x+y=2 and x=y^2. The expert provides a detailed explanation and solution using multivariable calculus and includes TikZ codes for two figures. They also recommend using LaTeX or an online compiler like Overleaf to compile the code.
  • #1
Chris L T521
Gold Member
MHB
915
0
Here is the question.

Centroid of x+y=2 x=y^2?

Here is a link to the question:

Centroid of x+y=2 x=y^2? - Yahoo! Answers

I have posted a link there to this topic so the OP can find my response.
 
Mathematics news on Phys.org
  • #2
Hi Jamie,

The region that we're supposed to find the centroid for can be found in the figure below.
mhb_centroid.png
Assuming that you know multivariable calculus, one defines the centroid as $(\bar{x},\bar{y})$ where
\[\bar{x}= \frac{\displaystyle\iint\limits_R x\,dA}{\displaystyle\iint\limits_R \,dA}=\frac{1}{\text{Area of $R$}}\iint\limits_R x\,dA\qquad\text{ and }\qquad \bar{y}= \frac{\displaystyle\iint\limits_R y\,dA}{\displaystyle\iint\limits_R \,dA}=\frac{1}{\text{Area of $R$}}\iint\limits_R y\,dA\]
Due to the region $R$ we have, it would be best to treat it as a type II region and treat the bounding functions as functions of the form $x=f(y)$ (if we treated the region as type I, then we'd have more than one integral to work with for each of $\bar{x}$ and $\bar{y}$). With that said, the two bounding functions are $x=2-y$ and $x=y^2$.

Thus, we see that
\[\begin{aligned} \iint\limits_R \,dA &= \int_{-2}^1\int_{y^2}^{2-y}\,dx\,dy \\ &= \int_{-2}^1 2-y-y^2\,dy \\ &= \left.\left[ 2y-\frac{1}{2}y^2-\frac{1}{3}y^3\right]\right|_{-2}^1\\ &= \left(2-\frac{1}{2}-\frac{1}{3}\right) - \left(-4 -2 + \frac{8}{3}\right)\\ &= \frac{9}{2}\end{aligned}\]

\[\begin{aligned} \iint\limits_R x\,dA &= \int_{-2}^1\int_{y^2}^{2-y} x\,dx\,dy\\ &= \frac{1}{2}\int_{-2}^1 \left.\left[ x^2\right]\right|_{y^2}^{2-y}\,dy\\ &= \frac{1}{2}\int_{-2}^1 4-4y+y^2-y^4\,dy \\ &= \frac{1}{2}\left.\left[ 4y - 2y^2+\frac{1}{3}y^3- \frac{1}{5}y^5\right]\right|_{-2}^1\\ &= \frac{1}{2}\left[\left( 4-2+\frac{1}{3}-\frac{1}{5}\right) - \left( -8-8-\frac{8}{3} +\frac{32}{5}\right)\right]\\ &= \frac{36}{5}\end{aligned}\]

\[\begin{aligned} \iint\limits_R y\,dA &= \int_{-2}^1\int_{y^2}^{2-y} y\,dx\,dy\\ &= \int_{-2}^1 y(2-y-y^2)\,dy\\ &= \int_{-2}^1 2y-y^2-y^3\,dy \\ &= \left.\left[y^2-\frac{1}{3}y^3-\frac{1}{4}y^4\right]\right|_{-2}^1\\ &= \left[\left(1-\frac{1}{3}-\frac{1}{4}\right) - \left(4+\frac{8}{3} - 4\right)\right]\\ &= -\frac{9}{4}\end{aligned}\]

Therefore,

\[\bar{x}= \frac{\displaystyle\iint\limits_R x\,dA}{\displaystyle\iint\limits_R \,dA}= \frac{\dfrac{36}{5}}{\dfrac{9}{2}} = \frac{8}{5}\]

and

\[\bar{y}= \frac{\displaystyle\iint\limits_R y\,dA}{\displaystyle\iint\limits_R \,dA}= \frac{-\dfrac{9}{4}}{\dfrac{9}{2}} = -\frac{1}{2}\]

Thus, the centroid of this region is $(\bar{x},\bar{y})=\left(\dfrac{8}{5},-\dfrac{1}{2}\right)$ (as seen in the figure below).
mhb_centroid2.png
I hope this made sense!
 
  • #3
For those of you who are interested, here's the TikZ codes for the two figures (in two separate posts because apparently I've exceeded the character limit for a single post).

mhb_centroid.png

Code:
[COLOR=#0000CC]\begin[/COLOR][COLOR=#000000]{figure}[![/COLOR][COLOR=#000000]ht[/COLOR][COLOR=#000000]][/COLOR]
[COLOR=#800000]\centering[/COLOR]
[COLOR=#0000cc]\begin[/COLOR][COLOR=#000000]{tikzpicture}[/COLOR][COLOR=#9a4d00][scale=[/COLOR][COLOR=#660066].95[/COLOR][COLOR=#9a4d00]][/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00][very thin,color=gray![/COLOR][COLOR=#660066]35[/COLOR][COLOR=#9a4d00]] (-[/COLOR][COLOR=#660066]5.5[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]3.5[/COLOR][COLOR=#9a4d00]) grid ([/COLOR][COLOR=#660066]5.5[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]3.5[/COLOR][COLOR=#9a4d00]);[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00][<->] (-[/COLOR][COLOR=#660066]5.5[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00]) -- ([/COLOR][COLOR=#660066]5.5[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00]) node[right]{[/COLOR][COLOR=#008000]$x$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00][<->] ([/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]4[/COLOR][COLOR=#9a4d00]) -- ([/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]4[/COLOR][COLOR=#9a4d00]) node[above]{[/COLOR][COLOR=#008000]$y$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#006699]   \foreach[/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00] in {-[/COLOR][COLOR=#660066]5[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]4[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]3[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]3[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]4[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]5[/COLOR][COLOR=#9a4d00]}{[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00] ([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066].1[/COLOR][COLOR=#9a4d00]) -- ([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066].1[/COLOR][COLOR=#9a4d00]) node[below]{[/COLOR][COLOR=#008000]$\x$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#9a4d00]      }[/COLOR]
[COLOR=#006699]   \foreach[/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00] in {-[/COLOR][COLOR=#660066]3[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]3[/COLOR][COLOR=#9a4d00]}{[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00] (-[/COLOR][COLOR=#660066].1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00]) -- ([/COLOR][COLOR=#660066].1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00]) node[right]{[/COLOR][COLOR=#008000]$\x$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#9a4d00]     }[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00][<->,blue,thick]([/COLOR][COLOR=#660066]5.5[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]3.5[/COLOR][COLOR=#9a4d00]) -- (-[/COLOR][COLOR=#660066]1.5[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]3.5[/COLOR][COLOR=#9a4d00]) node[above,left]{[/COLOR][COLOR=#008000]$x+y=2$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#006699]   \fill[/COLOR][COLOR=#9a4d00][color=blue,opacity=[/COLOR][COLOR=#660066].25[/COLOR][COLOR=#9a4d00]] ([/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00]) -- ([/COLOR][COLOR=#660066]4[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00]) -- plot[domain=[/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00]:[/COLOR][COLOR=#660066]4[/COLOR][COLOR=#9a4d00],smooth,samples=[/COLOR][COLOR=#660066]1500[/COLOR][COLOR=#9a4d00]]([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00],{-sqrt([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00])}) 
   -- plot[domain=[/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00]:[/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00],smooth,samples=[/COLOR][COLOR=#660066]1500[/COLOR][COLOR=#9a4d00]]([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00],{sqrt([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00])}) --  cycle;[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00] ([/COLOR][COLOR=#660066]1.5[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]0.5[/COLOR][COLOR=#9a4d00]) node{[/COLOR][COLOR=#008000]$R$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00][red,thick] plot[domain=[/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00]:[/COLOR][COLOR=#660066]5.5[/COLOR][COLOR=#9a4d00],smooth,samples=[/COLOR][COLOR=#660066]1500[/COLOR][COLOR=#9a4d00]] ([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00], {-sqrt([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00])});[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00][red,thick] plot[domain=[/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00]:[/COLOR][COLOR=#660066]5.5[/COLOR][COLOR=#9a4d00],smooth,samples=[/COLOR][COLOR=#660066]1500[/COLOR][COLOR=#9a4d00]] ([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00], {sqrt([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00])}) node[above]{[/COLOR][COLOR=#008000]$x=y^2$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#006699]   \fill[/COLOR][COLOR=#9a4d00] ([/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00]) circle ([/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00]pt) node[right=[/COLOR][COLOR=#660066].2[/COLOR][COLOR=#9a4d00]cm]{[/COLOR][COLOR=#008000]$(1,1)$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#006699]   \fill[/COLOR][COLOR=#9a4d00] ([/COLOR][COLOR=#660066]4[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00]) circle ([/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00]pt) node[below=[/COLOR][COLOR=#660066].25[/COLOR][COLOR=#9a4d00]cm,left]{[/COLOR][COLOR=#008000]$(4,-2)$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#0000cc]\end[/COLOR][COLOR=#000000]{tikzpicture}[/COLOR]
[COLOR=#800000]\caption[/COLOR][COLOR=#000000]{The region [/COLOR][COLOR=#008000]$R$[/COLOR][COLOR=#000000] bounded by the curves [/COLOR][COLOR=#008000]$x+y=2$[/COLOR][COLOR=#000000] and [/COLOR][COLOR=#008000]$x=y^2$[/COLOR][COLOR=#000000].}
[/COLOR][COLOR=#0000CC]\end[/COLOR][COLOR=#000000]{figure}[/COLOR]
 
  • #4
mhb_centroid2.png

Code:
[COLOR=#0000CC]\begin[/COLOR][COLOR=#000000]{figure}[![/COLOR][COLOR=#000000]ht[/COLOR][COLOR=#000000]][/COLOR]
[COLOR=#800000]\centering[/COLOR]
[COLOR=#0000cc]\begin[/COLOR][COLOR=#000000]{tikzpicture}[/COLOR][COLOR=#9a4d00][scale=[/COLOR][COLOR=#660066].95[/COLOR][COLOR=#9a4d00]][/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00][very thin,color=gray![/COLOR][COLOR=#660066]35[/COLOR][COLOR=#9a4d00]] (-[/COLOR][COLOR=#660066]5.5[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]3.5[/COLOR][COLOR=#9a4d00]) grid ([/COLOR][COLOR=#660066]5.5[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]3.5[/COLOR][COLOR=#9a4d00]);[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00][<->] (-[/COLOR][COLOR=#660066]5.5[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00]) -- ([/COLOR][COLOR=#660066]5.5[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00]) node[right]{[/COLOR][COLOR=#008000]$x$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00][<->] ([/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]4[/COLOR][COLOR=#9a4d00]) -- ([/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]4[/COLOR][COLOR=#9a4d00]) node[above]{[/COLOR][COLOR=#008000]$y$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#006699]   \foreach[/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00] in {-[/COLOR][COLOR=#660066]5[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]4[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]3[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]3[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]4[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]5[/COLOR][COLOR=#9a4d00]}{[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00] ([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066].1[/COLOR][COLOR=#9a4d00]) -- ([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066].1[/COLOR][COLOR=#9a4d00]) node[below]{[/COLOR][COLOR=#008000]$\x$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#9a4d00]     }[/COLOR]
[COLOR=#006699]   \foreach[/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00] in {-[/COLOR][COLOR=#660066]3[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]3[/COLOR][COLOR=#9a4d00]}{[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00] (-[/COLOR][COLOR=#660066].1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00]) -- ([/COLOR][COLOR=#660066].1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00]) node[right]{[/COLOR][COLOR=#008000]$\x$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#9a4d00]     }[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00][<->,blue,thick]([/COLOR][COLOR=#660066]5.5[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]3.5[/COLOR][COLOR=#9a4d00]) -- (-[/COLOR][COLOR=#660066]1.5[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]3.5[/COLOR][COLOR=#9a4d00]) node[above,left]{[/COLOR][COLOR=#008000]$x+y=2$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#006699]   \fill[/COLOR][COLOR=#9a4d00][color=blue,opacity=[/COLOR][COLOR=#660066].25[/COLOR][COLOR=#9a4d00]] ([/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00]) -- ([/COLOR][COLOR=#660066]4[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00]) -- plot[domain=[/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00]:[/COLOR][COLOR=#660066]4[/COLOR][COLOR=#9a4d00],smooth,samples=[/COLOR][COLOR=#660066]1500[/COLOR][COLOR=#9a4d00]]([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00],{-sqrt([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00])}) 
   -- plot[domain=[/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00]:[/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00],smooth,samples=[/COLOR][COLOR=#660066]1500[/COLOR][COLOR=#9a4d00]]([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00],{sqrt([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00])}) --  cycle;[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00] ([/COLOR][COLOR=#660066]1.5[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]0.5[/COLOR][COLOR=#9a4d00]) node{[/COLOR][COLOR=#008000]$R$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00][red,thick] plot[domain=[/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00]:[/COLOR][COLOR=#660066]5.5[/COLOR][COLOR=#9a4d00],smooth,samples=[/COLOR][COLOR=#660066]1500[/COLOR][COLOR=#9a4d00]] ([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00], {-sqrt([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00])});[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00][red,thick] plot[domain=[/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00]:[/COLOR][COLOR=#660066]5.5[/COLOR][COLOR=#9a4d00],smooth,samples=[/COLOR][COLOR=#660066]1500[/COLOR][COLOR=#9a4d00]] ([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00], {sqrt([/COLOR][COLOR=#006699]\x[/COLOR][COLOR=#9a4d00])}) node[above]{[/COLOR][COLOR=#008000]$x=y^2$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#006699]   \fill[/COLOR][COLOR=#9a4d00] ([/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00],[/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00]) circle ([/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00]pt) node[right=[/COLOR][COLOR=#660066].2[/COLOR][COLOR=#9a4d00]cm]{[/COLOR][COLOR=#008000]$(1,1)$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#006699]   \fill[/COLOR][COLOR=#9a4d00] ([/COLOR][COLOR=#660066]4[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00]) circle ([/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00]pt) node[below=[/COLOR][COLOR=#660066].25[/COLOR][COLOR=#9a4d00]cm,left]{[/COLOR][COLOR=#008000]$(4,-2)$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#006699]   \fill[/COLOR][COLOR=#9a4d00][blue] ([/COLOR][COLOR=#660066]1.6[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066].5[/COLOR][COLOR=#9a4d00]) circle ([/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00]pt);[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00][blue] (-[/COLOR][COLOR=#660066]2.5[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00])  node{[/COLOR][COLOR=#008000]$(\bar{x},\bar{y})=\left(\frac{8}{5},-\frac{1}{2}\right)$[/COLOR][COLOR=#9a4d00]};[/COLOR]
[COLOR=#006699]   \draw[/COLOR][COLOR=#9a4d00][->,color=blue] (-[/COLOR][COLOR=#660066]1[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066]2[/COLOR][COLOR=#9a4d00]) to[out=[/COLOR][COLOR=#660066]0[/COLOR][COLOR=#9a4d00],in=[/COLOR][COLOR=#660066]270[/COLOR][COLOR=#9a4d00]] ([/COLOR][COLOR=#660066]1.6[/COLOR][COLOR=#9a4d00],-[/COLOR][COLOR=#660066].6[/COLOR][COLOR=#9a4d00]);[/COLOR]
[COLOR=#0000cc]\end[/COLOR][COLOR=#000000]{tikzpicture}[/COLOR]
[COLOR=#800000]\caption[/COLOR][COLOR=#000000]{The centroid of the region [/COLOR][COLOR=#008000]$R$[/COLOR][COLOR=#000000] bounded by the curves [/COLOR][COLOR=#008000]$x+y=2$[/COLOR][COLOR=#000000] and [/COLOR][COLOR=#008000]$x=y^2$[/COLOR][COLOR=#000000].}
[/COLOR][COLOR=#0000CC]\end[/COLOR][COLOR=#000000]{figure}[/COLOR]
 
  • #5
That is really great , thanks for sharing the code . By the way , do I need a program to render the code or I can do it online ?

PS : I need to draw some contours for the lessons I am about to write .
 
  • #6
ZaidAlyafey said:
That is really great , thanks for sharing the code . By the way , do I need a program to render the code or I can do it online ?

PS : I need to draw some contours for the lessons I am about to write .

If you have LaTeX installed on your computer, then you should have no problem compiling it. You'll just need to include \usepackage{tikz} in the preamble of your document.
 

FAQ: Jamie's question from Yahoo Answers regarding centroids

What is a centroid?

A centroid is the geometric center of a shape or object. It is the point where all the mass of the object is evenly distributed, and it is often referred to as the "center of gravity."

How is a centroid calculated?

The centroid is calculated by finding the average of all the points in a shape. For a two-dimensional shape, the centroid can be calculated by finding the average of the x-coordinates and the average of the y-coordinates. For a three-dimensional shape, the centroid can be calculated using the same method with the addition of finding the average of the z-coordinates.

What are some practical applications of centroids?

Centroids are used in many different fields, such as engineering, physics, and mathematics. They are particularly important in structural analysis, as they can help determine the stability and balance of a structure. Centroids are also used in computer graphics to determine the position of objects in a 3D space, and in statistics to calculate the center of a distribution.

Can a centroid be located outside of the shape?

Yes, a centroid can be located outside of the shape. This is particularly common in irregular or asymmetrical shapes. In these cases, the centroid will still represent the center of mass of the shape, even if it is not physically located within the shape itself.

How is a centroid different from a center of mass?

The terms centroid and center of mass are often used interchangeably, but there is a slight difference between the two. While the centroid represents the geometric center of a shape, the center of mass takes into account the distribution of mass within the shape. This means that the center of mass may not always align with the centroid, particularly in shapes with varying densities.

Back
Top