The Yukawa potential between two particles separated by is V(r)=A
PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Computational Physics · Scientific programming for physicists
Scientific Computing for Physicists, Ch Letting the computer do advanced algebra: operators, series and differentiated programs
Problem
The Yukawa potential between two particles separated by r>0 is V(r)=Are−r/λ, with A a positive energy-length constant and λ a positive screening length. A symbolic derivative gives the force magnitude F(r)=−drdV=Ae−r/λ(λr1+r21), from which a numerical function is generated (e.g. by lambdify) and then evaluated at randomly chosen values of r as a test against an independently hand-derived formula.
((a)) Evaluate the generated function at r=1.2nm for A=2.0eVnm, λ=0.5nm, giving your answer to four significant figures.
((b)) Given binary64 arithmetic with ϵmach=2−52≈2.2×10−16, state the order of relative agreement expected between this generated function and an independently hand-derived evaluation of the same formula at the same point, and explain briefly why a single hand-chosen test point such as this one is not sufficient on its own to certify the generated function.