// Numbas version: finer_feedback_settings {"name": "Superposition of electric fields", "extensions": [], "custom_part_types": [], "resources": [["question-resources/Picture_1.png", "/srv/numbas/media/question-resources/Picture_1.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Superposition of electric fields", "tags": ["coulomb", "elec", "field", "tut1", "vector", "Vector"], "metadata": {"description": "Evaluation of the vector superposition of fields arising from four point-charges. This is a problem of vector addition, vector magnitudes and scalar (dot) products with a bit of trigonometry thrown in for good measure.", "licence": "All rights reserved"}, "statement": "
\nA square of side length {sidecm} cm has charges of different magnitudes placed at its four corners. Clockwise from the top right as viewed from above these are $q_1$ to $q_4$, with values {q1}, {q2}, {q3} and {q4} nC. In this question, you are required to determine the total electric field, including both magnitude and direction, at the centre of the square due to this arrangement of point charges.
\nThis question is a relatively complicated example of application of the principle of superposition.
\nYou should use the values of the physical constants provided in the module notes, assume the medium is air, quote all answers to 4 significant figures and you may express values in scientific format.
", "advice": "\nThis is a problem of superposition of four different fields, which amounts to the sum of four vectors. Each field is an expression of Coulomb's Law, so that the pre-factor is
\n$\\displaystyle {q_i\\over 4\\pi\\varepsilon_0 r^2}$,
\nwhere since the point of interest is the centre of the square, the distance $r$ is the same for each point-charge (in this case {side*100}/$\\sqrt{2}\\approx$ {siground(r*100,4)} cm). In each case the field points radially away from the point-charge so that for $q_1$ it is down and left in equal measures, for $q_2$ it is up and to the left, and so on. For negative charges the sign of $q$ can be thought of reversing the direction (fields converge on negative point charges). Take care in determining the direction and note that diagrams generally help!
\nThe value of $E$ can be readily obtained and the direction in each case given by
\n$\\displaystyle{1\\over\\sqrt{2}}\\left(\\pm \\hat{i} \\pm \\hat{j}\\right)$,
\nwith the combinations of $\\pm$ depending upon which charge we're considering and the $\\sqrt{2}$ factor coming from the fact that this is a unit vector.
\nOnce each vector field has been obtained they can be summed by component (apply the principle of superposition) giving the total $E$-field at the centre of the square.
\nFinally the angle with the line joining $q_2$ and $q_4$ can be obained by noting that the dot product of the total field with the direction of the displacement from $q_2$ to $q_4$ yields an angle:
\n$\\displaystyle{\\vec{E}.\\left(-\\frac{\\hat{i}}{\\sqrt{2}}+\\frac{\\hat{j}}{\\sqrt{2}}\\right)=\\left|\\vec{E}\\right|\\cos(\\theta)}$
\nso
\n$\\displaystyle{-E_x+E_y=\\sqrt{2}\\left|\\vec{E}\\right|\\cos(\\theta)\\Rightarrow \\theta=\\cos^{-1}\\left(\\frac{E_y-E_x}{\\sqrt{2}\\left|\\vec{E}\\right|}\\right)}$.
\nIt then only remains to determine the value of theta that lies in the required angle range.
", "rulesets": {}, "extensions": [], "variables": {"Ey1": {"name": "Ey1", "group": "Ungrouped variables", "definition": "Ex1", "description": "$y$-component of the E-field from q1(N/C).
", "templateType": "anything"}, "q3": {"name": "q3", "group": "Ungrouped variables", "definition": "random(1..10#1 except q1 except q2)*random(-1..1#2)", "description": "Point charge in the bottom left corner, nC.
", "templateType": "anything"}, "epsair": {"name": "epsair", "group": "Ungrouped variables", "definition": "1.0005", "description": "Relative permittivity of air.
", "templateType": "anything"}, "Emag": {"name": "Emag", "group": "Ungrouped variables", "definition": "sqrt(Extotal^2+Eytotal^2)", "description": "Magnitude of the field at the centre.
", "templateType": "anything"}, "sidecm": {"name": "sidecm", "group": "Ungrouped variables", "definition": "random(5..15#1)", "description": "Length of side of square in cm.
", "templateType": "anything"}, "Ex2": {"name": "Ex2", "group": "Ungrouped variables", "definition": "-({qq2}*{k}/{r}^2)/sqrt(2)", "description": "$x$-component of the E-field from q2 (N/C).
", "templateType": "anything"}, "thetar": {"name": "thetar", "group": "Ungrouped variables", "definition": "arccos((-Extotal/sqrt(2)+Eytotal/sqrt(2))/Emag)", "description": "Angle between the line between q2 and q4 and the E-field
", "templateType": "anything"}, "Ey4": {"name": "Ey4", "group": "Ungrouped variables", "definition": "-Ex4", "description": "$y$-component of the E-field from q4 (N/C).
", "templateType": "anything"}, "Ey2": {"name": "Ey2", "group": "Ungrouped variables", "definition": "-Ex2", "description": "$y$-component of the E-field due to q2 (N/C).
", "templateType": "anything"}, "Ex4": {"name": "Ex4", "group": "Ungrouped variables", "definition": "({qq4}*{k}/{r}^2)/sqrt(2)", "description": "$x$-component of the E-field from q4 (N/C).
", "templateType": "anything"}, "Extotal": {"name": "Extotal", "group": "Ungrouped variables", "definition": "(Ex1+Ex2+Ex3+Ex4)", "description": "", "templateType": "anything"}, "q4": {"name": "q4", "group": "Ungrouped variables", "definition": "random(1..10#1 except q1 except q2 except q3)*random(-1..1#2)", "description": "Point charge in the top left corner, nC.
", "templateType": "anything"}, "r": {"name": "r", "group": "Ungrouped variables", "definition": "side/sqrt(2)", "description": "Distance from the charges to the centre of the square in m.
", "templateType": "anything"}, "q2": {"name": "q2", "group": "Ungrouped variables", "definition": "random(1..10#1 except q1)*random(-1..1#2)", "description": "Point charge in bottom right corner, nC.
", "templateType": "anything"}, "theta": {"name": "theta", "group": "Ungrouped variables", "definition": "if(thetad>270,\n 360-thetad,\n if(thetad>180,\n thetad-180,\n if(thetad>90,\n 180-thetad,\n thetad)\n)\n)", "description": "", "templateType": "anything"}, "Ex1": {"name": "Ex1", "group": "Ungrouped variables", "definition": "-(qq1*k/r^2)/sqrt(2)", "description": "$x$-component of the E-field from q1 (N/C).
", "templateType": "anything"}, "Eytotal": {"name": "Eytotal", "group": "Ungrouped variables", "definition": "Ey1+Ey2+Ey3+Ey4", "description": "", "templateType": "anything"}, "eps0": {"name": "eps0", "group": "Ungrouped variables", "definition": "8.854*10^-12", "description": "Permittivity of free space in F/m to 4 significant figures.
", "templateType": "anything"}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "1/(4*pi*eps0*epsair)", "description": "The constant, $1/4\\pi\\varepsilon$ in units of m/F.
", "templateType": "anything"}, "Ey3": {"name": "Ey3", "group": "Ungrouped variables", "definition": "Ex3", "description": "$y$-component of the E-field from q3 (N/C).
", "templateType": "anything"}, "Ex3": {"name": "Ex3", "group": "Ungrouped variables", "definition": "({qq3}*{k}/{r}^2)/sqrt(2)", "description": "$x$-component of the E-field from q3 (N/C).
", "templateType": "anything"}, "q1": {"name": "q1", "group": "Ungrouped variables", "definition": "random(1..10#1)*random(-1..1#2)", "description": "Point charge in top right corner in nC.
", "templateType": "anything"}, "thetad": {"name": "thetad", "group": "Ungrouped variables", "definition": "thetar*180/pi", "description": "", "templateType": "anything"}, "rsq": {"name": "rsq", "group": "Ungrouped variables", "definition": "r*r", "description": "r^2, cm
", "templateType": "anything"}, "side": {"name": "side", "group": "Ungrouped variables", "definition": "sidecm/100", "description": "Side length in m.
", "templateType": "anything"}, "qq1": {"name": "qq1", "group": "Ungrouped variables", "definition": "q1*10^-9", "description": "q1 in C
", "templateType": "anything"}, "qq2": {"name": "qq2", "group": "Ungrouped variables", "definition": "q2*10^-9", "description": "q2 in C
", "templateType": "anything"}, "qq3": {"name": "qq3", "group": "Ungrouped variables", "definition": "q3*10^-9", "description": "q3 in C
", "templateType": "anything"}, "qq4": {"name": "qq4", "group": "Ungrouped variables", "definition": "q4*10^-9", "description": "q4 in C
", "templateType": "anything"}}, "variablesTest": {"condition": "theta>0", "maxRuns": 100}, "ungrouped_variables": ["Emag", "eps0", "epsair", "Ex1", "Ex2", "Ex3", "Ex4", "Extotal", "Ey1", "Ey2", "Ey3", "Ey4", "Eytotal", "k", "q1", "q2", "q3", "q4", "qq1", "qq2", "qq3", "qq4", "r", "rsq", "side", "sidecm", "theta", "thetad", "thetar"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Field due to first charge", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Determine the electric field at the centre of the square due to $q_1$ ({q1}nC).
\n$E_x(q_1)=$[[0]]V/m
\n$E_y(q_1)=$[[1]]V/m
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Ex1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "Ex1*0.995", "maxValue": "Ex1*1.005", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en", "scientific"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Ey1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "Ey1*0.995", "maxValue": "Ey1*1.005", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en", "scientific"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Field due to second charge", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Determine the electric field at the centre of the square due to $q_2$ ({q2}nC).
\n$E_x(q_2)=$[[0]]V/m
\n$E_y(q_2)=$[[1]]V/m
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Ex2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{Ex2}*0.995", "maxValue": "{Ex2}*1.005", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en", "scientific"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Ey2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{Ey2}*0.995", "maxValue": "{Ey2}*1.005", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en", "scientific"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Field due to third charge", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Determine the electric field at the centre of the square due to $q_3$ ({q3}nC).
\n$E_x(q_3)=$[[0]]V/m
\n$E_y(q_3)=$[[1]]V/m
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Ex3", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{Ex3}*0.995", "maxValue": "{Ex3}*1.005", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en", "scientific"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Ey3", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{Ey3}*0.995", "maxValue": "{Ey3}*1.005", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en", "scientific"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Field due to fourth charge", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Determine the electric field at the centre of the square due to $q_4$ ({q4}nC).
\n$E_x(q_4)=$[[0]]V/m
\n$E_y(q_4)=$[[1]]V/m
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Ex4", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{Ex4}*0.995", "maxValue": "{Ex4}*1.005", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en", "scientific"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Ey4", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{Ey4}*0.995", "maxValue": "{Ey4}*1.005", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en", "scientific"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Total field", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Determine the total electric field at the centre of the square due to the all four charges.
\n$E_x=$[[0]]V/m
\n$E_y=$[[1]]V/m
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Extotal", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "({Ex1}+{Ex2}+{Ex3}+{Ex4})0.995", "maxValue": "({Ex1}+{Ex2}+{Ex3}+{Ex4})1.005", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en", "scientific"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Eytotal", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "(Ey1+Ey2+Ey3+Ey4)*0.995", "maxValue": "(Ey1+Ey2+Ey3+Ey4)*1.005", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en", "scientific"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Angle", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "What is the angle, $\\theta$, between the direction of the $E$-field and the line joining the charges $q_2$ ({q2}nC) and $q_4$ ({q4}nC)? Express your answer as an angle in degrees in the range $0^\\circ\\le\\theta\\le90^\\circ$.
\n$\\theta=$[[0]]$^\\circ$.
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "theta", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "theta*0.995", "maxValue": "theta*1.005", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "4", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en", "scientific"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Jon Goss", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3925/"}]}]}], "contributors": [{"name": "Jon Goss", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3925/"}]}