If you put a positive test charge at the center of this cube of charges, could it be in stable equilibrium?
Consider a function f(x) that is both continuous and continuously differentiable over some domain. Given a step size of a, which could be an approximate derivative of this function somewhere in that domain? df/dx≈
If we choose to use:
dfdx≈f(xi+a)−f(xi)a
Where are we computing the approximate derivative?
Taking the second derivative of f(x) discretely is as simple as applying the discrete definition of the derivative,
f″
Derive the second derivative in terms of f.
To investigate the convergence, we must compare the estimate of V before and after each calculation. For our 1D relaxation code, V will be a 1D array. For the kth estimate, we can compare V_k against its previous value by simply taking the difference.
Store this in a variable called err
. What is the type for err
?