Electricity and Magnetism (comments to: moloney@nextwork.rose-hulman.edu)        

  MAPLE text and input lines  


loopaxis.ms

PHYSICS RESOURCE PACKETS PROJECT File: LOOPAXIS.MS Rose-Hulman Institute of Technology
Authors: Perry Peters & Greg Williby http://www.rose-hulman.edu/~moloney Software: Maple V Release 3

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.

Part A

Part B

Take the second derivative of B_z to find where the first derivative of B_z has maxes and mins.

Part C

Part D

Take the first, second, and third derivatives of B_z_tot.


mmvplot.ms

PHYSICS RESOURCE PACKETS PROJECT File: MMVPLOT.MS Rose-Hulman Institute of Technology
Authors: mjm after potplot 2/23/96 http://www.rose-hulman.edu/~moloney Software: Maple V Release 3

(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.

Part A

Potential due 3 charges; note subtraction to make 3rd charge negative

Part C

Part D

Part D and Part E take a long time - watch out.

Since dV = -Ex dx -Ey dy, when dy=0 [no change in y], Ex = -dV/dx

and when dx=0 [no change in x], Ey = -dV/dy

Part E Find where E field is zero (this takes some time to execute).


mower.ms

PHYSICS RESOURCE PACKETS PROJECT File: MOWER.MS Rose-Hulman Institute of Technology
Authors: Perry Peters & Greg Williby http://www.rose-hulman.edu/~moloney Software: Maple V Release 3

rev 7/11/96 A small magnet may be treated as a single magnetic dipole, of dipole moment M. If the dipole points in the +z direction, its magnetic field will be given by (r is the coordinate perpendicular to the z-axis)

Bz = (uo/4pi)M(-r^2+2z^2)/[(r^2+z^2)^(5/2)] (parallel to the magnetic dipole direction)

Br = (uo/4pi)M(3 r z)/(r^2+z^2)^(5/2) (perpendicular to the magnetic dipole direction)

Many outboard motors and lawnmowers use rotating magnets passing by coils to create a high voltage for a spark. Instead of having a magnet pass by a coil, we will have a coil pass by a magnet, in order to illustrate the generation of emf. Let the magnet be located at the origin of coordinates, and pointing in the +z direction. We will have the coil traveling with velocity V in the r direction (perpendicular to the z-axis) so that it passes within a distance b of the magnet. The plane of the coil is perpendicular to the z-axis. The coil area A is so small that we may take the magnetic flux through the coil to be the scalar product of the coil area A and the magnetic field. The coil is supposed to be at z=b and y=0 at t=0, so the coordinates of the coil are (z=b, r = Vt).

a) Calculate the magnetic flux through the coil as a function of time t.

b) Calculate the induced emf through the coil (assuming N turns in the coil)

c) Assume M = 2500 A-m^2, V = 120 m/s, and N=2000, b = 5 mm, and a loop area of 0.001 m^2, and plot the induced emf in the coil as a function of t; also plot the magnetic flux in the coil as a function of t.

Part A

Enter in equations for the magnetic dipole field.

Substitute in values for the constants so that a field plot can be done. Some numeric value must be put in for Pi for dfieldplot to work.

Fieldplot us usually used for plotting the vector fields of algebraic expressions, but dfieldplot is used in this case because is converts all the vectors to unit vectors.

Part B

Part C

Substitute in values into the Fluxt and Emf equations.


noiserc.ms

PHYSICS RESOURCE PACKETS PROJECT File: NOISERC.MS Rose-Hulman Institute of Technology
Authors: Perry Peters & Greg Williby http://www.rose-hulman.edu/~moloney Software: Maple V Release 3

We have a signal of interest at 2000 hz, whose amplitude is 100 mV, and an equal, unwanted signal at 60 hz (amplitude 100 mV). You are to build a RC filter to get rid of as much 60 hz as possible, and still leave at least 25 mV of usable signal at 2000 Hz. (The input voltage is applied at the capacitor C and the output voltage is taken at the point where the resistor R and capacitor C join together. One side of the resistor is connected to the capacitor and the other side is grounded.) Consider R values in the range 100 ohms to 5000 ohms, and capacitance values from 0.01 microfarads to 0.5 microfarads.

a) Use dsolve to obtain the amplitude A(60) of the 60hz signal at the output of your filter for an arbitrary R and C value.

b) Use dsolve to obtain the amplitude A(2000) of the 2000 hz signal at the output of your filter for an arbitrary R and C.

c) In the formulas of parts a) and b), do R and C occur separately, or do they occur together? Will separate values of R and C be important, or will a combined value do?

d) Make a 3D plot of A(2000) vs R and C in the range given above.

e) Make a 3D plot of A(60) vs R and C in the range given above. f) Determine what R and C are needed to give at least a 25 mV signal, with as little noise as possible.

