// Numbas version: finer_feedback_settings {"name": "1.2.3. Polynomial Expressions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "1.2.3. Polynomial Expressions", "tags": [], "metadata": {"description": "
Part of HELM Book 1.2
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "An important group of mathematical expressions which use indices are known as polynomials. Examples of polynomials are:
\n\\(4x^3 +2x^2 +3x−7,\\quad x^2 +x,\\quad 17 −2t+7t^4, \\quad z −z^3 \\)
\nNotice that they are all constructed using non-negative whole number powers of the variable. Recall that $x^0 = 1$ and so the number $−7$ appearing in the first expression can be thought of as $−7x^0$. Similarly the $17$ appearing in the third expression can be read as $17t^0$.
\nA polynomial expression takes the form
\n\\( a_0 + a_1x + a_2x^2 + a_3x^3 + : : : + a_nx^n \\)
\nwhere $a_0$, $a_1$, $a_2$, $a_3$, $\\dots$ $a_n$ are all constants called the coeffcients of the polynomial. The number $a_0$ is also called the constant term. The highest power in a polynomial is called the degree of the polynomial.
\nPolynomials with low degrees have special names and subscript notation is often not needed:
\nPolynomial | \nDegree | \nName | \n
---|---|---|
$ax^3+bx^2+cx+d$ | \n3 | \ncubic | \n
$ax^2+bx+c$ | \n2 | \nquadratic | \n
$ax+b$ | \n1 | \nlinear | \n
$a$ | \n0 | \nconstant | \n
The reason for the convoluted double simplification is because without this, you occasionally got an expression with a +- in front of the second term. Why? I have no idea. Multiple iterations of \"simplify\" did not change it. But simplifying the expression, converting to a string and then repeating seems to fix it!!!
", "templateType": "anything", "can_override": false}, "q3_deg": {"name": "q3_deg", "group": "question 3", "definition": "if(q3_coeffs[0]<>0,9,\n if(q3_coeffs[1]<>0,8,\n if(q3_coeffs[2]<>0,7,\n if(q3_coeffs[3]<>0,6,\n if(q3_coeffs[4]<>0,5,\n if(q3_coeffs[5]<>0,4,\n if(q3_coeffs[6]<>0,3,\n if(q3_coeffs[7]<>0,2,\n if(q3_coeffs[8]<>0,1,0\n )))))))))", "description": "", "templateType": "anything", "can_override": false}, "q3_coeffs": {"name": "q3_coeffs", "group": "question 3", "definition": "[weighted_random([[0,4],[1,1]]) * random(-9..9),\n weighted_random([[0,4],[1,1]]) * random(-9..9),\n weighted_random([[0,4],[1,1]]) * random(-9..9),\n weighted_random([[0,3],[1,1]]) * random(-9..9),\n weighted_random([[0,3],[1,1]]) * random(-9..9),\n weighted_random([[0,3],[1,1]]) * random(-9..9),\n weighted_random([[0,2],[1,1]]) * random(-9..9),\n weighted_random([[0,2],[1,1]]) * random(-9..9),\n weighted_random([[0,2],[1,1]]) * random(-9..9),\n random(-9..9)\n ]", "description": "", "templateType": "anything", "can_override": false}, "q3_expr_bits": {"name": "q3_expr_bits", "group": "question 3", "definition": "shuffle([q3_coeffs[0] + letter + \"^9\",\n q3_coeffs[1] + letter + \"^8\" , \n q3_coeffs[2] + letter + \"^7\" , \n q3_coeffs[3] + letter + \"^6\" , \n q3_coeffs[4] + letter + \"^5\" , \n q3_coeffs[5] + letter + \"^4\" , \n q3_coeffs[6] + letter + \"^3\" , \n q3_coeffs[7] + letter + \"^2\" , \n q3_coeffs[8] + letter , \n q3_coeffs[9] \n ])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["alphabet", "letter"], "variable_groups": [{"name": "question 1", "variables": ["q1_expr_array", "q1_expr", "q1_idx", "q1_ans_array", "q1_ans"]}, {"name": "question 2", "variables": ["weighted_random_list", "q2_quadratic", "q2_linear", "q2_constant", "q2_expr", "q2_sgn1", "q2_sgn2", "q2_expr_parts"]}, {"name": "question 3", "variables": ["q3_expr", "q3_deg", "q3_coeffs", "q3_expr_bits"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}