// Numbas version: exam_results_page_options {"name": "Power series solution of second order ODE", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..3)*sign(random(-1,1))", "name": "b1", "description": ""}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..3)*sign(random(-1,1))", "name": "a1", "description": ""}, "amp2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "'$a_{m+2}$'", "name": "amp2", "description": ""}}, "ungrouped_variables": ["a1", "amp2", "b1"], "rulesets": {}, "name": "Power series solution of second order ODE", "functions": {"addsumfunction": {"type": "string", "language": "javascript", "definition": "Numbas.jme.display.texOps.sum=function(thing,texArgs) {\n var lowerLimit = '';\n var upperLimit = '';\n if (texArgs[1]) {\n lowerLimit = texArgs[1];\n }\n if (texArgs[2]) {\n upperLimit = texArgs[2];\n }\n return ('\\\\sum_{'+lowerLimit+'}^{'+upperLimit+'}{'+texArgs[0]+'}');\n }\n return ('');", "parameters": []}}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"answer": "{-b1}*a0/2", "showCorrectAnswer": true, "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"message": "

Do not enter decimals in your answer.

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "answersimplification": "all", "marks": 1, "vsetrangepoints": 5}, {"answer": "-{a1+b1}*a1/6", "showCorrectAnswer": true, "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"message": "

Do not enter decimals in your answer.

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "answersimplification": "all", "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "

In your answer use the symbols a0 and a1 for $a_0$ and $a_1$ respectively.  In addition, do not enter decimals.

\n

$a_2=$ [[0]].

\n

$a_3=$ [[1]].

", "marks": 0}], "statement": "

{addSumFunction()}

\n

Seek a power series solution, about $x=0$, in the form

\n

\\[y(x)=\\sum_{n=0}^{\\infty}{a_nx^n},\\]

\n

of the differential equation

\n

\\[\\simplify{y''+{a1}*x*y'+{b1}*y}=0.\\]

\n

Take $a_0$ and $a_1$ to be arbitrary constants, and enter the coefficients $a_2$ and $a_3$ as functions of $a_0$ and $a_1$.

", "tags": ["checked2015", "MAS2105"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

Uses a custom function to allow simplification of a LaTeX sum, in the same manner as e.g. int() or defint().

", "licence": "Creative Commons Attribution 4.0 International", "description": "

Power series solution of $y''+axy'+by=0$ about $x=0$.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

We have

\n

\\[y(x)=\\sum_{n=0}^{\\infty}{a_nx^n},\\]

\n

so

\n

\\[y'(x)=\\sum_{n=1}^{\\infty}{a_nnx^{n-1}},\\]

\n

and

\n

\\[y''(x)=\\sum_{n=2}^{\\infty}{a_nn(n-1)x^{n-2}}.\\]

\n

Substitute these expressions into the original differential equation to obtain

\n

\\[\\simplify{sum(a_n*n*(n-1)x^(n-2),n=2,infty)+{a1}*sum(a_n*n*x^n,n=1,infty)+{b1}*sum(a_n*x^n,n=0,infty)}=0.\\]

\n

Now reset the index $m=n-2$ in the first summation, and $m=n$ in the second and third summations to obtain

\n

\\[\\simplify{sum({amp2}*(m+2)*(m+1)x^m,m=0,infty)+{a1}*sum(a_m*m*x^m,m=1,infty)+{b1}*sum(a_m*x^m,m=0,infty)}=0.\\]

\n

This equation must be valid for all values of $x$, so the coefficients of like powers of $x$ must vanish.  Take $m=0$ to obtain the coefficients of $x^0$, then

\n

\\[\\simplify{2*a2+{b1}*a0}=0,\\]

\n

and so

\n

\\[a_2=\\simplify{{-b1}*a0/2}.\\]

\n

Now take $m=1$ to obtain the coefficients of $x^1$, so

\n

\\[\\simplify{6*a3+{a1}*a1+{b1}*a1}=0,\\]

\n

then

\n

\\[a_3=\\simplify{-{a1+b1}*a1/6}.\\]

", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}