// Numbas version: exam_results_page_options {"name": "W1c - How to enter expressions in online tests and Matlab", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "ungrouped_variables": ["a", "c", "b", "d"], "parts": [{"useCustomName": false, "showCorrectAnswer": true, "marks": 0, "extendBaseMarkingAlgorithm": true, "type": "gapfill", "gaps": [{"vsetRangePoints": 5, "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "checkingAccuracy": 0.001, "customName": "", "showFeedbackIcon": true, "answer": "sin(cos({a}x)+{b})", "answerSimplification": "all", "customMarkingAlgorithm": "", "unitTests": [], "showPreview": true, "useCustomName": false, "showCorrectAnswer": true, "marks": 1, "checkVariableNames": true, "checkingType": "absdiff", "scripts": {}, "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "failureRate": 1}, {"vsetRangePoints": 5, "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "checkingAccuracy": 0.001, "customName": "", "showFeedbackIcon": true, "answer": "cos(sin({b}x)+{a})", "answerSimplification": "all", "customMarkingAlgorithm": "", "unitTests": [], "showPreview": true, "useCustomName": false, "showCorrectAnswer": true, "marks": 1, "checkVariableNames": false, "checkingType": "absdiff", "scripts": {}, "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "failureRate": 1}], "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "unitTests": [], "customName": "", "prompt": "

Input:

\n
    \n
  1. $\\sin(\\cos(\\var{a}x)+\\var{b})$: [[0]]
  2. \n
  3. $\\cos(\\sin(\\var{b}x)+\\var{a})$: [[1]]
  4. \n
", "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0, "variableReplacements": [], "customMarkingAlgorithm": "", "scripts": {}}, {"useCustomName": false, "showCorrectAnswer": true, "marks": 0, "extendBaseMarkingAlgorithm": true, "type": "gapfill", "gaps": [{"vsetRangePoints": 5, "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "checkingAccuracy": 0.001, "customName": "", "showFeedbackIcon": true, "answer": "abs((x + {c}) / (x + {d}))", "answerSimplification": "all", "customMarkingAlgorithm": "", "unitTests": [], "showPreview": true, "useCustomName": false, "showCorrectAnswer": true, "marks": 1, "checkVariableNames": false, "checkingType": "absdiff", "scripts": {}, "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "failureRate": 1}, {"vsetRangePoints": 5, "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "checkingAccuracy": 0.001, "customName": "", "showFeedbackIcon": true, "answer": "ln(abs((x + {a}) / (x + {d})))", "answerSimplification": "all", "customMarkingAlgorithm": "", "unitTests": [], "showPreview": true, "useCustomName": false, "showCorrectAnswer": true, "marks": 1, "checkVariableNames": false, "checkingType": "absdiff", "scripts": {}, "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "failureRate": 1}], "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "unitTests": [], "customName": "", "prompt": "

Input:

\n
    \n
  1. $\\displaystyle \\simplify[all]{Abs((x + {c}) / (x + {d}))}$: [[0]]
  2. \n
  3. $\\displaystyle \\simplify[all]{ln(Abs((x + {a}) / (x + {d})))}$: [[1]]
  4. \n
", "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0, "variableReplacements": [], "customMarkingAlgorithm": "", "scripts": {}}, {"useCustomName": false, "showCorrectAnswer": true, "marks": 0, "extendBaseMarkingAlgorithm": true, "type": "gapfill", "gaps": [{"vsetRangePoints": 5, "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "checkingAccuracy": 0.001, "customName": "", "showFeedbackIcon": true, "answer": "{a} * t ^ { -b} * e ^ (( -{c}) * t) * sin({b} * t) + (t + {d} * t ^ 3) * e ^ ({c} * t)", "answerSimplification": "all", "customMarkingAlgorithm": "", "unitTests": [], "showPreview": true, "useCustomName": false, "showCorrectAnswer": true, "marks": 1, "checkVariableNames": false, "checkingType": "absdiff", "scripts": {}, "valuegenerators": [{"value": "", "name": "t"}], "variableReplacements": [], "failureRate": 1}, {"vsetRangePoints": 5, "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "checkingAccuracy": 0.001, "customName": "", "showFeedbackIcon": true, "answer": "arctan(({c} * y ^ 2 + {d}) / ((y + {a}) * (y + {b})))", "answerSimplification": "all", "customMarkingAlgorithm": "", "unitTests": [], "showPreview": true, "useCustomName": false, "showCorrectAnswer": true, "marks": 1, "checkVariableNames": false, "checkingType": "absdiff", "scripts": {}, "valuegenerators": [{"value": "", "name": "y"}], "variableReplacements": [], "failureRate": 1}], "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "unitTests": [], "customName": "", "prompt": "

Input:

\n
    \n
  1. $\\simplify[all]{{a} * t ^ { -b} * e ^ (( -{c}) * t) * Sin({b} * t) + (t + {d} * t ^ 3) * e ^ ({c} * t)}$: [[0]]
  2. \n
  3. $\\displaystyle \\simplify[all]{arctan(({c} * y ^ 2 + {d}) / ((y + {a}) * (y + {b})))}$: [[1]]
  4. \n
", "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0, "variableReplacements": [], "customMarkingAlgorithm": "", "scripts": {}}], "functions": {}, "name": "W1c - How to enter expressions in online tests and Matlab", "extensions": [], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

FUNCTIONS

\n
    \n
  1. The online tests and Matlab recognise all standard functions but you must use brackets for the arguments of the functions, e.g. sin(x) not sinx, ln(a) not lna.
  2. \n
  3. The absolute value function is written abs(a).
  4. \n
  5. When unsure, put brackets around everything.
  6. \n
\n

You can do this as many times as you need to feel comfortable with it. When stuck, press Reveal Answers and try again.

\n

Turn inputs into Matlab form:

", "preamble": {"css": "", "js": ""}, "rulesets": {}, "variable_groups": [], "advice": "

Correct inputs for these questions are as follows, although there may be other correct ways of inputting these:  

\n

a)

\n
    \n
  1. sin(cos({a}x)+{b})
  2. \n
  3. cos(sin({a}x + {b}))
  4. \n
\n

b)

\n
    \n
  1. abs((x + {c}) / (x + {d}))
  2. \n
  3. ln(abs((x + {a}) / (x + {d})))
  4. \n
\n

c)

\n
    \n
  1. {a}t^({-b})*e^({-c}t)*sin({b}t) + (t + {d}t ^ 3)*e ^ ({c}t)
  2. \n
  3. arctan(({c}y ^ 2 + {d}) / ((y + {a})*(y + {b})))
  4. \n
", "variables": {"d": {"templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(2..9)", "name": "d"}, "b": {"templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(3..9)", "name": "b"}, "c": {"templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(2..9)", "name": "c"}, "a": {"templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(2..9)", "name": "a"}}, "metadata": {"description": "

Dealing with expressions in online tests and in Matlab.

", "licence": "Creative Commons Attribution 4.0 International"}, "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Timur Zaripov", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3272/"}]}]}], "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Timur Zaripov", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3272/"}]}