#import "../template/lib.typ": * #import "@preview/cetz:0.4.2" #import "@preview/cetz-plot:0.1.3" #import "@preview/plotsy-3d:0.2.1": * #set page(paper: "a4") #show: notes.with( title: "EE1P1", subtitle: "Graded Homework Assignment 1", author: "Folkert Kevelam" ) == Exercise 1 === Part a The value of the electric field $arrow(E)_cal(p)$ at point $cal(P)(cal(l), cal(l), 0)$ can be calculated by the vector sum of the individual electric fields of $Q_1$, $Q_2$, and $Q_3$. The individual vector fields are as follows: $ arrow(E)_(1, cal(P)) &= k q / r_1^2 hat(r_1) = k q / (sqrt(cal(l)^2 + cal(l)^2 + 0))^2 1 / (sqrt(cal(l)^2 + cal(l)^2 + 0)) vec(cal(l), cal(l), 0) \ &= k q / (cal(l)^2) vec(1/(2sqrt(2)), 1/(2sqrt(2)), 0) space [N/C] \ arrow(E)_(2, cal(P)) &= k (2q) / r_2^2 hat(r_2) = 2 k q / (sqrt(0 + cal(l)^2 + 0))^2 1 / sqrt(0 + cal(l)^2 + 0) vec(0, cal(l), 0) \ &= k q / cal(l)^2 vec(0,2,0) [N/C]\ arrow(E)_(2, cal(P)) &= k (-3q) / r_3^2 hat(r_3) = -3 k q / sqrt(cal(l)^2 + 0 + 0)^2 1 / sqrt(cal(l)^2 + 0 + 0) vec(cal(l), 0, 0) \ &= k q / cal(l)^2 vec(-3,0,0) [N/C] $ The total electric field at point $cal(P)$ is: $ arrow(E)_cal(P) &= arrow(E)_(1, cal(P)) + arrow(E)_(2, cal(P)) + arrow(E)_(3, cal(P)) = k q / cal(l)^2 dot (vec(1/(2sqrt(2)), 1/(2sqrt(2)), 0) + vec(0,2,0) + vec(-3,0,0)) \ &= k q / cal(l)^2 vec(1/(2sqrt(2)) - 3, 1/(2sqrt(2)) + 2, 0) [N/C] $ #cetz.canvas({ import cetz.draw: * import cetz-plot: * plot.plot( size: (10,10), axis-style: "school-book", x-tick-step: none, y-tick-step: none, plot-style: (stroke: 2pt), { plot.add(((0,0),), mark: "o", mark-size: 0.5, mark-style: (stroke: none, fill: red)) plot.add(((1,0),), mark: "o", mark-size: 0.5, mark-style: (stroke: none, fill: red)) plot.add(((0,1),), mark: "o", mark-size: 0.5, mark-style: (stroke: none, fill: blue)) plot.add(((1,1),), mark: "o", mark-size: 0.25, mark-style: (stroke: none, fill: black)) plot.add-anchor("pt", (1,1)) let vec(data) = { plot.add(data, mark: "<>", mark-size: 2) } let calc_e(charge, distance, v) = { let x = (charge / distance) * v.at(0) let y = (charge / distance) * v.at(1) (x,y) } let charges = ( 1, 2, -3 ) let distances = ( 2, 1, 1 ) let dir_vectors = ( (1/calc.sqrt(2), 1/calc.sqrt(2)), (0, 1), (1, 0) ) let summed_vector = (0,0) let n = 0 let scale = 0.1 while n < charges.len() { let field = calc_e(charges.at(n), distances.at(n), dir_vectors.at(n)) let temp_x = field.at(0) + summed_vector.at(0) let temp_y = field.at(1) + summed_vector.at(1) summed_vector.at(0) = temp_x summed_vector.at(1) = temp_y n += 1 } vec(((1,1),(1 + scale * summed_vector.at(0), 1 + scale * summed_vector.at(1)))) } ) }) === Part b In order to nullify the x-component of the electric field with the charge $Q_a$, the value of the charge $Q_a$ should be such that: $ arrow(E)_(a, cal(P)) hat(x) = - arrow(E)_cal(P) hat(x) \ k Q_a / r_a^2 hat(r)_a hat(x) = - k q / cal(l)^2 (1/(2sqrt(2)) - 3) $ For the fourth charge, the vector $r_a$ pointing from charge $Q_a$ to point $cal(P)$ is equal to: $ r_a = vec(3/2 cal(l), 3/2 cal(l), 0) \ |r_a| = sqrt((3/2 cal(l))^2 + (3/2 cal(l))^2 + 0) = 3/sqrt(2) cal(l) \ hat(r)_a = vec(1/sqrt(2), 1/sqrt(2)) $ Charge $Q_a$ has the same direction vector as charge $Q_1$, which makes sense since $Q_1$ lies on the line between $Q_a$ and $cal(P)$. We can plug the vector parameters into our equality: $ k Q_a / (3/sqrt(2) cal(l))^2 vec(1/sqrt(2), 1/sqrt(2), 0) hat(x) &= - k q / cal(l)^2 (1/(2sqrt(2)) - 3) \ Q_a 2 / 9 1/sqrt(2) &= -q (1/(2sqrt(2)) - 3) \ Q_a &= -q(9/4 - (27 sqrt(2))/2 ) \ Q_a &= ((27 sqrt(2)) / 2 - 9/4) q [C] $ #cetz.canvas({ import cetz.draw: * import cetz-plot: * plot.plot( size: (10,10), axis-style: "school-book", x-tick-step: none, y-tick-step: none, plot-style: (stroke: 2pt), { plot.add(((0,0),), mark: "o", mark-size: 0.5, mark-style: (stroke: none, fill: red)) plot.add(((1,0),), mark: "o", mark-size: 0.5, mark-style: (stroke: none, fill: red)) plot.add(((0,1),), mark: "o", mark-size: 0.5, mark-style: (stroke: none, fill: blue)) plot.add(((1,1),), mark: "o", mark-size: 0.25, mark-style: (stroke: none, fill: black)) plot.add-anchor("pt", (1,1)) let vec(data) = { plot.add(data, mark: "<>", mark-size: 2) } let calc_e(charge, distance, v) = { let x = (charge / distance) * v.at(0) let y = (charge / distance) * v.at(1) (x,y) } let charges = ( 1, 2, -3, (1/4) * (54 * calc.sqrt(2) - 9) ) let distances = ( 2, 1, 1, 9/2 ) let dir_vectors = ( (1/calc.sqrt(2), 1/calc.sqrt(2)), (0, 1), (1, 0), (1/calc.sqrt(2), 1/calc.sqrt(2)) ) let summed_vector = (0,0) let n = 0 let scale = 0.1 while n < charges.len() { let field = calc_e(charges.at(n), distances.at(n), dir_vectors.at(n)) let temp_x = field.at(0) + summed_vector.at(0) let temp_y = field.at(1) + summed_vector.at(1) summed_vector.at(0) = temp_x summed_vector.at(1) = temp_y n += 1 } vec(((1,1),(1 + scale * summed_vector.at(0), 1 + scale * summed_vector.at(1)))) } ) }) == Exercise 2 === Part a Since the cross-sections of the charge distributions are negligible, we can assume that the charges can be calculated using a line integral: Finding charge 1: $ Q_1 &= integral_cal(l) lambda_1 (arrow(r)) d arrow(r) \ Q_1 &= integral_a^(a+L) lambda_1 (r(t)) |r^(')(t)| d t $ with $r(t) = t dot hat(x) $, $a <= t <= a + L$, $|r^(')(t)| = 1$ $ Q_1 &= integral_(a)^(a+L) lambda_0 (t-a) / L d t \ Q_1 &= lambda_0 / L integral_(a)^(a + L) t - a d t \ Q_1 &= lambda_0 / L [1/2 t^2 - a t]^(a + L)_a \ Q_1 &= lambda_0 / L ((1/2 (a + L)^2 - a^2 - a L) - (1/2 a^2 - a^2)) \ Q_1 &= lambda_0 / L ((1/2 a ^2 + a L + 1/2 L^2 - a^2 - a L - 1/2 a^2 + a^2)) \ Q_1 &= lambda_0 / L (1/2 L^2) = 1/2 lambda_0 L space [C] $ Finding charge 2: $ Q_2 &= integral_cal(l) lambda_2 (arrow(r)) d arrow(r) \ Q_2 &= integral_a^(a+L) lambda_2 (r(t)) |r^(')(t)| d t $ with $r(t) = t dot hat(y)$, $a <= t <= a + L$, $|r^(')(t)| = 1$ $ Q_2 &= integral_(a)^(a+L) Q_0 / t d t \ Q_2 &= Q_0 integral_(a)^(a+L) 1 / t d t \ Q_2 &= Q_0 [ln(t)]^(a+L)_a = Q_0 ln((a + L)/a) \ Q_2 &= Q_0 ln(1 + L/a) space [C] $ === Part b === Part c == Exercise 3 #let sigma_0 = 1 #let p_0 = 1 #let a = 0.5 #let xfunc(u,v) = u*calc.cos(v) #let yfunc(u,v) = u*calc.sin(v) #let zfunc(u,v) = sigma_0*((u - p_0)/(2*a))*calc.sin(v) #let scale-factor = 0.25 #let (xscale, yscale, zscale) = (1, 1, 1) #let scale-dim = (xscale*scale-factor, yscale*scale-factor, zscale*scale-factor) #plot-3d-parametric-surface( xfunc, yfunc, zfunc, xaxis: (0,2), yaxis: (0,2), zaxis: (0,1), subdivisions: 10, scale-dim: scale-dim, udomain: (p_0, p_0 + 2 * a), vdomain: (0, calc.pi / 2), axis-step: (1,1,1), dot-thickness: 0.05em, front-axis-thickness: 0.1em, front-axis-dot-scale: (0.04, 0.04), rear-axis-dot-scale: (0.08, 0.08), axis-label-size: 1.5em, xyz-colors: (red, green, blue), rotation-matrix: ((-2, 2, 4), (0, -1, 0)) )