Parts A & B

Substitute the input voltages given in the problem for Vin(t)

Solve the differential equations for Vout(t) using initial conditions.

The exponential terms drop out as time goes to infinity. Substitute in 0 for the exponential terms to get the steady state response.

Find the maximum values of the two functions.

The non radical term in max60,max2000 is the amplitude of only the cosine term of sub60,sub2000. The radical term of max60,max2000 is the total amplitude of sub60,sub2000.

Part D

Plot the amplitude of the 2000 Hz signal.

Part E

Plot the amplitude of the 60 Hz signal.

Part F

Plot the Signal to Noise ratio.

From the 3D plot we can see that the Signal to Noise ratio is smallest when R and C are smallest. This is also where the output signals of A60 and A2000 are the smallest. We want an output signal as small as allowed (25 mV) so the output signal will have the least noise possible. The relationship between R and C at 25 mV is:

C=evalf(solve(A2000=25/1000,C));

This problem can also be solved in the S domain.

Substitute in values for omege to get the amplitude at 60Hz and 2000Hz.

The S domain solutions are the same as the solutions we get by solving the differential equations.


particle.ms

PHYSICS RESOURCE PACKETS PROJECT File: PARTICLE.MS Rose-Hulman Institute of Technology
Authors: Perry Peters & Greg Williby http://www.rose-hulman.edu/~moloney Software: Maple V Release 3

A rapidly moving particle of mass M and charge Q travels with constant velocity Vin the x-direction. It passes by a stationary particle of mass M' and charge Q'. The mass M' will be taken as not moving appreciably during the time it takes for Q to pass by. The closest distance of approach between the two particles is b. This calculation helps determine the energy loss rate of a fast charged particle in the presence of matter. [Since the particle Q' picks up KE which is inversely proportional to the KE of the fast particle Q, the loss rate for fast particles comes out to be inversely proportional to the fast particle KE, in this approximation (Q' moves very little while Q goes by).]

a) Work out symbolically the net impulse in the y-direction delivered to Q' from Q as it goes by.

For parts b) and c) let M = M' = 1.6 x 10-27 kg, Kinetic energy = 4.1 MeV = 4.1 x 1.6 x10^-13 j, Q = Q' = 1.6x 10^-19C, Kelec = 8.99 x 10^9 N-m^2/C^2.

b) Sum up 100 impulses along the path, from -10 b to +10b.

c) Compare the answers from parts a) and b), and determine the percentage difference. Which one do you think should give the larger answer?

Part A

find net inpulse from t= -infinity to infinity

Part B

Define Constants to solve for a specific case.

Add together 100 y-direction impulses from x=-10b to x=+10b

Find delta t

Solution from summing up the inpulses.

Part C

Solution from integrating along the path.

Find the percent difference between the integral and summing solutions.


potplot.ms

PHYSICS RESOURCE PACKETS PROJECT File: POTPLOT.MS Rose-Hulman Institute of Technology
Authors: Perry Peters & Greg Williby http://www.rose-hulman.edu/~moloney Software: Maple V Release 3

(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 electric field at (0, 0.50 m).

(Going further (optional)) - >) (d) Calculate the electric field by taking the negative gradient of the potential function.

(e) Make a field plot of unit vectors created from E/|E|. f) Make a new vector field by multiplying the unit vector E/|E| by tanh(k*|E|), where k is an adjustable scale constant. Do a 'fieldplot' of this new vector field, with k= 10^5. [You may wish to try some other k values as well.].

Part A

Part C

Part D

Find the electric field by taking the negative gradient of the potential function.

Display x and y components of gvect.

Part E

Part F

Scaling for the tanh command. A larger value will make the output more unit vector like.
Scale the x and y components of the gradient vector.


precip.ms

PHYSICS RESOURCE PACKETS PROJECT File: PRECIP.MS Rose-Hulman Institute of Technology
Authors: Perry Peters & Greg Williby http://www.rose-hulman.edu/~moloney Software: Maple V Release 3

An electrostatic stack precipitator has a radial electric field along its length, provided by a central wire of radius 0.0200 m, charged with a large negative voltage. The outer radius of the stack is a cylindrical grounded conductor of radius 1.20 m. The electric field at the surface of the central wire is 1.2 x 10^6 V/m, pointing radially inward.

a) Determine the total potential difference applied between the central wire and the grounded outer radius.

b) A particle entering at the bottom of the stack has a mass of 1.4 x 10-15 kg, and picks up a charge of -3.44 x 10-14 C at the central wire. The stack gas velocity is such that the particle will take 5.3 s to travel up the stack. Determine if this particle will be collected at the outer radius of the stack before leaving the stack.

Part A: Potential Difference

