5. Lagrangians and Hamiltonians

Legal Notice, Disclaimer, and Book Ordering Information:

Null

Setup

\(Clear["Global`*"]; 
Off[General::spell]; 
Off[General::spell1]; 
    \)

Needs["Calculus`VectorAnalysis`"]

Needs["Graphics`PlotField`"]

Needs["Graphics`PlotField3D`"]

<< "D:\Mma\Inits\ch5init.m"

Clear["Global`*"];

5.2 Problems

5.2.1  Point Charges, Multipoles, and Image Problems

Problem 4:  Line Charge and a Grounded Plane

The potential of a single charged line parallel to the z-axis and located at x=x0 and y=y0 is:
V[x,y]=-λLog[(x-x0)^2 + (y-y0)^2], where λ is the charge per unit length.  Consider such a line of charge located a distance y0 above an infinite plane grounded conductor in the {x,z} plane

Part (a)   Find the potential and plot the equipotential surfaces in the plane of symmetry.  Show that the Laplacian of the potential is zero.

\(pot0 = \ 
      \(-\((\(+λ\))\)\)\ Log[x^2\  + \ \((y - \((\(+y0\))\))\)^2]

        	\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  - 
        \((\(-λ\))\)\ Log[x^2\  + \ \((y - \((\(-y0\))\))\)^2]\)

potential = 
      pot0 //. {a_.  Log[b_] - a_.  Log[c_] :>  a Log[b/c]}

potential /. {y -> 0}

vals = {λ -> 1, y0 -> 1}

VEPlot[(potential //. vals), {x, -1, 1}, {y, 0, 2.1}];

Laplacian[potential, Cartesian[x, y, z]] // Together

Part (b)   Find the induced charge.  Plot the induced charge density on the plane.

charge = -1/(4 π)  D[potential, y] /. {y -> 0}

\(\(ContourPlot[charge /. vals // Evaluate

      	, {x, \(-2\), 2}, {y, \(-2\), 2}
, ContourSmoothing -> Automatic]; 
    \)\)

\(\(ContourPlot[charge /. vals // Evaluate

      	, {x, \(-2\), 2}, {y, \(-2\), 2}
	, ColorFunction -> Hue
	, 
      ContourLines -> False
, ContourSmoothing -> Automatic]; \)\)

Part (c)  Show that integrating over the charge density gives a charge per unit length that equals the image charge per unit length.

\(Integrate[charge, {x, \(-Infinity\), Infinity}
, 
        GenerateConditions\  -> \ False] // PowerExpand\)

Part (d)   Find the electric field and use PlotVectorField to plot the electric field lines.

eField = -Grad[potential, Cartesian[x, y, z]] // Simplify

\(\(PlotVectorField[eField[\([{1, 2}]\)] //. vals

      	, {x, \(-5\), 5}, {y, 0, 3}
\ \ , PlotPoints -> 16
	, 
      ColorFunction -> Hue
	, 
      Graphics`Common`GraphicsCommon`ScaleFunction -> \((1&)\)]; \)\)