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

  MAPLE text and input lines  


circloop.mws

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

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.

Solution

Download circloop.mws [Use 'File Save']


csphere.mws

PHYSICS RESOURCE PACKETS PROJECT            File: CSPHERE.MWS
Rose-Hulman Institute of Technology         Authors: Perry Peters & Greg Williby
http://www.rose-hulman.edu/~moloney         Software: Maple V Release 4
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 clapping with one hand behind your back.)

Can you do the same limiting calculation for flat plates or for cylinders?

[No, only works for concentric spheres]


Solution

The capacitance of these two spheres is C=q/dV, where dV is the change in potential of the two spheres. Find dV by integrating E.

Plot the capacitance as a function of the radius of the outer sphere. In order to do this, Eo and R1 must be defined.

Download csphere.mws [Use 'File Save']


dielcap.mws

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

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.

a) 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?

b) Would this thickness be the same if it extended from R2-d to R2?

Part A: Determine kappa

Determine k by using the relationship the E=Eo/kappa.

Part B: Determine the dielectric's thickness

V is the difference in potential between the two conducting spheres. V can be expressed in terms of a constant, Q, R1 and R2 by the following formula:

When a dielectric is added, the potential difference becomes:

Find the potential between the two spheres again, but this time divide the potential by kappa for r=R1..R1+d, and then add on the regular potential from r=R1+d..R2.

Now solve for the thickness of the dielectric (d) that causes the capacitance to increase by a factor of 1.5.

Substitute in the value of kappa obtained in Part A.

Perform a sanity check. If R1 was 1 and R2 was 2, then d should be between 0 and 1.

Part C

Now find out what the result would be if the dielectric extended from R2-d to R2.

Use the regular potential for r=R1..R2-d, and then divide by kappa for r=R2-d..R2.

Now solve for the thickness of the dielectric (d) that causes the capacitance to increase by a factor of 1.5.

Substitute in the value of kappa obtained in Part A.

Perform a sanity check. If R1 was 1 and R2 was 2, then d should be between 0 and 1.

(The thickness of the dielectric is seen to be dependent on where it is placed between the two spheres. )

Download dielcap.mws [Use 'File Save']


ebfields.mws

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

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 ofthe 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.]

Execute all the cells in this notebook until you get to the problem input section.

Tell maple that all of the components are real to ease the calculations.

Define vectors for general solution

Define Equations

Biot-Savart law

Initial acceleration of the particle

Split up force vector into its three components.

Solve the three equations for the vx(t), vy(t), and vz(t), and tell maple the initial conditions.

Also simplify the output. This will take a moment.

Now collect like terms.

This will put the solution in the form: A*t + B*sin(theta) + C*cos(theta) + D

General solution to the problem:

************** INPUT SECTION FOR PROBLEM****************

Now substitute in values the problem. Values may be changed as desired. Values in this section can be changed over and over again without executing the top part of the notebook again. Vectors are in x,y,z component form. Execute all cells between this and the next input section.

************************************************************

Substitute in above values into the general solution.

Change to floating point format.

Integrate the xyz velocity components to find the position.

Evaluate the integrals

Location on graph where particle is at t=0.

************* INPUT SECTION FOR GRAPHICAL OUTPUT *************

Values in this section may be repeatedly changed without executing the upper cells again. The three scalar variables control how large the E, B, and velocity vectors will be drawn on the graph. If too large a value is used, the vector will dominate the plot and the path of the particle will be too small to see. If too small a value is used, the vector will be too small to tell its direction.

The path of the particle is plotted from t=0 to the time entered for tmax. If the output on the graph looks like "star" patterns, the value of tmax is probably too large. If the output looks like a straight or nearly straight line, tmax is probably too small. Execute the remaining cells in this notebook to get the solution.

*******************************************************************

Generates the curve for the path of the particle and the field & velocity vectors.

Locate the position for the end of each vector.

Draws letters identifying each vector.

Display everything on the same graph.

Download ebfields.mws [Use 'File Save']


edipole.mws

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

Along the axis of a finite dipole, the electric field points one way in the region between the two charges, 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, f rom 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 all + chargesare closer, and V is negative for x> 1/4 because all negative charges are closer !}

Integral of Ex is positive; stronger positive part in middle wins; Dipoles like these would be created (or aligned)by an electric field pointing in the -x direction, so the field of the dipoles opposes the field that created it. This means in capacitors when dipoles are present in the dielectric, the electric field is smaller in magnitude than without the dielectric. Smaller electric field means smaller potential difference, which (for the same charges on the plates) a larger capacitance.

Yes, but what if we make the dipole distances tiny? (substitute a=1/100 instead of 1/4)

Nope, smaller, but still positive. Dipole field always opposes applied field.

Final note: - integral of Ex dx = V(2) - V(1). Since {integral Ex dx} is positive, V(1) > V(2). The potential at the start is higher than the potential at the end. This is because all + charges are closer to the start point than the - charges.

Download edipole.mws [Use 'File Save']


envelope.mws

PHYSICS RESOURCE PACKETS PROJECT            File: ENVELOPE.MWS
Rose-Hulman Institute of Technology         Author: mjm
http://www.rose-hulman.edu/~moloney         Software: Maple V Release 4

In AM (amplitude-modulated) radio, the amplitude of a high-frequency signal is modulated by the 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 -IR -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

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 a 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 (use odeplot) and see what this gives you for an envelope function Compare this to the plot of the modulated function.

From here on down, the students should be doing the work.

RC is 0.45 ms. carrier pd= 0.17 ms. modulation pd .= 20 ms.

Note that we don't get all of the signal back, nor is the shape a perfect fit to the envelope.

