$$\require{cancel}$$

# 1.17: Frequently-needed Numerical Procedures

[ "article:topic", "authorname:tatumj" ]

Solve cubic equation
Solve quintic equation
Solve $$f(x) = 0$$ by Newton-Raphson
Solve $$f(x , y) = 0 \ , \ g(x , y) = 0$$ by Newton-Raphson
Tabulate $$y = f(x)$$
Tabulate $$y = f(x , a)$$
Fit least-squares straight line to data
Fit least-squares cubic equation to data
Solve two simultaneous linear equations
Solve three simultaneous linear equations
Solve four simultaneous linear equations
Solve $$N (>4)$$ simultaneous linear equations in two, three or four unknowns by least squares
Multiply column vector by square matrix
Invert matrix
Diagonalize matrix
Find eigenvectors and eigenvalues of matrix
Test matrix for orthogonality
Evaluate determinant
Convert between rectangular and polar coordinates
Convert between rectangular and spherical coordinates
Convert between direction cosines and Euler angles
Fit a conic section to five points
Numerical integration by Simpson’s rule
Given any three elements of a plane triangle, calculate the remaining elements
Given any three elements of a spherical triangle, calculate the remaining elements

In addition to these common procedures, there are many others that I have written and have readily to hand that are of more specialized use tailored to my own particular interests, such as

Solve Kepler’s equation
Convert between wavelength and wavenumber
Calculate $$LS$$-coupling line strengths
Convert between relativity factors such as $$\gamma = 1/\sqrt{1-\beta^2}$$

Likewise, you will be able to think of many formulas special to your own interests that you use over and over again, and it would be worth your while to write short little programs for them.