- #1

arhzz

- 241

- 46

- Homework Statement:
- Find xs and ys

- Relevant Equations:
- Integration

Hello!

Im given this function ## f:[-\pi/2,1] -> [0,1]## with f(x) = 1-x for x (0,1] and f(x) = cos(x) for x ##[-\pi/2,0] ##

And im susposed to find the centroid of this function so xs and ys.

For that I am given these 2 equations ( I found them in the notes)

## x_s =\frac{1}{A} \int_{a}^{b} f(x) x dx ## and ##y_s =\frac{1}{A} \int_{a}^{b} \frac{f(x)}{2}*f(x) dx##

Now to calculate A I found this formula ## A = \int_{a}^{b} f(x) dx ##

Okay so now looking at my problem specificly I have 2 diffrent values for the function depending on where it is. So I calculated A1 and A2; one for 1-x with the integral bounderies going from 0 to 1 and A2 for cos(x) with integral bounderies being -pi/2 and 1

I get ## A_1= \frac{1}{2} ## and ##A_2 = 1 ## Think that should be correct. Now since I have 2 A's (A should be the surface) I went ahead and caluclated using the formulas I posted above xs1 and xs2. For xs1 I used A1 and the same integral bounderies (0 to 1); for xs2 I used A2 and -pi/2 to 1

I get ##xs_1 = \frac{1}{3} ## and ##xs_2 = 1 - \frac{\pi}{2} ## Okay now to get a final xs I tried adding xs1 and xs2 together

After doing that i get this ##x_s =\frac{8-3\pi}{6} ## for xs. The solution says it should be ##xs = \frac{7-3\pi}{9} ##

I have rechecked all of my integrals and they should be correct,so im making a mistake somewhere else.I am not to sure what to do when I have 2 xs's, can i just add them together or not? Am i choosing the integral bounderies correctly or not?

Thanks in advance.

Im given this function ## f:[-\pi/2,1] -> [0,1]## with f(x) = 1-x for x (0,1] and f(x) = cos(x) for x ##[-\pi/2,0] ##

And im susposed to find the centroid of this function so xs and ys.

For that I am given these 2 equations ( I found them in the notes)

## x_s =\frac{1}{A} \int_{a}^{b} f(x) x dx ## and ##y_s =\frac{1}{A} \int_{a}^{b} \frac{f(x)}{2}*f(x) dx##

Now to calculate A I found this formula ## A = \int_{a}^{b} f(x) dx ##

Okay so now looking at my problem specificly I have 2 diffrent values for the function depending on where it is. So I calculated A1 and A2; one for 1-x with the integral bounderies going from 0 to 1 and A2 for cos(x) with integral bounderies being -pi/2 and 1

I get ## A_1= \frac{1}{2} ## and ##A_2 = 1 ## Think that should be correct. Now since I have 2 A's (A should be the surface) I went ahead and caluclated using the formulas I posted above xs1 and xs2. For xs1 I used A1 and the same integral bounderies (0 to 1); for xs2 I used A2 and -pi/2 to 1

I get ##xs_1 = \frac{1}{3} ## and ##xs_2 = 1 - \frac{\pi}{2} ## Okay now to get a final xs I tried adding xs1 and xs2 together

After doing that i get this ##x_s =\frac{8-3\pi}{6} ## for xs. The solution says it should be ##xs = \frac{7-3\pi}{9} ##

I have rechecked all of my integrals and they should be correct,so im making a mistake somewhere else.I am not to sure what to do when I have 2 xs's, can i just add them together or not? Am i choosing the integral bounderies correctly or not?

Thanks in advance.

Last edited: