I have been messing around with Lienard-Wiechert potentials and am having some trouble properly expressing my retarded time function. As of this moment the function looks like so

tr[r_, t_] = t - Norm[r - rs[t]]/c 

where rs is the position of the source charge and r is the position of the field point. Since we are dealing with retarded fields however, the position of the source charge should be taken at the retarded time tr. Problem is, that would mean I'd have rs[tr] in the function for tr, which ends up being recursive, I think. How do I solve for tr then? Does it require that I use RSolve or Solve, and if so what's the right way of doing that?

  • $\begingroup$ Why as of the moment function looks like tr[r_, t_] = t - Norm[r - rs[t]]/c? This is wrong equation, therefore your question also is wrong. Please, ask direct question about solution of retarded time equation in a form of tr==t-Norm[r-rs[tr]]/c vs r={x,y,z} and rs[tr_]:={xs[tr],ys[tr],zs[tr} for given functions xs, ys, zs. $\endgroup$ Oct 12, 2023 at 3:48

1 Answer 1


Retarded time in general case defined as solution of equation $t_r=t-|\vec{r}-\vec{r_b}(t_r)|/c$, where $r=(x,y,z), r_b(t)=(x_b(t),y_b(t),z_b(t))$. The code to compute $t_r=t_r(t,x,y,z)$ is given by (here $c=1$)

R1 = {x, y, z};
R2 = {xb[t], yb[t], zb[t]};
    R = R1 - R2;
tr[t_?NumericQ, x_?NumericQ, y_?NumericQ, z_?NumericQ] := 
  r /. FindRoot[
    r == t - Sqrt[(x - xb[r])^2 + (y - yb[r])^2 + (z - zb[r])^2], {r, 
     t - Sqrt[(x - xb[t])^2 + (y - yb[t])^2 + (z - zb[t])^2]}];

Example of usage for a charge moving along x axis with a speed defined as follows

v0 = .99;
        xb[t_] := v0*Tanh[t];
        yb[t_] := 0.;
        zb[t_] := 0.;

Plot3D[tr[t, x, 0, 0], {t, -1, 1}, {x, -1, 1}, PlotPoints -> 25, 
 MaxRecursion -> 2, MeshStyle -> White, ColorFunction -> "Rainbow", 
 PlotTheme -> "Scientific", AxesLabel -> Automatic]

Figure 1
Using tr we can compute electric and magnetic field

Vt = D[R2, t, t];
    V0 = D[R2, t];  
    Ev = ((1 - V0 . V0)*(R - V0*Norm[R]) + 
              Cross[R, Cross[(R - V0*Norm[R]), Vt]])/(Norm[R] - R . V0)^3 /. 
           t -> tr[t, x, y, z];B = Cross[R, Ev]/Norm[R];


 Drop[B, 1] /. {x -> 1, t -> -.25}, {y, -1, 1}, {z, -1, 1}, 
 ColorFunction -> Hue, PlotLegends -> Automatic]

Figure 2

  • $\begingroup$ Wow, thank you so much for the detailed help! I am taking the time to fully parse exactly what you did. You used NumericQ so that tr will only be evaluated when the arguments [t, x, y, z] are numeric, yes? And then FindRoot finds a solution to the equation r == t - Sqrt[(x - xb[r])^2 + (y - yb[r])^2 + (z - zb[r])^2] near r = t - Sqrt[(x - xb[t])^2 + (y - yb[t])^2 + (z - zb[t])^2], which is meant to solve the recursive equation for the retarded time whenever r is called? How do you apply it to potentials? I tried doing so but Mathematica just keeps running, it never gets a 3D plot out. $\endgroup$
    – JDRobin
    Oct 12, 2023 at 20:13
  • $\begingroup$ Specifically, after setting Rs = {xs[t], ys[t], zs[t]}, Rp = {x, y, z}, and R = Rp - Rs;, I went through the same steps for writing out the equation for tr. I replaced r with Rp in the functions for the potentials as well as all occurrences of Rp - Rs with R. I then expressed the electric field as LWEField[Rp_, t_] := - LWSgrad@t - LWVdt@t /.t -> tr[t, x, y, z]. I tried to plot the field using VectorPlot3D[Evaluate@LWEField[Rp, t] /.t -> -.25, {x,-1,1}, {y,-1,1}, {z,-1,1}], but Mathematica just kept running and would not produce a plot. I know that's a lot, but any suggestions there? $\endgroup$
    – JDRobin
    Oct 12, 2023 at 20:44
  • $\begingroup$ The field you are trying to plot is singular. So you can't plot this field around y=0&&z=0 in my example. Try for instance VectorPlot3D[Ev /. t -> -.25, {x, -1, 1}, {y, .1, 1}, {z, -1, 1}] . $\endgroup$ Oct 13, 2023 at 3:45
  • $\begingroup$ I apologize, I do not get what you mean by my field being "singular." Are you saying that it has a singularity? How then do I express the fields using time retarded potentials and get them to plot? For my project I am avoiding direct field expressions, so my electric and magnetic field equations need to be dependent on the potentials. $\endgroup$
    – JDRobin
    Oct 13, 2023 at 19:00
  • $\begingroup$ Field of point charge has a singularity. Why for your project field needs to be dependent on potential? $\endgroup$ Oct 14, 2023 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.