Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(b) Approximate the shaded area using a series of nrectangles, each of width a a

ID: 1815877 • Letter: #

Question

(b) Approximate the shaded area using a series of nrectangles, each of width a and of of the centroid of the shaded area. Locate the centroid when(i) m = 2, a = 4 in., h = 4 in.; (ii) m = 2, a = 4 in., h = 25 in.; (iii) m = 5, a = 4in., h = 4 in.; (iv) m = 5, a = 4 in., h = 25 in. In each case, compare the answers obtained tothe exact values of x and y (from analytical solution, in Part (a)) and determine thepercentage error. Need help determing how to write a program for Matlab or if itwould be possible to solve using Excel. Any help in writingcomputer code would be greatly appreciated. Thanks

Explanation / Answer


> y := k*x^m; > m := 2; > a := 4; > h := 4; > k := solve(subs(x = a, y) = h, k); > cgx := (int(x*y, x = 0 .. a))/(int(y, x = 0 .. a)); > x := (p/k)^(1/m); > cgy := (int(x*p, p = 0 .. h))/(int(x, p = 0 .. h));

Note that I used the variable p, this p represents y, but ineeded it to find x as a function of y. > y := k*x^m; > m := 2; > a := 4; > h := 4; > k := solve(subs(x = a, y) = h, k); > cgx := (int(x*y, x = 0 .. a))/(int(y, x = 0 .. a)); > x := (p/k)^(1/m); > cgy := (int(x*p, p = 0 .. h))/(int(x, p = 0 .. h));

Note that I used the variable p, this p represents y, but ineeded it to find x as a function of y.