Electricity & Magnetism
Mathematica Documentation
Mathematica Source Code
Page 1



(circloop)

A circular loop of wire of radius R is centered at the origin in the x-y plane and carries a current I counterclockwise from the x-axis to the y-axis. Perform an integration using the Biot-Savart law to determine the magnetic field components (Bx,By,Bz) at a point (0,0,H) due to half of the loop --- that half of the loop where x is greater than zero.


(csphere)

The electric field between 2 concentric spheres is E=Q/(4pi eo r^2). where Q is the charge on the inner sphere of radius A. Plot the capacitance of these spheres (let the radius of the smaller sphere be 0.25 m) as a function of the radius of the outer sphere. In the limit as this radius goes to infinity this might be called the capacitance of a single sphere. (This is like being asked to put one hand behind your back and clap.) Can you do the same limiting calculation for flat plates or for cylinders? [No, only works for concentric spheres]


(dielcap)

The electric field inside concentric conducting spheres of radius R1 and R2 (R2>R1) is reduced by a factor of 2 when a particular dielectric material fills the entire space between R1 and R2. This means that the potential difference between the spheres is also reduced by a factor of 2, and the capacitance is increased by a factor of 2. (The charge Q on the spheres is kept the same.) When the dielectric doesn't fill the entire space between the spheres, the capacitance is increased by less than a factor of 2.
How thick would a dielectric spherical shell of thickness d, extending from R1 to R1+d have to be in order to increase the capacitance by a factor 1.5? Would this thickness be the same if it extended from R2-d to R2?


(shift)

The electric potential function for a point charge at the origin is known to be V(r)=q/4 pi eo r. Plot this just considering two dimensions, x and y. We want to find V if the charge is not at the origin but at x=.1m and y=.2m. It is claimed that this can be accomplished just by shifting the coordinate system. Verify this by plotting V(x,y) with x replaced by x-.1 and y replaced by y-.2.


(ebfields)

The file 'ebfields' (ebfields.ms or ebfields.ma) contains a general solution of the motion of a particle in constant electric and magnetic fields. For any (Ex, Ey, Ez), (Bx, By, Bz), one can plot the motion of a particle of mass M, charge q and velocity (vx, vy, vz). From this general case, it specializes to the motion of a particle in 'crossed' E and B fields such that the particle travels in a straight line. The particular choices are q =1.61 x 10^-19 C , M = 1.67 x 10^-27 kg , Bz = 0.50 T , and vx = 8.4 x10^6 m/s.
a) Before opening one of these files, figure out what values are needed for (Ex,Ey,Ez) so the particle will travel in a straight line.
b) Now imagine reversing the particle's velocity, and predict what sort of motion it will undergo. (Straight line, motion in a plane, shape of motion etc.) Now make the changes and compare the results to your predictions.
Going Further:
c) Predict what will happen in the crossed fields when a particle is released from rest. Try it out and compare results to your predictions.
d) Given the height H bet_ween the top and bottom limits of the y-motion, what can you say about the velocity of the particle at the top and bottom y-limits of the motion? [v=0 at bottom where it is released. At top the kinetic energy is mvx^2 which is equal to the work done on the particle by Ey, W = qEy H.]


(edipole)

Along the axis of a finite dipole, the electric field points one way in x = -a to +a, and it points the other way outside the charges. Which field produces the greater effect? The one in between is stronger, but it doesn't last very long. To answer this question, we set up a line of dipoles, and integrate along the line of the dipoles, although we do not run right over the top of any individual charge.

Set up a line of 4 dipoles in the y-direction and integrate from x = -a to +a and find out the average electric field. Will it be + or - ?

A line of + charges at (0,1/8), (0,3/8), (0,-1/8), (0,-3/8) and a line of - charges at x = +1/4. This gives 4 dipoles pointing in -x direction, from y = -3/8 to y = +3/8 m. Distance is 1/4 in x and y directions.

Predict the sign of Ex before beginning. [It should be mainly negative outside +/- charges and positive between the charges.] Graph Ex from -2 to 2 and see Ex is negative (mostly) outside dipoles, and large positive between them. Who wins? Integrate Ex from -2 to 2 and see. [Easy way to understand result is that V is positive for x<0 since al + charges are closer, and V is negative for x> 1/4 because all negative charges are closer! ]

