2. General Physics

Setup

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

Get["D:\Mma\Inits\ch1init.m"]

Get["D:\Mma\Inits\ch2init.m"]

2.3 Mathematica Commands

2.3.2  User-defined procedures

Example 1:  Slope of a Straight Line

leastSquares[{{0, 0}, {1, 2}, {2, 4}, {3, 6}}, a x, x, {a, 1/2}]

Example2:  An Exponential

leastSquares[{{0, 1}, {1, 10}, {2, 10^2}, {3, 10^3}}, E^(a x), 
      x, {a, 1/2}]

Example 3:  Dipole

\(dipole\  = \ 
      \((monopole[\(+q\), {0, 0, \(+d\)/2}]

          \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  + 
          monopole[\(-q\), {0, 0, \(-d\)/2}]\ )\)\)