// Numbas version: finer_feedback_settings {"name": "Simon's copy of 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": [{"metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Power series solution of $y''+axy'+by=0$ about $x=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$.

", "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}.\\]

", "parts": [{"showCorrectAnswer": true, "variableReplacements": [], "unitTests": [], "scripts": {}, "gaps": [{"showCorrectAnswer": true, "variableReplacements": [], "unitTests": [], "checkingAccuracy": 0.001, "scripts": {}, "variableReplacementStrategy": "originalfirst", "notallowed": {"message": "

Do not enter decimals in your answer.

", "partialCredit": 0, "strings": ["."], "showStrings": false}, "expectedVariableNames": [], "answer": "{-b1}*a0/2", "marks": 1, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "type": "jme", "checkingType": "absdiff", "vsetRange": [0, 1], "vsetRangePoints": 5, "checkVariableNames": false, "answerSimplification": "all", "failureRate": 1, "showPreview": true}, {"showCorrectAnswer": true, "variableReplacements": [], "unitTests": [], "checkingAccuracy": 0.001, "scripts": {}, "variableReplacementStrategy": "originalfirst", "notallowed": {"message": "

Do not enter decimals in your answer.

", "partialCredit": 0, "strings": ["."], "showStrings": false}, "expectedVariableNames": [], "answer": "-{a1+b1}*a1/6", "marks": 1, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "type": "jme", "checkingType": "absdiff", "vsetRange": [0, 1], "vsetRangePoints": 5, "checkVariableNames": false, "answerSimplification": "all", "failureRate": 1, "showPreview": true}], "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "type": "gapfill", "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]].

"}], "variable_groups": [], "name": "Simon's copy of Power series solution of second order ODE", "preamble": {"js": "", "css": ""}, "rulesets": {}, "functions": {"addsumfunction": {"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 ('');", "language": "javascript", "parameters": [], "type": "string"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "tags": [], "variables": {"amp2": {"name": "amp2", "group": "Ungrouped variables", "definition": "'$a_{m+2}$'", "templateType": "anything", "description": ""}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(1..3)*sign(random(-1,1))", "templateType": "anything", "description": ""}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(1..3)*sign(random(-1,1))", "templateType": "anything", "description": ""}}, "ungrouped_variables": ["a1", "amp2", "b1"], "extensions": [], "type": "question", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}