This program generates exact data sets for models defined by equations such as
u = f(x, p(1), p(2), ..., p(n)) v = g(x, y, p(1), p(2), ..., p(n)) w = h(x, y, z, p(1), p(2), ..., p(n)) dy/dx = F(x, y, p(1), p(2), ..., p(n))where p(1), p(2), ..., p(n) are parameters.
r = r(theta), [x(t), y(t)], or [x(t), y(t), z(t)],can also be simulated.
You can simply input values for X_start and X_stop if you know in advance the range of x required and also the behaviour of y = f(x). However sometimes, as with differential equations, you will only know y at X_start and y at X_stop, and will want to estimate X_start and X_stop. To use this more advanced option you must supply an interval containing the x value required. For example, you might wish to find an x where the equation y = 1.0 + 2.5x equals 1.5. If you choose A = 0.0 B = 2.0, and say y = 1.5, then the program will refine your guess until the correct value is found for X_start where 1.5 = 1.0 + 2.5(X_start). Similarly, a guess of A = 8.0, B = 12.0 and y = 26.5 leads to a value for X_stop where 26.5 = 1.0 + 2.5(X_stop). Now you can calculate y values for x values linearly or geometrically spaced between X_start and X_stop. The central idea is that you input a y value (say Y_input) together with a guess for two starting values A (below X_required) and B (above X_required), then let the program find a root (say x = X_required) of
F(x) = Y_input - f(X_required) = 0.The program will succeed if
A =< X_required =< B, F(A)*F(B) < 0,and f(x) is a monotonic function of x between A and B.
Success with this root finding is clearly dependent on knowledge of the function behaviour in the neighbourhood of the root, as will be clear from the next diagram. Note that, if your initial guess for A and B is not satisfactory, the program will decrease A and increase B to try an alternative starting range. However, the program will not change the sign of A or B; that is up to you.
f(x) | * * | * | * | * | | | | * | | Y_input | |----------------------* | | | | | * | | | | | | * | | |* * | | | * * | | | | | | --------#--------------#---------------#---------------- A X_required B x (X_below) (X_above) ------> <------