// Numbas version: finer_feedback_settings {"name": "subtracting powers (non-algebraic)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["primes", "base1", "powers1", "diffpow1", "base2", "powers2", "diffpow2", "ndec", "neg", "diffpow3", "base3", "powers3", "diffpow4", "minpow4"], "name": "subtracting powers (non-algebraic)", "tags": ["Dividing", "dividing", "exponent", "exponents", "index", "index laws", "indices", "power", "powers", "subtracting"], "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": "1", "prompt": "

$\\var{base1}^\\var{powers1[0][0]}\\div \\var{base1}^\\var{powers1[1][0]}$ = [[0]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "

Use ^ for powers. Input your answer in index form.

", "showStrings": false, "strings": ["^0"], "partialCredit": 0}, "variableReplacements": [], "expectedvariablenames": [], "checkingaccuracy": "0.0000001", "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "basic", "scripts": {"mark": {"order": "after", "script": "// Parse the student's answer as a syntax tree\nvar studentTree = Numbas.jme.compile(this.studentAnswer,Numbas.jme.builtinScope);\n\n// Create the pattern to match against \n// We just want to check that the student has written \"something to the power of something\"\nvar rule = Numbas.jme.compile('?? ^ ??');\n\n// Check the student's answer matches the pattern. \nvar m = Numbas.jme.display.matchTree(rule,studentTree,true);\n\n// If not, take away marks\nif(!m) {\n this.multCredit(0,'Your answer is not in the form $x^y$.');\n}\n"}}, "answer": "{base1}^{diffpow1}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1], "musthave": {"message": "

Use ^ for powers. Input your answer in index form.

", "showStrings": false, "strings": ["^"], "partialCredit": 0}}], "steps": [{"prompt": "

Write the division as a fraction and cancel common factors. 

\n

Recall, negative indices mean you divided by more than you had, for example, $\\displaystyle \\frac{1}{12^3}$ can be written as $12^{-3}$.

\n

 

\n
\n

In general, we have $\\displaystyle\\frac{a^b}{a^c}=a^{b-c}$.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}, {"stepsPenalty": "1", "prompt": "

$\\displaystyle\\frac{\\var{base2}^\\var{powers2[0]}\\times\\var{base2}}{\\var{base2}^\\var{powers2[1]} \\times \\var{base2}^\\var{powers2[2]}}$ = [[0]]

\n

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": "0.0000001", "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "basic", "scripts": {"mark": {"order": "after", "script": "// Parse the student's answer as a syntax tree\nvar studentTree = Numbas.jme.compile(this.studentAnswer,Numbas.jme.builtinScope);\n\n// Create the pattern to match against \n// We just want to check that the student has written \"something to the power of something\"\nvar rule = Numbas.jme.compile('?? ^ ??');\n\n// Check the student's answer matches the pattern. \nvar m = Numbas.jme.display.matchTree(rule,studentTree,true);\n\n// If not, take away marks\nif(!m) {\n this.multCredit(0,'Your answer is not in the form $x^y$.');\n}\n"}}, "answer": "{base2}^{diffpow2}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1], "musthave": {"message": "

Use ^ for powers. Input your answer in index form.

", "showStrings": false, "strings": ["^"], "partialCredit": 0}}], "steps": [{"prompt": "

Cancel common factors. 

\n

Recall, negative indices mean you divided by more than you had, for example, $\\displaystyle \\frac{1}{12^3}$ can be written as $12^{-3}$.

\n

  

\n
\n

In general, we have $\\displaystyle\\frac{a^b}{a^c}=a^{b-c}$.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}, {"stepsPenalty": "1", "prompt": "

Use the same approach you used in the above questions to simplify the following in index form.

\n


$\\displaystyle\\frac{\\var{base2}^\\var{ndec}}{\\var{base2}^\\var{neg}}$ = [[0]]

\n

\n

Note: If you want to use a fraction as a power you should use brackets to surround your power, for example, type 12^(2/3) for $12^\\frac{2}{3}$.

\n

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "

Use ^ for powers. Input your answer in index form.

", "showStrings": false, "strings": ["^0"], "partialCredit": 0}, "variableReplacements": [], "expectedvariablenames": [], "checkingaccuracy": "0.0000001", "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "basic", "scripts": {"mark": {"order": "after", "script": "// Parse the student's answer as a syntax tree\nvar studentTree = Numbas.jme.compile(this.studentAnswer,Numbas.jme.builtinScope);\n\n// Create the pattern to match against \n// We just want to check that the student has written \"something to the power of something\"\nvar rule = Numbas.jme.compile('?? ^ ??');\n\n// Check the student's answer matches the pattern. \nvar m = Numbas.jme.display.matchTree(rule,studentTree,true);\n\n// If not, take away marks\nif(!m) {\n this.multCredit(0,'Your answer is not in the form $x^y$.');\n}\n"}}, "answer": "{base2}^{diffpow3}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1], "musthave": {"message": "

Use ^ for powers. Input your answer in index form.

", "showStrings": false, "strings": ["^"], "partialCredit": 0}}], "steps": [{"prompt": "

Since the bases are all the same ($\\var{base2}$) and we are dividing, we can simply subtract the powers.  

\n

 

\n
\n

In general, we have $\\displaystyle\\frac{a^b}{a^c}=a^{b-c}$.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}, {"stepsPenalty": "1", "prompt": "

$\\var{base3}^\\var{powers3[0][0]}\\times \\var{base1}^\\var{powers3[1][0]} \\div \\var{base3}^\\var{powers3[2][0]}$ = [[0]]

\n

\n

Note: use * for multiplication.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "

Use ^ for powers. Input your answer in index form.

", "showStrings": false, "strings": ["^0"], "partialCredit": 0}, "variableReplacements": [], "expectedvariablenames": [], "checkingaccuracy": "0.00001", "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "basic", "scripts": {"mark": {"order": "after", "script": "// Parse the student's answer as a syntax tree\nvar studentTree = Numbas.jme.compile(this.studentAnswer,Numbas.jme.builtinScope);\n\n// Create the pattern to match against \n// We just want to check that the student has written \"something to the power of something\"\nvar rule = Numbas.jme.compile('?? ^ ?? * ?? ^ ??');\n\n// Check the student's answer matches the pattern. \nvar m = Numbas.jme.display.matchTree(rule,studentTree,true);\n\n// If not, take away marks\nif(!m) {\n this.multCredit(0,'Your answer is not in the form $x^y$.');\n}\n"}}, "answer": "{base1}^{powers3[1][0]}*{base3}^{diffpow4}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1], "musthave": {"message": "

Use ^ for powers. Input your answer in index form.

", "showStrings": false, "strings": ["^"], "partialCredit": 0}}], "steps": [{"prompt": "

It is important to note that the bases are different! Index laws only can be applied if the bases are the same (or can be made the same). Because of this we deal with the different bases separately. 

\n

\n
\n

Notice the first part of the expression can not be simplified using index laws.

\n

$\\var{base3}^\\var{powers3[0][0]}\\times \\var{base1}^\\var{powers3[1][0]}$ 

\n

However, with the division we can do some simplification. We can either:

\n
    \n
  1. write it as a fraction and cancel the common factor of $\\var{base3}^\\var{minpow4}$ from the top and bottom:
    \\[\\frac{\\var{base3}^\\var{powers3[0][0]}\\times \\var{base1}^\\var{powers3[1][0]}}{ \\var{base3}^\\var{powers3[2][0]}}=\\frac{\\var{base3}^\\var{powers3[0][0]-minpow4}\\times \\var{base1}^\\var{powers3[1][0]}}{ \\var{base3}^\\var{powers3[2][0]-minpow4}}=\\var{base3}^\\var{diffpow4}\\var{base1}^\\var{powers3[1][0]}\\] 
  2. \n
  3. Subtract the powers, \"top power minus the bottom power\" for the terms with the same base:
    \\[\\frac{\\var{base3}^\\var{powers3[0][0]}\\times \\var{base1}^\\var{powers3[1][0]}}{ \\var{base3}^\\var{powers3[2][0]}}=\\var{base3}^\\var{diffpow4}\\var{base1}^\\var{powers3[1][0]}\\] 
  4. \n
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}, {"stepsPenalty": "1", "displayColumns": 0, "variableReplacements": [], "prompt": "

Is the following statement true or false?

\n

$\\displaystyle\\frac{\\var{2*base2}}{\\var{base2}^\\var{powers1[0][0]}} = \\var{2}^\\var{-powers1[0][0]}$

", "matrix": [0, "1"], "shuffleChoices": false, "distractors": ["", ""], "choices": ["

True

", "

False

"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": 0, "scripts": {}, "marks": 0, "steps": [{"prompt": "

It is important to note that the bases are different! Index laws only can be applied if the bases are the same (or can be made the same).

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}, {"stepsPenalty": "1", "displayColumns": 0, "variableReplacements": [], "prompt": "

Is the following statement true or false?

\n

$\\displaystyle\\frac{\\var{2*base2}}{\\var{base2}^\\var{powers1[0][0]}} = \\var{2}^\\var{1-powers1[0][0]}$

", "matrix": [0, "1"], "shuffleChoices": false, "distractors": ["", ""], "choices": ["

True

", "

False

"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": 0, "scripts": {}, "marks": 0, "steps": [{"prompt": "

It is important to note that the bases are different! Index laws only can be applied if the bases are the same (or can be made the same). We can only add the powers if the bases are the same. 

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}, {"stepsPenalty": "1", "displayColumns": 0, "variableReplacements": [], "prompt": "

Is the following statement true or false?

\n

$\\displaystyle\\frac{\\var{2*base2}}{\\var{base2}^\\var{powers1[0][0]}} = 2\\times\\var{base2}^\\var{1-powers1[0][0]}$

", "matrix": ["1", "0"], "shuffleChoices": false, "distractors": ["", ""], "choices": ["

True

", "

False

"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": 0, "scripts": {}, "marks": 0, "steps": [{"prompt": "

It is important to note that the bases are different! Index laws only can be applied if the bases are the same (or can be made the same). We can only add the powers if the bases are the same. 

\n

\n
\n

\n

Note in this question we can make the bases the same.

\n

\\[\\frac{\\var{2*base2}}{\\var{base2}^\\var{powers1[0][0]}} = \\frac{2\\times\\var{base2}}{\\var{base2}^\\var{powers1[0][0]}} = 2\\times\\var{base2}^\\var{1-powers1[0][0]}\\]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "statement": "

Simplify the following without the use of a calculator. Write your answer in index form using ^ to signify powers. Use negative powers if necessary.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"minpow4": {"definition": "min(powers3[0][0],powers3[2][0])", "templateType": "anything", "group": "Ungrouped variables", "name": "minpow4", "description": ""}, "diffpow2": {"definition": "powers2[0]+1-powers2[1]-powers2[2]", "templateType": "anything", "group": "Ungrouped variables", "name": "diffpow2", "description": ""}, "neg": {"definition": "random(-12..-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "neg", "description": ""}, "ndec": {"definition": "random(-0.9..-0.1#0.1)", "templateType": "anything", "group": "Ungrouped variables", "name": "ndec", "description": ""}, "diffpow1": {"definition": "powers1[0][0]-powers1[1][0]", "templateType": "anything", "group": "Ungrouped variables", "name": "diffpow1", "description": ""}, "diffpow3": {"definition": "ndec-2*neg/2", "templateType": "anything", "group": "Ungrouped variables", "name": "diffpow3", "description": ""}, "base1": {"definition": "primes[0]", "templateType": "anything", "group": "Ungrouped variables", "name": "base1", "description": ""}, "base2": {"definition": "primes[1]", "templateType": "anything", "group": "Ungrouped variables", "name": "base2", "description": ""}, "base3": {"definition": "primes[2]", "templateType": "anything", "group": "Ungrouped variables", "name": "base3", "description": ""}, "diffpow4": {"definition": "powers3[0][0]-powers3[2][0]", "templateType": "anything", "group": "Ungrouped variables", "name": "diffpow4", "description": ""}, "powers1": {"definition": "shuffle([[2,\"two\"],[8,\"eight\"],[4,\"four\"],[10,\"ten\"],[6,\"six\"]])[0..2]", "templateType": "anything", "group": "Ungrouped variables", "name": "powers1", "description": "

2..6

"}, "powers3": {"definition": "shuffle([[2,\"two\"],[3,\"three\"],[4,\"four\"],[5,\"five\"],[6,\"six\"]])[0..3]", "templateType": "anything", "group": "Ungrouped variables", "name": "powers3", "description": ""}, "powers2": {"definition": "[random(2..5),random(3..6),random(4..6)]", "templateType": "anything", "group": "Ungrouped variables", "name": "powers2", "description": ""}, "primes": {"definition": "shuffle([2,3,5,7,11,13,17,19])[0..3] ", "templateType": "anything", "group": "Ungrouped variables", "name": "primes", "description": ""}}, "metadata": {"notes": "

It is possible that the first answer doesn't need a power but students are forced to use one, could change this by modifying the powers.
Before this we need a question about negative indices I think.

", "description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "steve kilgallon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/268/"}]}]}], "contributors": [{"name": "steve kilgallon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/268/"}]}