STILL UNDER CONSTRUCTION


(envelope)

In AM (amplitude-modulated) radio, the amplitude of a high-frequency signal is modualted by hte lower-frequency audio information. AM radios use 'envelope detectors' involving RC circuits in order to remove the high-frequency (the 'carrier wave') and leave the audio signal.
This problem gives you a simple modulated signal. It also gives you the 'rectified' signal we would see after passing through a diode (which lets current flow in one direction only).
You are to pass the signal through a series RC circuit, first through a resistor R and then a capacitor C to ground. The 'envelope' signal is to be the voltage across the capacitor.
Letting v be the incoming signal, the equation to be solved is V - I*R - q/C = 0.
You must replace the current I by a function of q, the charge on the capacitor. This (call it eq1) will be the generic equation to be solved for q, the charge on the capacitor as a function of time. By substituting values of R and C into eq1, you get eq2. This new equation is to be solved numerically for q (the charge on the capacitor) as a function of time.
a) Get the rectified signal first, by using the Heaviside function. The input signal is

v := Sin[96 Pi t] * Sin[12000 Pi t]

b) Set up the differential equation, using q(t) for the charge on the capacitor C. C is connected to ground and to the resistor R. R has the input voltage on one side and C on the other. [The current will be dq/dt]
c) Substitute values into the DE to make the new DE which will be solved numerically. Start off by setting RC equal to 1/10, the period of the 'carrier frequency.'
d) Solve the new DE numerically. Plot and see what the gives you for an envelope function. Compare this to the plot on the modulated function.


(filtrc)

R-C circuits are often used as simple frequency filters in electronic circuits. To see how this works, apply an input voltage of v(t) = A cos (wt) to a series resistor-capacitor (the input voltage is applied at the resistor R and the output voltage is taken at the point where the resistor R and capacitor C join together. One side of the capacitor is connected to the resistor and other side is grounded.). V is the voltage across the capacitor, and q is the charge magnitude on either plate, so q = VC, from the definition of capacitance. The time derivative of this relation is : dq/dt = current = I = C dV/dt.
a) Show that the loop equation for voltage can be written v(t) = RC dV/dt + V
b) Use dsolve to obtain a solution to the second of these equations for V(t).
c) Assume R= 10 k ohms, C = 0.12 microfarads, A = 0.350 V, and w=6328 rad/s. Plot the voltage across the capacitor vs. time. If the voltage amplitude across the capacitor is close to A, then the circuit is 'passing' most of the input voltage through to the output at this frequency.
d) Plot the ratio of the amplitude of the voltage across the capacitor to the input voltage amplitude A from frequencies from 10 rad/sec to 2000 rad/sec.
e) Based on this plot, would you say this filter is a 'high-pass' or a 'low-pass' filter?


(helix)

Use the basic solution in 'ebfields' to create an particle trajectory which is a helix. Let q =1.6x10^-19C, and M = 1.67x10^-27 kg , as before. Change any of (Ex, Ey, Ez), (Bx, By, Bz), or (vx, vy, vz), and create a radius for the helix of R=2.30 m, and a 'pitch' of 0.250 m for each revolution.


(holtplot)

Make a 3D plot of the magnitude of the magnetic field between a pair of helmholtz coils. (See problem 'loopaxis' for the setup of helmholtz coils.) [In parts a) and b) below, try to use the contours of the 3D plot to help you answer the questions.]
a) How far from the center of the coils do we have to go laterally before the field magnitude changes by 10%. Express your answer in terms of the coil radius (0.25 radii, 0.32 coil radii, or whatever).
b) How far from the center do we have to go along the axis before the magnitude of the field changes by 10%?


(howclose)

A rectangular current loop measures 1.50 m by 0.90 m, and carries a current of 10.5 A. At the mid-point of the long (1.50 m) leg inside the loop, how far would we have to be from the wire so that the magnetic field there would be within 2% of the field we would calculate assuming wire to be infinitely long?


(inductor)

A "real"inductor has inductance (L) and resistance (RL). Suppose this component is connected in parallel with an ideal capacitor (C), as shown above.
a) Find the magnitude of the effective impedience of the combination as a function of the frequency.
b) Find the phase relationship between the voltage across the combination and the current through it.
c) Suppose the combination is connected in series with a pure resistance (R), as shown. A voltage given by:

