// Numbas version: exam_results_page_options {"name": "Centroids by integration ", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Centroids by integration ", "tags": ["area under curve", "centroidal coordinates", "centroids by integration", "first moment of area", "integration", "mechanics", "Mechanics", "Statics", "statics"], "metadata": {"description": "
Find the area, first moment of area, and coordinates of a general spandrel. The area may be above or below the function.
", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "{geogebra_applet('bqnqgpfp',[['n',n],['h',random(1,1.5)],['b',random(0.8,1.3)],['Above', above],['Vertical',vertical]])}
\nUse integration with {if(Vertical=1,'vertical','horizontal')} strips to determine the area of the spandrel bounded by the function $\\color{red}{y = f(x) = h - k \\simplify[all,fractionnumbers]{x^{n}}}$ and $\\var{if(Above=1, 'the lines $y=h$ and $x=b$','the $x$- and $y$-axes')}$, and also find the coordinates of its centroid. Note: b and h are constants.
", "advice": "Note: The solutions below is for Vertical Strips.
\nThe procedure for horizontal strips is similar, but with these strip properties and limits:
\nStrip properties: $dA = (b-x)\\,dy$, $\\bar{x}_{el} = \\dfrac{x+b}{y}$, $\\bar{y}_{el} = y $ $dA = x \\,dy$, $\\bar{x}_{el} = x/2$, $\\bar{y}_{el} =y$
\nLimits: $x= 0 \\text{ to } h$
\nYou will get the same results for $A, Q_x, Q_y, \\bar{x} \\text{ and } \\bar{y}$, which ever strips you choose.
\n1. Bounding function: $y = f(x) = h - k \\simplify[all,fractionnumbers]{x^{n}}$
\n2. Constant $k$ in terms of $b$: at $x=b, y=0 \\therefore h - k \\simplify[all,fractionnumbers]{b^{n}} = 0 \\therefore k = \\dfrac{h}{\\simplify[all,fractionnumbers]{b^{n}}}$
\n3. Strip properties: $dA = y\\,dx$, $\\bar{x}_{el} = x$, $\\bar{y}_{el} = y/2$ $dA = (h-y)\\,dx$, $\\bar{x}_{el} = x$, $\\bar{y}_{el} = (h+y)/2$
\n4. Limits: $x= 0 \\text{ to } b$
\n5. Area under the curve:
\n$\\begin{align} A &= \\int dA\\\\&= \\int_0^b y\\, dx\\\\&= \\int_0^b (h - k \\simplify[all,fractionnumbers]{x^{n}})\\, dx\\\\&= \\left[ hx - k \\dfrac{\\simplify[all,fractionnumbers]{x^{n+1}}}{\\simplify[all,fractionnumbers]{{n+1}}}\\right]_0^b\\\\&= \\left[ hb - \\left(\\dfrac{h}{\\simplify[all,fractionnumbers]{b^{n}}}\\right) \\dfrac{\\simplify[all,fractionnumbers]{b^{n+1}}}{\\simplify[all,fractionnumbers]{{n+1}}}\\right]\\\\&=hb-\\dfrac{hb}{\\simplify[all,fractionnumbers]{{n}+1}}\\\\&=\\var[all,fractionnumbers]{{n}/({n}+1)} h b\\end{align}$
\n$\\begin{align} A &= \\int dA\\\\&= \\int_0^b (h-y)\\, dx\\\\&= \\int_0^b h - (h - k \\simplify[all,fractionnumbers]{x^{n}})\\, dx\\\\&=\\int_0^bk \\simplify[all,fractionnumbers]{x^{n}}dx\\\\&= \\left[k \\dfrac{\\simplify[all,fractionnumbers]{x^{n+1}}}{\\simplify[all,fractionnumbers]{{n+1}}}\\right]_0^b\\\\&= \\left[ \\left(\\dfrac{h}{\\simplify[all,fractionnumbers]{b^{n}}}\\right) \\dfrac{\\simplify[all,fractionnumbers]{b^{n+1}}}{\\simplify[all,fractionnumbers]{{n+1}}}\\right]\\\\&=\\dfrac{hb}{\\simplify[all,fractionnumbers]{{n}+1}}\\\\&=\\var[all,fractionnumbers]{1/({n}+1)} h b\\end{align}$
\n6. $Q_x$ and $Q_y$ Perform similar integrations to get:
\n$Q_x = \\int \\bar{y}_{el}\\,dA = \\simplify[all,simplifyfractions,fractionnumbers]{{n}^2 /(2{n}^2+3{n}+1) h^2b} \\qquad Q_y = \\int \\bar{x}_{el}\\,dA = \\simplify[all,fractionnumbers,simplifyfractions]{{n}/(2{n}+4)} hb^2$
\n$Q_x = \\int \\bar{y}_{el}\\,dA = \\simplify[all,simplifyfractions,fractionnumbers]{(3{n}+1)/(2({n}+1)(2{n}+1))}h^2b \\qquad Q_y = \\int \\bar{x}_{el}\\,dA = \\simplify[all,fractionnumbers,simplifyfractions]{1/({n}+2)} hb^2$
\n7. Centroid:
\n$\\bar{x} = \\dfrac{Q_y}{A} = \\dfrac{\\simplify[all,fractionnumbers,simplifyfractions]{{n}/(2{n}+4)} hb^2}{\\var[all,fractionnumbers]{{n}/({n}+1)} h b} = \\simplify[all,collectnumbers]{({n}+1)/(2{n}+4)}b \\qquad \\bar{y} = \\dfrac{Q_x}{A} = \\dfrac{\\simplify[all,fractionnumbers,simplifyfractions]{{n^2}/(({n}+1)(2{n}+1))} h^2b}{\\var[all,fractionnumbers]{{n}/({n}+1)} h b} = \\simplify[all,collectnumbers,simplifyfractions]{{n}/(2{n}+1)}h $
\n$\\bar{x} = \\dfrac{Q_y}{A} = \\dfrac{\\simplify[all,fractionnumbers,simplifyfractions]{1/({n}+2)} hb^2}{\\var[all,fractionnumbers]{1/({n}+1)} h b} = \\simplify[all,collectnumbers]{({n}+1)/({n}+2)}b \\qquad \\bar{y} = \\dfrac{Q_x}{A} = \\dfrac{\\simplify[all,simplifyfractions,fractionnumbers]{(3{n}+1)/(2({n}+1)(2{n}+1))}h^2b}{\\var[all,fractionnumbers]{1/({n}+1)} h b} = \\simplify[all,collectnumbers,simplifyfractions]{(3{n}+1)/(4{n}+2)}h $
", "rulesets": {}, "extensions": ["geogebra"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"Qy": {"name": "Qy", "group": "answers", "definition": " simplify(substitute([\"n\" :n],\n if(Above=1, \n expression('h b^2/(n+2)'),\n expression('h b^2 n / (2 n + 4 )'))),\"basic,collectNumbers,simplifyFractions\")", "description": "", "templateType": "anything", "can_override": false}, "ybar_el": {"name": "ybar_el", "group": "answers", "definition": "expression(['y','y/2','y','(h+y)/2'][version])", "description": "", "templateType": "anything", "can_override": false}, "xbar": {"name": "xbar", "group": "answers", "definition": " simplify(substitute([\"n\" :n],\n if(Above=1,\n expression('b* (n+1)/(n+2)'),\n expression('b * (n+1)/(2n+4)'))),\"basic,collectNumbers,simplifyFractions,cancelTerms\")", "description": "expression(\"(\"+ string(Qy) +\")/(\"+ string(area) +\")\")
", "templateType": "anything", "can_override": false}, "debug": {"name": "debug", "group": "inputs", "definition": "false", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "inputs", "definition": "expression(if(vertical=1,'h/b^n','b/h^(1/n)'))", "description": "", "templateType": "anything", "can_override": false}, "Qx": {"name": "Qx", "group": "answers", "definition": " simplify(substitute([\"n\" :n],\n if(Above=1,\n expression('(b h^2 /2)(3n+1)/((n+1) (2n+1))'),\n expression('h^2 b n^2/((n+1)(2n+1))'))),\"basic,collectNumbers,simplifyFractions\")", "description": "", "templateType": "anything", "can_override": false}, "Above": {"name": "Above", "group": "inputs", "definition": "random(0,1)", "description": "area above or below the curve?
", "templateType": "anything", "can_override": false}, "version": {"name": "version", "group": "inputs", "definition": "2 above + vertical\n", "description": "0 = below horizontal
\n1 = below vertical
\n2 = above horizontal
\n3 = above vertical
\nhorizontal strips not implemented
", "templateType": "anything", "can_override": false}, "Vertical": {"name": "Vertical", "group": "inputs", "definition": "random(0,1)", "description": "0 = horizontal strips
\n1 = vertical strips? Horizontal strips not currently implemented.
\n\nCan't figure out how to pass a boolean to geogebra, so using {0,1} instead. Only exponents < 2 can be horizontal
", "templateType": "anything", "can_override": false}, "ybar": {"name": "ybar", "group": "answers", "definition": " simplify(substitute([\"n\" :n],if(Above=1,\n expression('h * (3 n +1)/(4 n+2)'),\n expression('h n / (2 n+1)'))),\"basic,collectNumbers,simplifyFractions\")", "description": "", "templateType": "anything", "can_override": false}, "area": {"name": "area", "group": "answers", "definition": "simplify(substitute([\"n\" :n], if(Above=1,\n expression('b h / (n+1)'),\n expression('b h n /(n +1)'))),\"basic,collectNumbers,simplifyFractions,cancelTerms\")", "description": "
ok
", "templateType": "anything", "can_override": false}, "lower_limit": {"name": "lower_limit", "group": "answers", "definition": "0", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "inputs", "definition": "random(1/3,1/2,1,3/2,2,3)", "description": "the exponent of the function (1-kx^n) (0.5 .. 5#0.5)
", "templateType": "anything", "can_override": false}, "upper_limit": {"name": "upper_limit", "group": "answers", "definition": "if(Vertical=1,'b','h')", "description": "", "templateType": "anything", "can_override": false}, "xbar_el": {"name": "xbar_el", "group": "answers", "definition": "expression(['x/2','x','(b+x)/2','x'][version])", "description": "", "templateType": "anything", "can_override": false}, "dA": {"name": "dA", "group": "answers", "definition": "expression(['x dy','y dx','(b-x) dy','(h-y) dx'][version])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "inputs", "variables": ["n", "version", "Vertical", "Above", "k", "debug"]}, {"name": "answers", "variables": ["dA", "xbar_el", "ybar_el", "upper_limit", "lower_limit", "area", "Qy", "xbar", "ybar", "Qx"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Bounding function", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "The bounding funtion contains a constant $k$ which can be expressed in terms of $b$ and $h$. Determine the value of $k$ in terms of b and h by substituting in the coordinates of a point which is on the curve into the bounding function.
\n$k$ = [[0]] {k}
\n", "gaps": [{"type": "jme", "useCustomName": true, "customName": "k", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "h/b^{n}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "b", "value": ""}, {"name": "h", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Strip", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Determine the area of the rectangular differential strip.
\n$dA$ = [[0]] {da}
\nDetermine expressions for the coordinates of the centroid of the strip.
\n$\\bar{x}_{el} = $ [[1]] $\\qquad\\bar{y}_{el} = $ [[2]] xbar= {xbar_el} ybar = {ybar_el}
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "$dA$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{dA}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "$\\bar{x}$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{xbar_el}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "$\\bar{y}$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{ybar_el}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Limits", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Determine the limits of integration for these strips.
\nLower limit is: [[0]] {0} $\\qquad$ Upper limit is: [[1]] {upper_limit}
", "gaps": [{"type": "patternmatch", "useCustomName": true, "customName": "lower", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "0", "displayAnswer": "", "matchMode": "exact"}, {"type": "patternmatch", "useCustomName": true, "customName": "upper", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{upper_limit}", "displayAnswer": "", "matchMode": "exact"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Area", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "With the information determined above, evaluate this integral to find the area of the spandrel in terms of constants b and h.
\n$A = \\int dA = $ [[0]]
\narea = {area}
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "area", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{area}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "First Moments", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Perform the following integrals to determine the first moments of area with respect to the x- and y-axis.
\n\n$Q_x = \\int \\bar{y}_{el} dA =$ [[0]] {Qx} $\\qquad Q_y = \\int \\bar{x}_{el} dA =$ [[1]] {Qy}
\n", "gaps": [{"type": "jme", "useCustomName": true, "customName": "qx", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{Qx}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "qy", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{Qy}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Centroid", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Use the information you found above to determine the coordinates of the centroid of the shaded spandrel.
\n$\\bar{x} = \\dfrac{Q_y}{A} = $ [[0]] {xbar} $\\qquad\\bar{y} = \\dfrac{Q_x}{A} = $ [[1]] {ybar}
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "xbar", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{xbar}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "ybar", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{ybar}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "William Haynes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2530/"}]}]}], "contributors": [{"name": "William Haynes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2530/"}]}