// Numbas version: finer_feedback_settings
{"name": "How to enter functions - Getting Started", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "c", "b", "d"], "name": "How to enter functions - Getting Started", "tags": ["arctan", "brackets", "checked2015", "functions", "input", "introduction", "numbas", "Numbas", "standard functions"], "advice": "
Correct inputs for these questions are as follows, although there may be other correct ways of inputting these:
\na)
\n\n sin(cos({a}x)+{b}) \n cos(sin({a}x + {b})) \n
\nb)
\n\n abs((x + {c}) / (x + {d})) \n ln(abs((x + {a}) / (x + {d}))) \n
\nc)
\n\n {a}t^({-b})*e^({-c}t)*sin({b}t) + (t + {d}t ^ 3)*e ^ ({c}t) \n arctan(({c}y ^ 2 + {d}) / ((y + {a})*(y + {b}))) \n
", "rulesets": {}, "parts": [{"prompt": "Input:
\n\n- $\\sin(\\cos(\\var{a}x)+\\var{b})$: [[0]]
\n- $\\cos(\\sin(\\var{b}x)+\\var{a})$: [[1]]
\n
", "marks": 0, "gaps": [{"expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "sin(cos({a}x)+{b})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "cos(sin({b}x)+{a})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "Input:
\n\n- $\\displaystyle \\simplify[all]{Abs((x + {c}) / (x + {d}))}$: [[0]]
\n- $\\displaystyle \\simplify[all]{ln(Abs((x + {a}) / (x + {d})))}$: [[1]]
\n
", "marks": 0, "gaps": [{"expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "abs((x + {c}) / (x + {d}))", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "ln(abs((x + {a}) / (x + {d})))", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "Input:
\n\n- $\\simplify[all]{{a} * t ^ { -b} * e ^ (( -{c}) * t) * Sin({b} * t) + (t + {d} * t ^ 3) * e ^ ({c} * t)}$: [[0]]
\n- $\\displaystyle \\simplify[all]{arctan(({c} * y ^ 2 + {d}) / ((y + {a}) * (y + {b})))}$: [[1]]
\n
", "marks": 0, "gaps": [{"expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "{a} * t ^ { -b} * e ^ (( -{c}) * t) * sin({b} * t) + (t + {d} * t ^ 3) * e ^ ({c} * t)", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "arctan(({c} * y ^ 2 + {d}) / ((y + {a}) * (y + {b})))", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "FUNCTIONS
\n\n - The Numbas system recognises all standard functions but you must use brackets for the arguments of the functions, e.g.
sin(x) not sinx, ln(a) not lna. \n - The absolute value function is written
abs(a). \n - $\\arcsin(x)$, $\\arccos(x)$ and $\\arctan(x)$ are all recognized as the standard inverse trig functions, and you input them as they are written.
\n
\nHere are some examples for you to try:
\n(If you want help, press Reveal at the top of the screen to see correct inputs in the Advice section.)
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"a": {"definition": "random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(3..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}}, "metadata": {"notes": "", "description": "Dealing with functions in Numbas.
", "licence": "Creative Commons Attribution 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/"}], "resources": []}]}], "contributors": [{"name": "steve kilgallon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/268/"}]}