Vin = Vo Cos(wt)


is applied to the entire circuit. Find Vout(t), the voltage across the parallel combination.
d) Let Vo = 5, L = 3 mH, C = 10 uF, RL = 3 ohms, R = 1000 ohms. Plot the magnitude of the frequency response of the circuit for f = 0 Hz to 2000 Hz.

STILL UNDER CONSTRUCTION


(inkdrop)

An ink drop of radius 0.028 mm (density = 1000 kg/m^3) is travelling at a speed of 90 m/s. It passes through deflecting plates which are 8 mm long and separated by 1.5 mm. We assume the print head slews horizontally across the page. Since the drops must be able to cover the whole field of a single character in the vertical direction, they must be able to be deflected at least 0.5 mm up or down. The voltage difference across the deflecting plates is 2200 V.
a) Find the electric field E between the deflecting plates in V/m.
b) Determine the charge Q which must be on a drop in order to deflect it by 0.50 mm by the time it has reached the edge of the deflecting plates. [Sanity-check your answer by noting that the smallest charge which can be applied is 1.6 x 10^-19C ].
c) The width of the deflecting plate is 6 mm. Determine the total charge on the deflecting plate in order create the potential difference of 2200 V and the electric field E. [Assume the charge on each deflecting plate is uniformly distributed over the plate. Note: the total charge on the plate shoud be much larger than the charge on the drop going through the plates if the drop is not to change the field.]
Going Further:
d) Estimate the time needed to print a single page with this printer, figuring that around 100 drops are needed per character. [Ans: Time/drop from vel and length of deflecting plates is about 10^-4sec, there are about 2400 chars/page, about 20 seconds per page.]


(lineint)

In a region where the elecrtric field is (i 3.4 x10^3 + j 2.13) N/C, determine the potential difference between the points (1.0,1.5) m and ((0.5, 2.5) m:
a) By taking the dotproduct of the electric field vector and the the vector from P1 to P2.
b) By integrating along the vector from P1 to P2.
c) By first integrating in the x direction and then in the y direction


(loops)

Axial magnetic fields from 1, 2, and several loops of current-carrying wire.
a) Use the starter material and evaluate the formula at the center of the loop. b) Make a function f1, where you substitute i = 1 amp and mu = 4 Pi * 10^(-7). Put the coil center at z = 0, give it a radius of 1 m, and plot f1 from z = 0 to z = 4.
c) At the coil center the slope of Bz is zero and again at z = infinity. Locate the value of z where the slope magnitude is a maximum. [Hint: what does this have to do with the second derivative of the function?]
d) Put a second coil at z = 1.2 m and plot Bz for the pair of coils.
e) Evaluate the 1st and 3rd derivatives of the B field halfway between the two coils.
f) Use a loop to create a 'loose' solenoid of 5 coils. Plot axial magnetic field (should have some wiggles in it.)
g) Estimate the area under the graph of B along the axis by using a rectangle.


(loopaxis)

Consider a current loop of radius R carrying a current I, located in the xy plane, with the current counter-clockwise from the x-axis to the y-axis.
a) Use the Biot-Savart law to show that the z component of the magnetic field at a point (0,0,z) on the axis of the loop is given by B_z = (u_o I /2) R^2/(z^2+R^2)^(3/2). (You may wish to modify your work on the circloop problem).
b) Find the value of z for where the dB_z/dz is a maximum or a minimum. (This means that the second derivative of B_z is zero.) Call this value z_o.
c) Now locate an identical coil at a distance of 2 z_o from the first, and write down the total magnetic field as a function of z for the two coils. (Note: coils like this are referred to as 'helmholtz coils'.)
d) Show that the first three derivatives of B_z will vanish at z=z_o for the pair of coils.


(mmvplot)

(a) Create a three dimensional contour plot of the electric potential due to three point charges each with magnitude 2.00 µC located at positions (-0.50 m, 0), (+0.50 m, 0), and (0,+0.75 m). The first two charges are positive, the third is negative.
(b) Visually locate any points where a fourth positive test charge would be in equilibrium. State whether the equilibrium is stable or unstable.
(c) Find the magnitude of the potential at (0, 0.50 m).
(d) Calculate the electric field and find where its x and y components are both zero.



Go to the next Electricity and Magetism Mathematica Page
Back to the Electricity and Magnetism Resource Page