// Numbas version: exam_results_page_options {"name": "Amplitude, periode og likevektslinje", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [["question-resources/rett_linje_stigningstall.png", "/srv/numbas/media/question-resources/rett_linje_stigningstall.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {"eqnline": {"definition": "// This function creates the board and sets it up, then returns an\n// HTML div tag containing the board.\n \n// The curve is described by the equation \n// y = a*sin(k*x+c)+d\n\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: [-2,12,8,-12],\n axis: false,\n showNavigation: false,\n grid: true\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.\nvar xaxis = board.create('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\nvar xticks = board.create('ticks',[xaxis,0.5],{\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n// create the y-axis\nvar yaxis = board.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\nvar yticks = board.create('ticks',[yaxis,1],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\n// Draw the function\n\n\nboard.create('functiongraph',[function(x){ return a*Math.sin(k*x+c)+d;},-2,8]);\n\nreturn div;", "type": "html", "language": "javascript", "parameters": [["a", "number"], ["k", "number"], ["c", "number"], ["d", "number"]]}}, "ungrouped_variables": ["a", "p", "d", "x0", "k", "c"], "name": "Amplitude, periode og likevektslinje", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"prompt": "

Finn amplituden, perioden og likevektslinja til $f$

\n

amplitude $A = $ [[0]]

\n

periode $p = $ [[1]]

\n

likevektslinje $y = $ [[2]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "a", "minValue": "a", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry"}, {"allowFractions": false, "variableReplacements": [], "maxValue": "p", "minValue": "p", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry"}, {"allowFractions": false, "variableReplacements": [], "maxValue": "d", "minValue": "d", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"stepsPenalty": 0, "prompt": "

Finn funksjonsuttrykket til denne sinusfunksjonen. NB: for at denne skal kunne rettes automatisk er det her viktig at du bruker det første positive skjæringspunktet mellom grafen og likevektslinja for å beregne verdien av c.

\n

$f (x) = $ [[0]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "

Hint:

\n

Funksjonsutrykket er på formen $f(x)=a\\sin(k x+c)+d$. Dere har allerede funnet verdien av $a$ og $d$ i første deloppgave. Verdien av $k$ kan dere regne ut siden dere har perioden, da $k = \\frac{2\\pi}{p}$.

\n

For å finne $c$ må dere her finne det første positive skjæringspunktet $x_0$ mellom grafen til $f$ og likevektslinja. Denne størrelsen $x_0$ vil være en løsning av likningen $kx+c=0$, dvs at $c = -k x_0$ 

\n

Se eventuelt denne videoen: Funksjonsuttrykket til en sinusfunksjon

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "{a}*sin((2*pi)/{p}*x-(2*pi*{x0})/{p})+{d}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": ["jsxgraph"], "statement": "

{eqnline(a, k, c, d)}

\n

Figuren viser grafen til en sinusfunksjon

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "-k*x0", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "d": {"definition": "random(-5..5 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "k": {"definition": "2*pi/p", "templateType": "anything", "group": "Ungrouped variables", "name": "k", "description": ""}, "p": {"definition": "random(2..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "p", "description": ""}, "x0": {"definition": "random(1..2)/2", "templateType": "anything", "group": "Ungrouped variables", "name": "x0", "description": ""}}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Ida Friestad Pedersen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/792/"}]}]}], "contributors": [{"name": "Ida Friestad Pedersen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/792/"}]}