// Numbas version: exam_results_page_options {"name": "Logarithms: Rewriting log expressions as a single log", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"js": "", "css": ""}, "variable_groups": [], "name": "Logarithms: Rewriting log expressions as a single log", "advice": "

This question requires you to know the log laws and the index laws.

\n

", "rulesets": {}, "functions": {}, "tags": [], "parts": [{"prompt": "

$\\displaystyle \\simplify{{c1}log({a1},{b})+{c2}log({a2},{b})+{c3}log({a3},{b})}=\\log_\\var{b}{\\Large(}$ [[0]]$\\Large)$

", "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "stepsPenalty": "1", "unitTests": [], "customMarkingAlgorithm": "", "gaps": [{"vsetRange": [0, 1], "showFeedbackIcon": true, "showPreview": true, "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "unitTests": [], "customMarkingAlgorithm": "", "answerSimplification": "!collectNumbers", "expectedVariableNames": [], "checkingType": "absdiff", "checkingAccuracy": 0.001, "type": "jme", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "failureRate": 1, "marks": 1, "answer": "{a1}^{c1}*{a2}^{c2}*{a3}^{c3}"}], "type": "gapfill", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "marks": 0, "steps": [{"unitTests": [], "variableReplacements": [], "type": "information", "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "marks": 0, "prompt": "

The numbers multiplying the logs (sign and all!) can be put inside the log by using $\\log(a^b)=b\\log(a)$:

\n

\$\\simplify[!collectNumbers]{{c1}log({a1},{b})+{c2}log({a2},{b})+{c3}log({a3},{b})=log({a1}^{c1},{b})+log({a2}^{c2},{b})+log({a3}^{c3},{b})}.\$

\n

Then we can add the logs using $\\log(a)+\\log(b)=\\log(ab)$:

\n

\\\begin{align}\\simplify[!collectNumbers]{log({a1}^{c1},{b})+log({a2}^{c2},{b})+log({a3}^{c3},{b})}&=\\simplify[!collectNumbers]{log({a1}^{c1}{a2}^{c2},{b})+log({a3}^{c3},{b})}\\\\&=\\simplify[!collectNumbers]{log({a3}^{c3}*{a1}^{c1}*{a2}^{c2},{b})}.\\end{align}\

\n

Note, if we wanted to, we could write our answer without negative indices (recall $b^{-a}=\\frac{1}{b^a}$):

\n

\$\\log_\\var{b}\\left(\\simplify[!collectNumbers,zeroPower,unitFactor,unitDenominator,unitPower]{{a1}^{(if(c1>0,c1,0))}{a2}^{(if(c2>0,c2,0))}{a3}^{(if(c3>0,c3,0))}/({a1}^{(if(c1<0,-c1,0))}{a2}^{(if(c2<0,-c2,0))}{a3}^{(if(c3<0,-c3,0))})}\\right)\$

\n

\n

Note we could approach this question slightly differently and made use of $\\log(a)-\\log(b)=\\log\\left(\\frac{a}{b}\\right)$ as well to deal with the logs with negatives out the front but it isn't necessary.

\n

"}]}, {"prompt": "

$\\displaystyle \\simplify{1/{a1}ln(d)+{a2}ln(d^{a3})+{n}ln(d)}=\\ln\\Large($ [[0]] $\\Large)$

", "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "stepsPenalty": "1", "unitTests": [], "customMarkingAlgorithm": "", "gaps": [{"vsetRange": [0, 1], "showFeedbackIcon": true, "showPreview": true, "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "unitTests": [], "customMarkingAlgorithm": "", "answerSimplification": "collectNumbers, fractionNumbers, simplifyFractions", "expectedVariableNames": [], "checkingType": "absdiff", "checkingAccuracy": 0.001, "type": "jme", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "failureRate": 1, "marks": 1, "answer": "d^({1/{a1}+{a3}*{a2}+{n}})"}], "type": "gapfill", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "marks": 0, "steps": [{"unitTests": [], "variableReplacements": [], "type": "information", "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "marks": 0, "prompt": "

Recall that $\\ln$ denotes $\\log_e$.

\n

We use the standard log and index laws to manipulate this expression into a single log term:

\n

\\begin{align}\\simplify{1/{a1}ln(d)+{a2}ln(d^{a3})+{n}ln(d)}&=\\simplify{ln(d^(1/{a1})) + ln((d^{a3})^{a2})+ln(d^{n})}\\\\ &=\\simplify{ln(d^(1/{a1})) + ln(d^{a3*a2})+ln(d^{n})}\\\\&=\\simplify[!collectNumbers]{ln(d^(1/{a1})d^{a3*a2}d^{n})}\\\\&=\\simplify[!collectNumbers]{ln(d^(1/{a1}+{a3*a2}+{n}))}\\\\&=\\simplify[fractionNumbers,simplifyFractions,unitDenominator]{ln(d^{1/a1+a3*a2+n})}\\end{align}

"}]}], "ungrouped_variables": ["c", "c1", "c2", "c3", "a", "a1", "a2", "a3", "b", "n"], "variables": {"n": {"description": "", "group": "Ungrouped variables", "name": "n", "templateType": "anything", "definition": "random(-7..-1)"}, "c2": {"description": "", "group": "Ungrouped variables", "name": "c2", "templateType": "anything", "definition": "c[1]"}, "a3": {"description": "", "group": "Ungrouped variables", "name": "a3", "templateType": "anything", "definition": "a[2]"}, "b": {"description": "", "group": "Ungrouped variables", "name": "b", "templateType": "anything", "definition": "random(e,2,10,3,5,6)"}, "a": {"description": "", "group": "Ungrouped variables", "name": "a", "templateType": "anything", "definition": "shuffle(2..7)[0..3]"}, "c": {"description": "", "group": "Ungrouped variables", "name": "c", "templateType": "anything", "definition": "shuffle(-7..7 except [1,0])[0..3]"}, "c1": {"description": "", "group": "Ungrouped variables", "name": "c1", "templateType": "anything", "definition": "c[0]"}, "a2": {"description": "", "group": "Ungrouped variables", "name": "a2", "templateType": "anything", "definition": "a[1]"}, "c3": {"description": "", "group": "Ungrouped variables", "name": "c3", "templateType": "anything", "definition": "c[2]"}, "a1": {"description": "", "group": "Ungrouped variables", "name": "a1", "templateType": "anything", "definition": "a[0]"}}, "extensions": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "

Rewrite the following expressions involving logs as a single logarithm