// Numbas version: exam_results_page_options {"name": "mock_examCos graph multiple solutions (radians 0 to 2pi) ", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "ungrouped_variables": ["a", "x2", "b", "y2", "c", "v", "sin0", "random"], "statement": "

\n

Calulate the solutions to the equation $cos(x)=\\var{sin0}$  in the range $0 \\leqslant x \\leqslant 2\\pi$

\n

", "advice": "", "parts": [{"showCorrectAnswer": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "prompt": "

Give your answers in assending order correct  to 2 decimal places.

\n

\n

The smallest value of $x=$ [[0]]

\n

 

\n

The  largest value of $x=$ [[1]]

", "gaps": [{"showCorrectAnswer": true, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "minValue": "arccos({sin0)", "correctAnswerStyle": "plain", "marks": 1, "mustBeReducedPC": 0, "showFeedbackIcon": true, "allowFractions": false, "variableReplacements": [], "maxValue": "arccos({sin0)", "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "scripts": {}, "strictPrecision": false, "type": "numberentry", "showPrecisionHint": false, "precisionMessage": "

You have not given your answer to the correct precision.

"}, {"showCorrectAnswer": true, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "minValue": "(2*pi-arccos({sin0))", "correctAnswerStyle": "plain", "marks": 1, "mustBeReducedPC": 0, "showFeedbackIcon": true, "allowFractions": false, "variableReplacements": [], "maxValue": "(2*pi-arccos({sin0))", "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "scripts": {}, "strictPrecision": false, "type": "numberentry", "showPrecisionHint": false, "precisionMessage": "

You have not given your answer to the correct precision.

"}], "type": "gapfill", "marks": 0, "scripts": {}, "showFeedbackIcon": true}], "variables": {"a": {"name": "a", "templateType": "anything", "definition": "random(-4..4 except 0)", "group": "Ungrouped variables", "description": ""}, "b": {"name": "b", "templateType": "anything", "definition": "random(-5..5 except [0,a,-a])", "group": "Ungrouped variables", "description": ""}, "sin0": {"name": "sin0", "templateType": "anything", "definition": "random/10", "group": "Ungrouped variables", "description": ""}, "c": {"name": "c", "templateType": "anything", "definition": "a*b", "group": "Ungrouped variables", "description": ""}, "y2": {"name": "y2", "templateType": "anything", "definition": "x2*a+b", "group": "Ungrouped variables", "description": ""}, "x2": {"name": "x2", "templateType": "anything", "definition": "random(-3..3 except -1..1)", "group": "Ungrouped variables", "description": ""}, "random": {"name": "random", "templateType": "anything", "definition": "random(2..9)", "group": "Ungrouped variables", "description": ""}, "v": {"name": "v", "templateType": "anything", "definition": "random(2..4)", "group": "Ungrouped variables", "description": ""}}, "functions": {"eqnline": {"language": "javascript", "type": "html", "definition": "// This function creates the board and sets it up, then returns an\n// HTML div tag containing the board.\n\n//Put in your values of x here\n\nvar x_min = -0.2;\nvar x_max =7;\nvar y_min = -1.5;\nvar y_max = 1.5;\n\n// First, make the JSXGraph board.\n// The function provided by the JSXGraph extension wraps the board up in \n// a div tag so that it's easier to embed in the page.\nvar div = Numbas.extensions.jsxgraph.makeBoard('600px','600px',\n//{boundingBox: [-8,10,8,-10],\n {boundingBox: [x_min,y_max,x_max,y_min], \n axis: false,\n showNavigation: true,\n grid: true\n});\n\n\n\n\n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar board = div.board; \n\n// create the x-axis.\n//var xaxis = board.create('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\n\nvar xaxis = board.create('axis',[[0,0],[1,0]], {strokeColor: 'black', fixed: true,\n name:'x', \n\t\t\t\n withLabel: true, \n\t\t\tlabel: {position: 'rt', // possible values are 'lft', 'rt', 'top', 'bot'\n\t\t\t\t\t offset: [-15, 20] // (in pixels)\n\t\t\t\t\t }\n\n});\nxaxis.removeAllTicks();\n\n\nvar xticks = board.create('ticks',[xaxis,0.5],{\n//This puts a value on the exaxis very 0.5\u03c0 units\n drawLabels: true,\n //drawLabels: false,\n label: {offset: [22, -15]},\n //minorTicks: 0\n minorTicks:3, majorTickHeight:20, minorTickHeight:8,\n //If you want to use \u03c0 ou need to comment out minorTicks\n scale: Math.PI, \n scaleSymbol: '\u03c0'\n \n \n});\n\n\n// create the line.\n\n\n//board.create('line',[[x_min,sin0],[x_max,sin0]],{strokeColor:'red'});\nboard.create('line',[[x_min,sin0],[x_max,sin0]],{strokeColor:'red',\n //name:'y=sin0', \n name:sin0,\n\t\t\t\n withLabel: true, \n\t\t\tlabel: {position: 'lft', // possible values are 'lft', 'rt', 'top', 'bot'\n\t\t\t\t\t offset: [25, 10] // (in pixels)\n\t\t\t\t\t }\n\n});\n\n\n\n// create the y-axis\n//var yaxis = board.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\n\nvar yaxis = board.create('axis',[[0,0],[0,1]], { strokeColor: 'black', fixed: true,\n name:'cos(x)', \n\t\t\t\n withLabel: true, \n\t\t\tlabel: {position: 'top', // possible values are 'lft', 'rt', 'top', 'bot'\n\t\t\t\t\t offset: [25, 240] // (in pixels)\n\t\t\t\t\t }\n\n});\n\n\nyaxis.removeAllTicks();\n\nvar yticks = board.create('ticks',[yaxis,1],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\n\n // PUT YOUR FUNCTION HERE\n\n// sin (x) in degrees\nboard.create('functiongraph',[function(x){ return Math.cos(x);},x_min,x_max]);\n//board.create('functiongraph',[function(x){ return Math.sin(x*(Math.PI/180))+v;},-360,360],{ strokeColor: 'red'});\n//board.create('functiongraph',[function(x){ return Math.sin(x*(Math.PI/180))-(v+1);},-360,360],{ strokeColor: 'black'});\n//Change axis range from -360 tp +360 y from -8 to +8 \n\n//board.create('functiongraph',[function(x){ return Math.exp(x);},x_min,x_max]);\n//board.create('functiongraph',[function(x){ return Math.log(x);},x_min,x_max]);\n//board.create('functiongraph',[function(x){ return (x);},x_min,x_max]);\n\n\n//board.create('functiongraph',[function(x){ return (x-a)*(x-b);},-8,8]);\n//board.create('functiongraph',[function(x){ return (x-a)*(x-b)+v;},-8,8],{ strokeColor: 'red'});\n\n//board.create('functiongraph',[function(x){ return x*x;},-8,8]);\n//board.create('functiongraph',[function(x){ return x*x+v;},-8,8],{ strokeColor: 'red'});\n//board.create('functiongraph',[function(x){ return x*x-(v+1);},-8,8],{ strokeColor: 'black'});\n\n\n//board.create('functiongraph',[function(x){ return x*x;},-8,8]);\n//board.create('functiongraph',[function(x){ return (x-v)*(x-v);},-8,8],{ strokeColor: 'red'});\n//board.create('functiongraph',[function(x){ return (x+v+1)*(x+v+1);},-8,8],{ strokeColor: 'black'});\n\n//board.create('functiongraph',[function(x){ return x*x;},-8,8]);\n//board.create('functiongraph',[function(x){ return v*(x)*(x);},-8,8],{ strokeColor: 'red'});\n//board.create('functiongraph',[function(x){ return (1/v)*(x)*(x);},-8,8],{ strokeColor: 'black'});\n\n//board.create('functiongraph',[function(x){ return (x)*(x)+v;},-8,8]);\n//board.create('functiongraph',[function(x){ return -((x)*(x)+v);},-8,8],{ strokeColor: 'red'});\n//board.create('functiongraph',[function(x){ return -(x)*(x);},-8,8],{ strokeColor: 'black'});\n\n\n\n\n\n\nreturn div;", "parameters": [["a", "number"], ["b", "number"], ["x2", "number"], ["y2", "number"], ["v", "number"], ["sin0", "number"]]}}, "preamble": {"css": "", "js": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "tags": [], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find multiple solutions of cos

\n

Working 26_10_16

"}, "extensions": ["jsxgraph"], "name": "mock_examCos graph multiple solutions (radians 0 to 2pi) ", "type": "question", "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/"}]}