// Numbas version: exam_results_page_options {"name": "1.2.5.3 Rewrite expressions using a single index", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "1.2.5.3 Rewrite expressions using a single index", "tags": [], "metadata": {"description": "

Simplify three expressions: (a^b)^c, a^b * a^c, a^b/a^c where a, b and c are randomised. a is a letter, and b and c are rational numbers.

\n

Part of HELM Book 1.2

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Write each of the following expressions with a single index:

", "advice": "

(a) Multiply the indices:

\n

\\[\\var{a_expr}=\\var{v}^{(\\var{iexp[0]})\\times(\\var{iexp[1]})}=\\var{a_ans}\\]

\n

(b) Add the indices:

\n

\\[\\var{b_expr}=\\var{v}^{(\\var{iexp[2]})+(\\var{iexp[3]})}=\\var{b_ans}\\]

\n

(c) Subtract the indices:

\n

\\[\\var{c_expr}=\\var{v}^{(\\var{iexp[4]})-(\\var{iexp[5]})}=\\var{c_ans}\\]

\n

Note: if the final index is negative, you can also write the answer as a fraction with a positive index on the denominator.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"c_ans": {"name": "c_ans", "group": "Ungrouped variables", "definition": "simplify(expression(letter+\"^(\" + (indices[4]-indices[5]) + \")\"),\n [\"unitPower\",\"zeroPower\"])", "description": "", "templateType": "anything", "can_override": false}, "b_ans": {"name": "b_ans", "group": "Ungrouped variables", "definition": "simplify(expression(letter+\"^(\" + (indices[2]+indices[3]) + \")\"),\n [\"unitPower\",\"zeroPower\"])", "description": "", "templateType": "anything", "can_override": false}, "a_ans": {"name": "a_ans", "group": "Ungrouped variables", "definition": "simplify(expression(letter+\"^(\" + (indices[0]*indices[1]) + \")\"),\n [\"unitPower\",\"zeroPower\"])", "description": "", "templateType": "anything", "can_override": false}, "a_expr": {"name": "a_expr", "group": "Ungrouped variables", "definition": "expression(\"(\" + letter + \"^(\" + indices[0] +\n \"))^(\" + indices[1]+\")\")", "description": "", "templateType": "anything", "can_override": false}, "b_expr": {"name": "b_expr", "group": "Ungrouped variables", "definition": "expression(letter+\"^(\" + indices[2] + \")*\" + letter +\n \"^(\" + indices[3] + \")\")", "description": "", "templateType": "anything", "can_override": false}, "c_expr": {"name": "c_expr", "group": "Ungrouped variables", "definition": "expression( letter + \"^(\" + indices[4] +\n \")/\" + letter + \"^(\" + indices[5] +\")\")", "description": "", "templateType": "anything", "can_override": false}, "letter": {"name": "letter", "group": "Ungrouped variables", "definition": "random(['a','b','c','d','f','g','h','k','m','n','p','q','r','s','t','u','v','w','x','y','z'])", "description": "", "templateType": "anything", "can_override": false}, "indices": {"name": "indices", "group": "Ungrouped variables", "definition": "[random(-1,1)*random(i_arr),\n random(-1,1)*random(i_arr),\n random(-1,1)*random(i_arr),\n random(-1,1)*random(i_arr),\n random(-1,1)*random(i_arr),\n random(-1,1)*random(i_arr)\n ]", "description": "", "templateType": "anything", "can_override": false}, "i_arr": {"name": "i_arr", "group": "Ungrouped variables", "definition": "[1/5,1/4,1/3,1/2,2,3,4,5]", "description": "", "templateType": "anything", "can_override": false}, "iexp": {"name": "iexp", "group": "Ungrouped variables", "definition": "[expression(string(indices[0])),expression(string(indices[1])),\n expression(string(indices[2])),expression(string(indices[3])),\n expression(string(indices[4])),expression(string(indices[5]))]", "description": "

The indices written as expressions. This allows them to be rendered correctly in the advice.

", "templateType": "anything", "can_override": false}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "if(type(letter)=\"string\",\n expression(letter),\n expression(string(letter))\n)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["letter", "a_expr", "a_ans", "b_expr", "b_ans", "c_expr", "c_ans", "indices", "i_arr", "iexp", "v"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

(a) $\\var{a_expr}$ = [[0]]

\n

\n

(b) $\\var{b_expr}$ = [[1]]

\n

\n

(c) $\\var{c_expr}$ = [[2]]

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "part a", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a_ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "$v^`+-($n/$n`?)`? `| 1/$v^($n/$n`?)`? `| 1", "partialCredit": 0, "message": "", "nameToCompare": ""}, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "part b", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{b_ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "$v^`+-($n/$n`?)`? `| 1/$v^($n/$n`?)`? `| 1", "partialCredit": 0, "message": "", "nameToCompare": ""}, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "part c", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{c_ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "$v^`+-($n/$n`?)`? `| 1/$v^($n/$n`?)`? `| 1", "partialCredit": 0, "message": "", "nameToCompare": ""}, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}