// Numbas version: exam_results_page_options {"showQuestionGroupNames": false, "name": "Partial Differential Equations", "timing": {"timeout": {"message": "", "action": "none"}, "timedwarning": {"message": "", "action": "none"}, "allowPause": true}, "navigation": {"allowsteps": true, "reverse": true, "showfrontpage": true, "browse": true, "startpassword": "", "preventleave": true, "onleave": {"message": "", "action": "none"}, "showresultspage": "oncompletion", "allowregen": true}, "feedback": {"showanswerstate": true, "advicethreshold": 0, "allowrevealanswer": true, "showactualmark": true, "feedbackmessages": [], "intro": "", "showtotalmark": true}, "metadata": {"licence": "None specified", "description": ""}, "duration": 0, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questions": [{"name": "PDEs 1: Steady state heat equation in a plate", "extensions": [], "custom_part_types": [], "resources": [["question-resources/heatplot_sinh.png", "/srv/numbas/media/question-resources/heatplot_sinh.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Nick McCullen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/953/"}], "tags": [], "metadata": {"description": "
PDE laplace equation
", "licence": "None specified"}, "statement": "The steady-state temperature distribution $u(z,x)$ in a 2D plate of lengh $L$ and height $H$ can be obtained by solving the Laplace equation: \\(\\displaystyle \\frac{\\partial^2 u}{\\partial x^2} + \\frac{\\partial^2 u}{\\partial z^2} =0 \\), given some boundary conditions on the four edges. The illustrated example below is for $u=0$ on the edges $x=(0,L)$ and $z=0$, but a function $u=f(x)$ on the edge $z=H$.
\n\n \nPart 1.
\nSolutions are of the form \\( \\displaystyle u(x,z) = B \\sin\\left( \\frac{\\pi}{\\var{L}} x \\right) \\sinh\\left( \\frac{\\pi}{\\var{L}} z \\right) \\),
\nand at $z=\\var{H}$ the boundary condition is that \\(\\displaystyle u(x,\\var{H}) = \\var{T}\\sin \\left( \\frac{\\pi}{\\var{L}}x \\right) \\).
\nEquating these two expressions gives: \\(\\displaystyle u(x,z=\\var{H}) = B \\sin\\left( \\frac{\\pi}{\\var{L}} x \\right) \\sinh\\left( \\frac{\\pi}{\\var{L}} (\\var{H}) \\right) = \\var{T}\\sin \\left( \\frac{\\pi}{\\var{L}}x \\right) \\).
\nTherefore: $B=\\dfrac{\\var{T}}{\\sinh\\left( \\simplify{ pi / {L} * {H}} \\right)} = \\var{B}$ (to the nearest integer).
\nPart 2.
\nThe full solution is therefore: \\( u(x,z) = \\var{B} \\sin\\left( \\frac{\\pi}{\\var{L}} x \\right) \\sinh\\left( \\frac{\\pi}{\\var{L}} z \\right) \\), so at the point $x=\\var{x}, z=\\var{y}$ this gives:
\n\\[u(\\var{x},\\var{y}) = \\var{B} \\sin\\left( \\frac{\\pi}{\\var{L}} \\var{x} \\right) \\sinh\\left( \\frac{\\pi}{\\var{L}} \\var{y} \\right) = \\var{ans}\\] (rounded to the nearest decimal place).
\n", "rulesets": {"std": ["all", "fractionNumbers", "!noLeadingMinus", "!collectNumbers"]}, "variables": {"y": {"name": "y", "group": "Ungrouped variables", "definition": "H*random(0.1,0.9)", "description": "", "templateType": "anything"}, "H": {"name": "H", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "templateType": "anything"}, "T": {"name": "T", "group": "Ungrouped variables", "definition": "random(50..200 #10)", "description": "\n", "templateType": "anything"}, "L": {"name": "L", "group": "Ungrouped variables", "definition": "H*random(2..4)", "description": "\n", "templateType": "anything"}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "H*random(0.1,0.9)", "description": "\n\n\n", "templateType": "anything"}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "precround(B*sin(pi*x/L)*sinh(pi*y/L), 1)", "description": "", "templateType": "anything"}, "B": {"name": "B", "group": "Ungrouped variables", "definition": "round(T/sinh(pi*H/L))", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["H", "L", "T", "B", "x", "y", "ans"], "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": "B=[[0]] $^\\circ$C
\nu=[[1]] $^\\circ$C
\n\n\n\n\n\n\n", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "B", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{B}-1", "maxValue": "{B}+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "u({x},{y})", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{ans}-0.1", "maxValue": "{ans}+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "PDEs 2: The Heat Equation", "extensions": [], "custom_part_types": [], "resources": [["question-resources/heatplot_sinh.png", "/srv/numbas/media/question-resources/heatplot_sinh.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Nick McCullen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/953/"}], "rulesets": {"std": ["all", "fractionNumbers", "!noLeadingMinus", "!collectNumbers"]}, "parts": [{"prompt": "Enter your answers as expressions including only integers, names of constants such as pi or symbols: +, -, *, /, ^ etc.
\nA=[[0]]
\nB=[[1]]
\n$\\alpha$=[[2]]
\n$\\beta$=[[3]]
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", "sortAnswers": false, "customMarkingAlgorithm": "", "marks": 0, "type": "gapfill", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "unitTests": [], "gaps": [{"mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "maxValue": "0", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "correctAnswerFraction": false, "showCorrectAnswer": true, "variableReplacements": [], "type": "numberentry", "useCustomName": true, "scripts": {}, "adaptiveMarkingPenalty": 0, "marks": 1, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "A", "minValue": "0", "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "mustBeReducedPC": 0, "unitTests": []}, {"mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "maxValue": "{B}", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "correctAnswerFraction": false, "showCorrectAnswer": true, "variableReplacements": [], "type": "numberentry", "useCustomName": true, "scripts": {}, "adaptiveMarkingPenalty": 0, "marks": 1, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "B", "minValue": "{B}", "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "mustBeReducedPC": 0, "unitTests": []}, {"answer": "{n}*pi/{L}", "failureRate": 1, "showFeedbackIcon": true, "showCorrectAnswer": true, "vsetRangePoints": 5, "variableReplacements": [], "type": "jme", "useCustomName": true, "adaptiveMarkingPenalty": 0, "checkVariableNames": false, "vsetRange": [0, 1], "checkingType": "absdiff", "answerSimplification": "std", "marks": 1, "valuegenerators": [], "extendBaseMarkingAlgorithm": true, "showPreview": true, "customName": "alpha", "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "scripts": {}, "checkingAccuracy": 0.001, "unitTests": []}, {"answer": "-{k}*{n}^2*pi^2/{L}^2", "failureRate": 1, "showFeedbackIcon": true, "showCorrectAnswer": true, "vsetRangePoints": 5, "variableReplacements": [], "type": "jme", "useCustomName": true, "adaptiveMarkingPenalty": 0, "checkVariableNames": false, "vsetRange": [0, 1], "checkingType": "absdiff", "answerSimplification": "std", "marks": 1, "valuegenerators": [], "extendBaseMarkingAlgorithm": true, "showPreview": true, "customName": "beta", "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "scripts": {}, "checkingAccuracy": 0.001, "unitTests": []}], "variableReplacements": [], "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "useCustomName": false, "customName": "", "adaptiveMarkingPenalty": 0}], "metadata": {"licence": "None specified", "description": "PDE heat equation
"}, "tags": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "Step 1:
\nA separable solution: \\( u(x,t) = X(x)T(t) \\) can be differentiated: \\( u_{t} = XT' \\) and \\( u_{xx} = X''T \\), ans inserted into the heat equation:
\n\\[ u_{xx} = \\frac{1}{\\var{k}} u_t \\]
\n\\[ X''T = \\frac{1}{\\var{k}} XT' \\]
\n\\[\\displaystyle \\frac{X''}{X} = \\frac{1}{\\var{k}} \\frac{T'}{T} \\]
\nEach side is constant to changes in the variable on the other side, so both sides must equal a constant $K$, giving two equations: \\( \\frac{X''}{X} = K \\) and \\( \\frac{1}{\\var{k}}\\frac{T'}{T} = K \\), which can be written as a pair of ODEs.
\nThe first equation \\( \\frac{\\text{d} T(t)}{\\text{d} t} = \\var{k}KT(t) \\) has the solution $T(t)=Ce^{\\var{k}Kt}$, and since physically realistic solutions have decaying solutions rather than exponentially growing ones \\( K \\) must be a negative number.
\nThis means that the second equation is \\[ \\frac{\\text{d}^2 X(x)}{\\text{d} x^2} = KX(x) = -\\alpha^2 X(x),\\] which has oscillating ($e^{i\\alpha t}$) solutions and the general solution: $X(x) = a\\cos(\\alpha x) + b\\sin(\\alpha x)$.
\nThus \\( K = -\\alpha^2 \\) and \\( T=e^{-\\var{k}\\alpha^2 t} \\), and we can define the constant \\( \\beta = -\\var{k}\\alpha^2\\), giving the full solution as: \\[ u(x,t) = X(x)T(t) = \\left(A \\cos (\\alpha x) + B \\sin(\\alpha x)\\right) e^{\\beta t}. \\]
\nStep 2:
\nAt \\( t=0 \\) the above expression is: \\( u(x,0) = \\left(A \\cos (\\alpha x) + B \\sin(\\alpha x)\\right) e^{0} = \\left(A \\cos (\\alpha x) + B \\sin(\\alpha x)\\right) \\)
\nThe boundary condition \\( u(0,t) = 0 \\) means that $A=0$, since $\\cos(0) = 1$.
\nThe boundary condition \\( u(\\var{L},t)=0 \\) allows any sine function that is zero at \\( x= \\var{L} \\) and, since \\( \\sin(n \\pi) = 0\\), it can be seen that if \\( \\alpha = \\frac{n\\pi}{\\var{L}} \\), then at \\(x=\\var{L} \\) the function \\( B_n \\sin( n\\pi x/ \\var{L}) =0 \\) for any value of $n$.
\nTherefore the solution becomes: \\[ u(x,t) = B \\sin\\left(\\frac{n\\pi}{\\var{L}} x \\right) e^{\\beta t}. \\]
\nStep 3:
\nThe initial condition \\( u(x,0) = \\var{B}\\sin(\\var{n/L}\\pi x)\\) can now be compared to the solution in Step 2 at \\( x=0 \\) to deduce that \\(B=\\var{B}\\) and \\(n=\\var{n}\\).
\nTherefore \\(\\alpha = \\frac{\\var{n}\\pi}{\\var{L}}\\) and \\(\\beta = -\\var{k}\\alpha^2 = -\\frac{\\var{k} (\\var{n})^2 \\pi^2}{\\var{L}^2} = -\\simplify{{k}*{n}^2*pi^2/{L}^2}\\)
\n\n", "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"k": {"name": "k", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(2..5)"}, "n": {"name": "n", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(2..4)*L"}, "B": {"name": "B", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(2..10)"}, "L": {"name": "L", "templateType": "anything", "description": "\n", "group": "Ungrouped variables", "definition": "random(1..4)"}}, "ungrouped_variables": ["B", "k", "L", "n"], "statement": "Use separation of variables to find a solution $u(x,t)$ to the 1D Heat equation \\(\\displaystyle \\frac{\\partial^2 u}{\\partial x^2} = \\frac{1}{\\var{k}} \\frac{\\partial u}{\\partial t} \\), given the boundary and initial conditions stated.
\n\n\n\nPDE wave equation
", "licence": "None specified"}, "statement": "The motion $u(x,t)$ of a thin beam is given by the 1D wave equation: \\(\\displaystyle \\frac{\\partial^2 u}{\\partial x^2} = \\frac{1}{\\var{k^2}}\\frac{\\partial^2 u}{\\partial t^2} \\).
\nIndividual basis solutions are of the form: \\[\\displaystyle u_n(x,t) = \\sin \\left( \\frac{n\\pi}{\\var{L}}x\\right) \\left\\{ E_n \\cos (\\var{k}\\frac{n\\pi}{\\var{L}} t) + F_n \\sin(\\var{k}\\frac{n\\pi}{\\var{L}} t) \\right\\}. \\]
\nInitial Condition 1:
\nAt \\(t=0\\) basis solutions become: \\( \\displaystyle u_n(x,0) = \\sin \\left( \\frac{n\\pi}{\\var{L}}x\\right) \\left\\{ E_n \\cos (0) + F_n \\sin(0) \\right\\} = E_n \\sin \\left( \\frac{n\\pi}{\\var{L}}x\\right) \\)
\nThe initial displacement: \\(u(x,0) = \\simplify{{E1} sin} \\left( \\simplify{{n1}*pi/{L}}x\\right) + \\simplify{{E2} sin} \\left( \\simplify{{n2}*pi/{L}} x \\right) \\) is the sum of two terms.
\nThe first term has wavelength \\( \\frac{n_1\\pi}{\\var{L}} =\\simplify{{n1}*pi/{L}}\\), so \\(n_1 = \\var{n1}\\), and amplitude \\(E_1 = \\var{E1}\\).
\nThe second term has wavelength \\( \\frac{n_2\\pi}{\\var{L}} =\\simplify{{n2}*pi/{L}}\\), so \\(n_2 = \\var{n2}\\), and amplitude \\(E_2 = \\var{E2}\\).
\nInitial Condition 2:
\n\n
Partially differentiating the basis solution \\(u_n(x,t)\\) to give the velocity: \\[\\frac{\\partial u_n}{\\partial t} = \\sin \\left( \\frac{n\\pi}{\\var{L}}x\\right) \\left\\{ -E_n \\sin (\\var{k}\\frac{n\\pi}{\\var{L}} t) + F_n \\cos(\\var{k}\\frac{n\\pi}{\\var{L}} t) \\right\\}\\frac{\\var{k}n\\pi}{\\var{L}}. \\] Then setting \\(t=0\\) this becomes: \\(\\displaystyle \\frac{\\partial u_n}{\\partial t}(x,0) = \\sin \\left( \\frac{n\\pi}{\\var{L}}x\\right) \\big\\{ -E_n \\sin (0) + F_n \\cos(0) \\big\\}\\frac{\\var{k}n\\pi}{\\var{L}} =F_n\\frac{\\var{k}n\\pi}{\\var{L}}\\sin \\left( \\frac{n\\pi}{\\var{L}}x\\right). \\)
\nThe initial velocity is given as the sum of two components: \\(\\displaystyle \\frac{\\partial u}{\\partial t} (x,0) = \\simplify{{F1}*{k}*{n1}*pi/{L} sin }\\left( \\simplify{{n1}*pi/{L}} x\\right) + \\simplify{({F2}*{k}*{n2}*pi/({L})) sin }\\left( \\simplify{{n2}*pi/{L}} x\\right). \\)
\nSince \\(n_1 = \\var{n1}\\) the first term can be compared with the differentiated solution to give: \\( F_1\\dfrac{(\\var{k})(\\var{n1})\\pi}{\\var{L}} = \\simplify{{F1}*{k}*{n1}*pi/{L}} \\), so \\(F_1 = \\var{F1}\\).
\nLikewise for the second term \\(n_2 = \\var{n2}\\) so: \\( F_2\\dfrac{(\\var{k})(\\var{n2})\\pi}{\\var{L}} = \\simplify{{F2}*{k}*{n2}*pi/{L}} \\), so \\(F_2 = \\var{F2}\\).
\n", "rulesets": {"std": ["all", "!noLeadingMinus", "!collectNumbers", "fractionNumbers", "!unitFactor"]}, "variables": {"F2": {"name": "F2", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "\n", "templateType": "anything"}, "E1": {"name": "E1", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything"}, "n2": {"name": "n2", "group": "Ungrouped variables", "definition": "n1+random(1..4)", "description": "", "templateType": "anything"}, "L": {"name": "L", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "\n", "templateType": "anything"}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "E2": {"name": "E2", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything"}, "F1": {"name": "F1", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "\n", "templateType": "anything"}, "n1": {"name": "n1", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "\n", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["k", "L", "E1", "E2", "F1", "F2", "n1", "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": "