Back to Problems

Electric field Plot

`Approximate the potential and the electric field, on the axis of a possitively charged ring`

H.Tahsiri

```Off[General::spell];
Off[General::spell1];
Pagewidth->70;```

`Clear[Vp,Q,R,k,y]`

1) Find the Electric potential

```Vp[y_]=k Q/Sqrt[y^2+R^2]

k Q
-------------
2    2
Sqrt[R  + y ]```

2) Taylor expand the potential, up to a second order, near the center of the ring

```Vpnear=Series[Vp[y],{y,0,2}]//Normal//Simplify

2    2
k Q (2 R  - y )
---------------
2 3/2
2 (R )```

3) Find the potential far away from the center of the ring

```Vpfar=Series[Vp[y],{y,Infinity,2}]//Normal

k Q
---
y```

4) Find the electric field , by taking the first derivative or the gradient of the potential found in (1)

```Ep=-D[Vp[y],{y,1}]

k Q y
------------
2    2 3/2
(R  + y )```

5) Taylor expand the electric field up to a second order

```Epnear=Series[Ep,{y,0,2}]//Normal

k Q y
-------
2 3/2
(R )```

6) Find the electric field far from the center of the ring ( a point charge approximations)

```Epfar=Series[Ep,{y,Infinity,3}]//Normal

k Q
---
2
y```

7) Plot of the electric field as a function of y ( in blue )

```given={k->1,Q->1,R->1};
Epplot=Plot[Ep/.given,{y,-5,5},PlotRange->{{-5,5},{-.5,.5}},
PlotStyle->{Hue[0.6]},AxesLabel->{"y",""},PlotLabel ->
StyleForm[TraditionalForm["E=(k Q y)/(R^2 + y^2)^(3/2)"],
FontSize -> 12]];```

8) Plot of the electric field as a function of y near y=0 (near field approximation )

```Epnearplot=Plot[Epnear/.given,{y,-5,5},PlotRange->{{-5,5},{-.5,.5}},
PlotStyle->{Hue[0.9]},AxesLabel->{"y",""},PlotLabel ->
StyleForm[TraditionalForm["E=(k Q y)/ R^3 ( E near center )"],
FontSize -> 12]];```

9) Plot of the electric field as a function of y, far from the center ( far field approximations)

```Epfarplot=Plot[Epfar/.given,{y,-5,5},PlotRange->{{-5,5},{-100,100}},
PlotStyle->{Hue[.4]},AxesOrigin->{0,0},
AxesLabel->{"y",""},AxesLabel->{"E","y"},PlotLabel ->
StyleForm[TraditionalForm["E=(k Q)/ y^2,(E far from center)"],
FontSize -> 12]];```

```Epsurfacetopbottom3=SurfaceOfRevolution[Epfar/.given,{y,-8,8},
PlotRange->All,RevolutionAxis->{1,0,0},
Boxed->False,AxesEdge->None,
ViewVertical->{0.,1.,1.},ImageSize->250,PlotLabel ->
StyleForm[TraditionalForm["E=(k Q)/ y^2,( y verses E )"],
FontSize -> 12]];```

10 ) Show all of the plots together

```text=Graphics[{Text["NearField(red)",{4.3,.2}],
Text["FarField(green)",{4.3,.3}],Text["E-Field(blue)",{4.1,.4}]}];

Eplotall=Show[{Epplot,Epnearplot,Epfarplot},PlotLabel-> Electric Field Plots,
PlotRange->{{-5,5},{-.5,.5}},AxesLabel->{"y",""},Epilog->text[[1]],
PlotLabel->"E-Fields"];```

1) E-field plot verses y. (no approximation)

2) E-field plot for a distance near the center of the ring.( a near point approximation )

1) E-field plot for a distace far from the center of the ring.(a point charge approximation)