We know that when r=0.02 m, E=1.2*10^6 V/m. Substitute this into the above equation.

Substitute in the value for lambda. make answer negative because E is pointing in the -r direction.
The electric field of the stack for 0.02<r<1.2 is:

Integrate to find the potential between the central wire and the grounded outer radius.

Part B

Find the radius of the particle.

Pick the positive answer from the solutions.

The particle will be collected at the outer radius before leaving the stack.


rectloop.ms

PHYSICS RESOURCE PACKETS PROJECT File: RECTLOOP.MS Rose-Hulman Institute of Technology
Authors: Perry Peters & Greg Williby http://www.rose-hulman.edu/~moloney Software: Maple V Release 3

A security system has a coil of wire in the shape of a rectangle 1.0 m by 2.0 m. It consists of 500 turns and carries a current of 1 ampere. It may trigger and alarm if the inductance changes when metallic objects change the flux within the loop.

a) Use a 3DPlot to plot the magnetic field in an rectangular region 'interior' to the security coil, 0.8 m by 1.8 m, centered on the larger coil. [This smaller coil has each side parallel to a side of the larger coil and 0.1 m from it.]

b) If we bring a small loop of wire into the 'interior' rectangle, it will change the inductance of the larger loop and may trigger an alarm. What points in the 'interior rectangle' are most sensitive (the greatest flux for a given area of the small loop) and which are least sensitive? [center should be least sensitive, edges most sensitive]

Part A

Theta and phi are the angles made by the wire and lines connecting the wire ends to the point, and d is the perpendicular distance from the wire to the point. By breaking up the rectangle into 4 straight wire segments, the magnetic field inside the loop can be calculated. Put the origin of the coordinate system at the lower left hand corner of the door.

The magnetic field due to the top wire segment is:

The magnetic field due to the right wire segment is:

The magnetic field due to the bottom wire segment is:

The magnetic field due to the left wire segment is:

Define the constants so that a 3D plot can be produced.

Plot the inner region. Note: The units on the B field have been changed from Telsa to Gauss.

Part B

The points on the edge of the rectangle are the most sensitive.


rodcalc.ms

2/23/96 calc V due to a uniformly charged rod

A charged rod with a uniform charge density of 2.0 x 10^(-7) C/m extends from -1m to +1m along x-axis.

a) What will the electric potential look like at a distance of 1000 m from the rod? [like that from a point charge; kq/r = 2700/1000 = 2.7 v]

b) Integrate along the rod to obtain the potential at any point (x,y).

c) Evaluate the potential at x=0, y=1000 and compare to your prediction from part a).

d) Evaluate the potential at x=1000, y=2 and compare to part a).

e) From Ey = -dV/dy, obtain a function for Ey at any point (x,y)

f) How should Ey behave very close (0.001 m) to the center of the rod? [Rod looks infinite; Ey = 2 k lambda / r] g) Evaluate Ey at x=0 and y=1/1000 m. Compare to behavior expected in part f)

[should get 3*900/1000, roughly, or 2.7; acts like point charge, kq/r; same at 1000,0 ]

doesn't seem to like y=0; will put up with y=2.

The two expressions for electric field are extremely close, as we expect them to be.


rodint.ms

PHYSICS RESOURCE PACKETS PROJECT File: RODINT.MS Rose-Hulman Institute of Technology
Authors: Perry Peters & Greg Williby http://www.rose-hulman.edu/~moloney Software: Maple V Release 3

A uniformly charged rod, length L and total charge Q.

a) Find the integral which gives the value of the electric potential at an arbitrary point, a distance h beyond the end of the rod, and a distance y perpendicular to the length of the rod. [Assume that the electric potential at infiinity is zero, as usual.]

b) Make a contour plot of the bar for L= 5.0m, Q = 10 microcoulombs.
Use the option contours = [20000,40000,60000,100000,120000] to generate four contours of electric potential.

Part A

For a continuous charge distribution, the potential at a given point is:

where q is the total charge of the rod and x is the total length of the rod. For a small section of the rod, the charge density is:

Substituting this value into V gives:

r now needs to be expressed in terms of x.

Integrating from 0 to L will give the electric potential at the point.

Part B


shift.ms

PHYSICS RESOURCE PACKETS PROJECT File: SHIFT.MS Rose-Hulman Institute of Technology
Authors: Perry Peters & Greg Williby http://www.rose-hulman.edu/~moloney Software: Maple V Release 3

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.

Use the Pythagorean theorem to get Vr in terms of x and y.

Substitute in values for q and Eo in order to plot the function.

Plot the potential function in the xy plane.

Now shift the coordinate system so that the point charge is now at x=0.1 and y=0.2


threept.ms

