// Numbas version: exam_results_page_options {"name": "Ugur's copy of Logarithms1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Ugur's copy of Logarithms1", "tags": [], "metadata": {"description": "\n \t\t

Given a sum of logs, all numbers are integers,

\n \t\t

$\\log_b(a_1)+\\alpha\\log_b(a_2)+\\beta\\log_b(a_3)$ write as $\\log_b(a)$ for some fraction $a$.

\n \t\t

Also calculate to 3 decimal places $\\log_b(a)$. 

\n \t\t", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Answer the following question on logarithms.

", "advice": "\n

The rules for combining logs are

\n

\\[\\begin{eqnarray*}&1.&  \\log_b(ac)&=&\\log_b(a)+\\log_b(c)\\\\ \\\\ &2.&  \\log_b\\left(\\frac{a}{c}\\right)&=&\\log_b(a)-\\log_b(c)\\\\ \\\\ &3.&  \\log_b(a^r)&=&r\\log_b(a) \\end{eqnarray*} \\]

\n

We see that:

\n

\\[\\begin{eqnarray*}\\log_{\\var{b}}(\\var{a_1})-\\var{r_1}\\log_{\\var{b}}(\\var{a_2})+\\var{r_2}\\log_{\\var{b}}(\\var{a_3})&=&\\log_{\\var{b}}(\\var{a_1})-\\log_{\\var{b}}(\\var{a_2}^{\\var{r_1}})+\\log_{\\var{b}}(\\var{a_3}^{\\var{r_2}})\\mbox{ using 3.}\\\\&=&\\log_{\\var{b}}(\\var{a_1})-\\log_{\\var{b}}(\\var{a_2^r_1})+\\log_{\\var{b}}(\\var{a_3^r_2})\\\\&=&\\log_{\\var{b}}(\\var{a_1}\\times \\var{a_3^r_2})-\\log_{\\var{b}}(\\var{a_2^r_1}) \\mbox{ using 1.}\\\\&=&\\log_{\\var{b}}\\left(\\frac{\\var{a_1}\\times \\var{a_3^r_2}}{\\var{a_2^r_1}}\\right) \\mbox{ using 2.}\\\\&=&\\log_{\\var{b}}\\left(\\frac{\\var{a_1*a_3^r_2}}{\\var{a_2^r_1}}\\right)\\\\&=&\\log_{\\var{b}}\\left(\\simplify[all,fractionnumbers]{{a_1*a_3^r_2}/{a_2^r_1}}\\right)\\mbox{ on cancelling common factors}.\\end{eqnarray*}\\]

\n

Hence $\\displaystyle c=\\simplify[all,fractionnumbers]{{a_1*a_3^r_2}/{a_2^r_1}}$.

\n

To calculate $\\displaystyle \\log_{\\var{b}}\\left(\\simplify[all,fractionnumbers]{{a_1*a_3^r_2}/{a_2^r_1}}\\right)$ to 4 decimal places we use the fact that for any positive base $b$:

\n

\\[\\log_b(c)=\\frac{\\ln(c)}{\\ln(b)}=\\frac{\\log_{10}(c)}{\\log_{10}(b)}\\]

\n

and we can use either of the log functions, $\\ln$ or $\\log_{10}$ on our calculators to find the value.

\n

Using $\\ln$ we find:

\n

\\[ \\log_{\\var{b}}\\left(\\simplify[all,fractionnumbers]{{a_1*a_3^r_2}/{a_2^r_1}}\\right)=\\frac{\\ln\\left(\\simplify[all,fractionnumbers]{{a_1*a_3^r_2}/{a_2^r_1}}\\right)}{\\ln(\\var{b})}=\\var{ans}\\] to 4 decimal places.

\n ", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "a_1*a_3^r_2/a_2^r_1", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "a_3": {"name": "a_3", "group": "Ungrouped variables", "definition": "random(2..8)", "description": "", "templateType": "anything", "can_override": false}, "a_2": {"name": "a_2", "group": "Ungrouped variables", "definition": "random(2,4,8)*random(3,9)", "description": "", "templateType": "anything", "can_override": false}, "a_1": {"name": "a_1", "group": "Ungrouped variables", "definition": "random(5..20)", "description": "", "templateType": "anything", "can_override": false}, "r_1": {"name": "r_1", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "", "templateType": "anything", "can_override": false}, "r_2": {"name": "r_2", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "", "templateType": "anything", "can_override": false}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.0001", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "precround(log(c)/log(b),4)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["c", "b", "a_3", "a_2", "a_1", "r_1", "r_2", "tol", "ans"], "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": "

 

\n

Find a fraction or integer $c$ such that:

\n

$\\log_{\\var{b}}(\\var{a_1})-\\var{r_1}\\log_{\\var{b}}(\\var{a_2})+\\var{r_2}\\log_{\\var{b}}(\\var{a_3})=\\log_{\\var{b}}(c)$ 

\n

$c=\\;$[[0]].

\n

Input $c$ as an integer or as a fraction and not as a decimal.

\n

Now calculate $\\log_{\\var{b}}(c)$ to 4 decimal places:

\n

$\\log_{\\var{b}}(c)=\\;$[[1]].

\n

 

\n

 

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a_1*a_3^r_2}/{a_2^r_1}", "answerSimplification": "all,fractionnumbers", "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": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{ans-tol}", "maxValue": "{ans+tol}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Wan Mekwi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4058/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Wan Mekwi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4058/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}]}