// Numbas version: exam_results_page_options {"name": "Second-Order ODE: Inhomogeneous with oscillating forcing (non-resonant)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Second-Order ODE: Inhomogeneous with oscillating forcing (non-resonant)", "tags": [], "metadata": {"description": "

Complementary function/particular integral for forced simple harmonic motion (non-resonant)

", "licence": "None specified"}, "statement": "

A function $y(t)$ satisfies the following inhomogeneous ODE:

\n

$\\displaystyle{\\frac{d^2 y}{dt^2}+\\var{n2}y=\\var{a}\\sin(\\var{b}t)}$

", "advice": "

a)

\n

For the complementary function, $y_{\\rm CF}$, we need to solve

\n

$\\displaystyle{\\frac{d^2 y}{dt^2}+\\var{n2}y=0}$

\n

We could substitute in the given expression, and then use this to find $\\omega$ directly. Alternatively, we can recognise that this is a constant coefficient ODE, and look for solutions of the form $\\displaystyle{y = \\mathrm{e}^{\\lambda x}}$. We can immediately see that this implies that

\n

\\[\\lambda^2 + \\var{n2} = 0 \\iff \\lambda = \\pm \\var{n} i\\]

\n

This means that the complementary function takes the form

\n

\\[y_{\\rm CF} = A\\cos\\var{n}t + B \\sin \\var{n}t\\]

\n

i.e. $\\omega = \\var{n}$.

\n

b)

\n

For the particular integral, $y_{\\rm PI}$, we look for a solution to the original ODE of the form 

\n

\\[y_{\\rm PI} = k \\sin(\\var{b}t)\\]

\n

Substituting this into ODE, we see that

\n

\\[-\\simplify{{b}*{b}}k\\sin(\\var{b}t) + \\var{n2}k\\sin(\\var{b}t) = \\var{a}\\sin(\\var{b}t) \\Longrightarrow \\simplify{{n2} - {b}*{b}}k = \\var{a} \\Longrightarrow k = \\simplify{{a}/{{n2}-{b}*{b}}}\\]

\n

This gives a particular integral of 

\n

\\[y_{\\rm PI} =  \\simplify{{a}/{{n2}-{b}*{b}}}\\sin(\\var{b}t)\\]

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"n": {"name": "n", "group": "Ungrouped variables", "definition": "random(3 .. 9#2)", "description": "", "templateType": "randrange", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2 .. 5#0.5)", "description": "", "templateType": "randrange", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2 .. 8#2)", "description": "", "templateType": "randrange", "can_override": false}, "n2": {"name": "n2", "group": "Ungrouped variables", "definition": "n^2", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["n", "a", "b", "n2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

The complementary function can be written in the form

\n

\\[y_{\\rm CF} = A \\cos \\omega t + B\\sin\\omega t\\,,\\]

\n

where $A$ and $B$ are constants. Assuming that $\\omega>0$, what is the value of this quantity?

\n

$\\omega$=  [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "jme", "useCustomName": true, "customName": "y= alternative", "marks": "6", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "answer": "y={a}*sin({b}t)/({n2}-{b}^2)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "t", "value": ""}, {"name": "y", "value": ""}]}], "answer": "{n}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Find the particular integral for this ODE:

\n

$y_{\\rm PI}$=  [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "jme", "useCustomName": true, "customName": "y= alternative", "marks": "6", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "answer": "y={a}*sin({b}t)/({n2}-{b}^2)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "t", "value": ""}, {"name": "y", "value": ""}]}], "answer": "{a}*sin({b}t)/({n2}-{b}^2)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "t", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Paul Bushby", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/744/"}, {"name": "George Stagg", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/930/"}, {"name": "John Appleby", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5728/"}, {"name": "Magda Carr", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/10043/"}]}]}], "contributors": [{"name": "Paul Bushby", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/744/"}, {"name": "George Stagg", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/930/"}, {"name": "John Appleby", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5728/"}, {"name": "Magda Carr", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/10043/"}]}