Download envelope.mws [Use 'File Save']


filtrc.mws

PHYSICS RESOURCE PACKETS PROJECT            File: FILTRC.MWS
Rose-Hulman Institute of Technology         Authors: Perry Peters & Greg Williby
http://www.rose-hulman.edu/~moloney         Software: Maple V Release 4
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?

Part A

Part B

Part C

Part D

Part F

The circuit is acting like a low pass filter. Now solve the problem in the S domain.

Find the amplitude of the output using the values for R and C given in the problem.

Solutions are the same.

Download filtrc.mws [Use 'File Save']


helix.mws

PHYSICS RESOURCE PACKETS PROJECT            File: HELIX.MWS
Rose-Hulman Institute of Technology         Authors: Perry Peters & Greg Williby
http://www.rose-hulman.edu/~moloney         Software: Maple V Release 4
Use the basic solution in 'ebfields' to find the conditions which will give a particle trajectory which is a helix.
Download ebfields.mws [Use 'File Save']


holtplot.mws

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

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%?

Evaluate the integrals using Simpson's method. ":" supresses the output.

Plot the B field in the xz plane.

Animate the same function as in the 3d plot to "walk" through the shape above. Notice how little the field in the middle changes.

Find the field at the center of the two coils.

Plot the area in the xz plane that has a magnetic field within 10% of the center.

Part A

Find lateral distance for field to change by 10% Since R=1, answer is in radii.

Part B

Find distance along z axis for field to change by 10%

Subtract 1/2 from this answer to measure the distance from the center. Again, the answer is in radii

Download holtplot.mws [Use 'File Save']


howclose.mws

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

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?

B field at distance y from the top horizontal 1.5m segment:

B field for the right vertical 0.9m segment:

For a long wire, the magnetic field at a distance y from the wire is:

Find y where the magnetic field from the loop is within 2% of the magnetic field from a "long" wire at the same distance y.

Solve the above equation for the distance. (about 1.1 cm)

Download howclose.mws [Use 'File Save']


inductor.mws

PHYSICS RESOURCE PACKETS PROJECT            File: INDUCTOR.MWS
Rose-Hulman Institute of Technology         Authors: Perry Peters & Greg Williby
http://www.rose-hulman.edu/~moloney         Software: Maple V Release 4
A "real" inductor has inductance, L, and resistance, R. Suppose this component is connected in parallel with an ideal capacitor, C as shown.

(a) Find the magnitude of the effective impedance 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=V0 cos(wt) is applied to the entire circuit. Find Vout(t), the voltage across the parallel combination.

(d) Let V0=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.

Solution:

Part A

capacitor impediance

inductor impediance

resistor impediance

impediance of the combination of elements

magnitue of the impediance

Part B

Convert the complex impediance into polar form.

The first term is the magnitude, and the second term is the angle in radians.

Evaluate the phase angle of the impediance.

Simplify the result. Since Z=V/I, "angle" = (angle of V phasor) - (angle of I phasor)

Part C

Input voltage in phasor form

Use voltage division to find the output voltage

Find the phase angle of the output voltage.

Simplify the result.

Find Vout as a function of time.

Part D

Find the magnitude of the frequency responce.

Download inductor.mws [Use 'File Save']


inkdrop.mws

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

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

Part A: The E field

Part B: Particle's Charge

Calculate the particle's mass. Density equals mass over volume, so mass equals density times volume.

Now substitue in the given values, assuming the inkdrop to be a sphere.

Now calculate the particle's acceleration. The following kinematic formula can be used:

xo and yo are both 0 because the ink drop has no initial motion in the vertical direction. x is the distance the particle is to be deflected (0.0005 m), and t is the time it takes for the drop to travel through the plates (0.008m/(90m/s)). Substituting in these values gives:

Setting the two force equations (F=q*E and F=m*a) equal to each other gives:

Part C: Total charge on the plate

By using Gauss's Law, the total charge on the plate can be calculated.

Now substitute in known values.

Note that the charge on the plate is larger than the charge on the particle by a factor of about 100.

Download inkdrop.mws [Use 'File Save']


lineint.mws

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

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 P1=(1.0,1.5) m and P2=(0.5, 2.5) m:

a) by taking the dot product of the electric field vector, and 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.

Part A

Since the electric field is a constant, the potential difference is simply -Es

Part B

The solution can also be found by finding ds and then integrating.

Part C

Another way to solve the problem is to first integrate in the x direction, and then in the y.

Define fields in the x and y directions.

The potential difference between P1 and P2 is the sum of the change in potentials along the two paths.

Download lineint.mws [Use 'File Save']


loops.mws

PHYSICS RESOURCE PACKETS PROJECT            File: LOOPS.MWS
Rose-Hulman Institute of Technology         Author: mjm
http://www.rose-hulman.edu/~moloney         Software: Maple V Release 4

Axial magnetic fields from one, two,and five loops

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 x 10^(-7). Put the coil center at z=2 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=3.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.

f = Bz @(0,0,z) from loop centered @ z=c, radius R. (factor of mu_o I/4pi left off) This is our basic building block.

solution gives two answers for where Bz is zero for a single loop, half a radius away from loop center to either side

This plot is intentionally wiggly; not a very good solenoid. An estimation exercise would be to guesstimate the area under the curve by means of a a rectangle By eyeball, try 6.1 height from 0.0 to 0.85

Here's a rectangle with a height of 6.2 and going from 0.01 to 0.85 . Then we'll plot it with the g function [it needs capitals on Heaviside!! (I found out the hard way)]

Download loops.mws [Use 'File Save']

Go to the next Electricity and Magetism Maple Page


Back to the Electricity and Magnetism Resource Page