E&M Packet Problem ABW solution Potential and field plots of three point charges Learning objectives: Translation of standard 1/r potential to off-origin points Physical intuition regarding potential Identify equilibrium points Relate potential plot and electric field vectors MAPLE: plot3d, grad, fieldplot commands

arbitrary units are used throughout in Coulomb's law

Set plot range; use non-even values to avoid singular points in grids

3d countour plot of potential function

Get electric field from negative gradient of potential

(Note: "-grad(U)" doesn't seem to work, so using "grad(-U)"

Create new vector field of unit vectors E/|E|

Compress dynamic range of E-vector lengths by taking ln(1+|E|)
log is taken twice to put all lengths within range of fieldplot command


trap.ms

PHYSICS RESOURCE PACKETS PROJECT File: trap196.MS Rose-Hulman Institute of Technology
Author: mjm 2/26/96 http://www.rose-hulman.edu/~moloney Software: Maple V Release 3

There is a famous theorem (Earnshaw's theorem) which says in effect that you can't trap a charged particle with a cage made out of only other stationary charges. But it looks like you should be able to build a cage with charges on the 8 corners of a cube, and trap a charge at the center.

The starting material here is the potential on the x-axis due to a charge at (a,b,c)

k:=9e9: q:=1e-7: v:=k*q/sqrt(x-a)^2+b^2+c^2):

a) From this, create a function for electric potential due to 4 charges at x=+1m, and y= +/- 1m, z= +/- 1m

b) Plot this function from x=0 to x=2 to show that the positive voltage peaks around x=1, indicating the particle should not be able to escape that way.

c) Now, put the other half of the cube together, 4 charges all at x=-1m, and again at y=+/-1m, and z= +/-1 m. Then plot the total electric potential from x=-2 to x=+2.

All we need is a minimum in the middle in order to trap the particle at the center. How did we do at defeating Earnshaw's theorem?

create a 'wall' of four charges

Looks promising. A barrier is present at the wall. Now to add the other wall and seal it up.

Oops, adding the other wall did away with the minimum we wanted in the center.


wall.ms

PHYSICS RESOURCE PACKETS PROJECT File: wall.MS Rose-Hulman Institute of Technology
Author: mjm 2/25/96 http://www.rose-hulman.edu/~moloney Software: Maple V Release 3

Sample program

k:=9e9; q:=1e-7; v:=k*q*Heaviside((a-x)^2-1e-6)/((a-x)^2 + b^2 )^(1/2);

V due to charge q at (a,b) in xy plane at point (x,0) on the x-axis. The Heaviside (step) function makes the potential vanish very close (0.001 m) to the charge, where it would otherwise start to blow up. Maple should like this better than blowing up.

Problem statement. Use the 'function' v in the sample program to create a 'wall' of total charge =100 nC along the x-axis to prevent a proton (q= + 1.6e-19C, m=1.67e-27 kg) from penetrating anywhere along a line from x=0 to x=1 m. The proton is confined to the xz plane, and when far away from the origin it is traveling at 6.9x10^5 m/s. Try a single charge at x=1/2 m and see if that fills the bill, then try two charges of 50 nC each at x=1/4, x=3/4 m.

a) If the proton is to be persuaded not to pass anywhere between x=0 and x=1, what must the minimum value be of the electric potential V between x=0 and x=1? [ Hint: the proton PE = qV. You can find the initial KE of the proton.]

b) Predict qualititatively whether the single or pair of charges should do better, or if it will be a tie. {Cutting q in half gives same v at half the distance, so this would suggest a tie, but it ignores the other charge contributing to the potential. We will do better with 2 charges than one [higher minimum potential]}

c) Do a plot v vs x for a single 'barrier' charge of 100 nC at x=1/2 m. Write down the minimum value of v anywhere between x=0 and x=1.

d) Repeat with two 50 nC charges at 1/4 and 3/4 m to see if minimum v is improved. Report the results. [Can leave it to students to think about actually meeting the spec by moving the 2 charges.]

V due to unit particle at (a,b) in xy plane at point (x,0) on the x-axis. The Heaviside (step) function makes the potential vanish very close to the charge, where it would otherwise blow up.

This is a single charge of 100 nC in the center of the 0..1 interval. [Change : to ; in order to see output from this command.] Ditto for next one.

This is the same total charge but 2 charges located at 1/4, 3/4

We see that the two charges produce a higher minimum voltage over the range than one did for the same total charge; this is a higher minimum barrier to the incoming charge. Stopping y values at 4000v gives good look at actual v values.

Still doesn't get to 2500 V. But moving q's farther apart will lower middle and raise the outside to do the trick. Moving the charges around shows that locating them at 1/5, 4/5 gives a higher minimum over 0..1 than at 1/4, 3/4

 Go to the previous Electricity and Magetism Maple Page


Back to the Electricity and Magnetism Resource Page