// Numbas version: finer_feedback_settings {"name": "Plantilla-2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["num_terms", "powers", "coefficients", "condition", "prime"], "name": "Plantilla-2", "tags": [], "advice": "

The derivative of $x^n$ is given by the following:

\n

\\[ \\frac{\\mathrm{d}}{\\mathrm{d}x}(x^n) = n \\times x^{n-1} \\]

\n

We can compute the derivative of $f(x)$ by computing the derivatives of each of the three terms, and then adding them together.

\n

\\begin{align}
\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[2]}*x^{powers[2]}}) &= \\simplify[basic]{{powers[2]}*{coefficients[2]}*x^({powers[2]}-1)} \\\\
&= \\simplify{{coefficients[2]*powers[2]}*x^{powers[2]-1}}
\\end{align}

\n

\\begin{align}
\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[1]}*x^{powers[1]}}) &= \\simplify[basic]{{powers[1]}*{coefficients[1]}*x^({powers[1]}-1)} \\\\
&= \\simplify{{coefficients[1]*powers[1]}*x^{powers[1]-1}}
\\end{align}

\n

The derivative of a constant is $0$. So,

\n

\\[ \\frac{\\mathrm{d}}{\\mathrm{d}x}(\\var{coefficients[0]}) = 0 \\]

\n

\\begin{align}
\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[0]}*x^{powers[0]}}) &= \\simplify[basic]{{powers[0]}*{coefficients[0]}*x^({powers[0]}-1)} \\\\
&= \\simplify{{coefficients[0]*powers[0]}*x^{powers[0]-1}}
\\end{align}

\n

Hence,

\n

\\[ \\frac{\\mathrm{d}f}{\\mathrm{d}x} = \\simplify{ {coefficients[2]*powers[2]}*x^{powers[2]-1} + {coefficients[1]*powers[1]}*x^{powers[1]-1} + {coefficients[0]*powers[0]}*x^{powers[0]-1} } \\]

", "rulesets": {}, "parts": [{"stepsPenalty": "1", "prompt": "

Differentiate the following function.

\n

\\[ f(x) = \\simplify[all,!noLeadingMinus]{ {coefficients[2]}*x^{powers[2]} + {coefficients[1]}*x^{powers[1]} + {coefficients[0]}*x^{powers[0]} } \\]

\n

$\\frac{\\mathrm{d}f}{\\mathrm{d}x} = $ [[0]]

\n

{powers[1]}

\n

{powers[2]}

\n

{condition[0]}

\n

{condition[1]}

\n

{condition[2]}

\n

{prime[0]}

\n

{prime[1]}

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{coefficients[2]*powers[2]}*x^{powers[2]-1} + {coefficients[1]*powers[1]}*x^{powers[1]-1} + {coefficients[0]*powers[0]}*x^{powers[0]-1}", "marks": "4", "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "steps": [{"prompt": "

The derivative of $x^n$ is given by the following:

\n

\\[ \\frac{\\mathrm{d}}{\\mathrm{d}x}(x^n) = n \\times x^{n-1} \\]

\n

Enter the derivatives of each of the three terms in $f(x)$:

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}, {"variableReplacements": [], "prompt": "

$\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[2]}*x^{powers[2]}}) =$

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{coefficients[2]*powers[2]}*x^{powers[2]-1}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"variableReplacements": [], "prompt": "

$\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[1]}*x^{powers[1]}}) =$

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{coefficients[1]*powers[1]}*x^{powers[1]-1}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"variableReplacements": [], "prompt": "

$\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[0]}*x^{powers[0]}}) =$

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{coefficients[0]*powers[0]}*x^{powers[0]-1}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "marks": 0, "scripts": {}, "showCorrectAnswer": true, "type": "gapfill"}], "extensions": [], "statement": "

Numbas is really good at creating and marking randomised maths questions. In this question, you're given a random polynomial to differentiate.

\n

Notice how Numbas automatically simplifies the mathematical expressions so they look as if a human wrote them.

\n

See this question in the public editor

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"prime": {"definition": "satisfy(\n//variables to be defined using nm\n[n,m],\n//definition of variables\n[random(3..5),random(2..5)],\n//condition on the variables, m and n forcec to be coprime\n[gcd(m,n)=1]\n\n)", "templateType": "anything", "group": "Ungrouped variables", "name": "prime", "description": ""}, "powers": {"definition": "sort(shuffle(list(0..10))[0..4])", "templateType": "anything", "group": "Ungrouped variables", "name": "powers", "description": "

[0..4] da el tamaño de la lista

\n

list(0..10) conjunto de datos a tomar

\n

shuffle?????

\n

sort ordenar

"}, "num_terms": {"definition": "3", "templateType": "anything", "group": "Ungrouped variables", "name": "num_terms", "description": ""}, "condition": {"definition": "satisfy([a,b,c],[random(1..10),random(1..10),random(1..10)],[b^2-4*a*c>0])", "templateType": "anything", "group": "Ungrouped variables", "name": "condition", "description": "

este hace las veces de un mientras que....!!!!

"}, "coefficients": {"definition": "repeat(random(-10..10 except 0),num_terms)", "templateType": "anything", "group": "Ungrouped variables", "name": "coefficients", "description": "

repeat(random(-10..10 except 0),num_terms) crea un vector con nro de terminos

"}}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Marlon Arcila", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/321/"}]}]}], "contributors": [{"name": "Marlon Arcila", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/321/"}]}