It's easy to solve such a systems using matrix algebra (evaluating determinants etc.) but sometimes it's more convenient to use Gauss method. The idea is to exclude variables on each step by multiplying the whole equation on some coefficient and then by subtracting this equation from next equation in the system so that the coefficient near some variable to become zero. The resulting system after this operations looks like this:

e*x + f*y + g = 0

i*x + j = 0

Such a system is much more convenient to solve than the initial. Here is the program source for Pascal implementing such a method Gauss.pas.

The most simple system of writing mathematical expressions for computer
is recurrent polish notation. For example, the expression *"(a + b)*(c - d)/sin(e)"* is
written as *"a b + c d - * e sin /"*. You do not need parenthesis in this
system and all the expressions can be simply evaluated using stack structure.
Just push all the variables in stack, and when meet the function or operation,
pop them out, perform the operation and push the result in the stack back.
At the end, pop the result from the stack (if the expression is written correctly, it will be the only element in the stack).

Translating traditional forms of recording of mathematical expressions into RPN is a bit more complicated task. It is also solved using stack, but now it is the stack of mathematical operations. The hierarchy of mathematical operations is this:

- Single functions such as sin, cos etc. and parenthesis
- Multiplying and division
- Adding and subtracting

The idea of method is like this:

- If you meet variable in the initial string, write it directly in the RPN string
- If you meet mathematical operation sign, then pop all operations which have higher priority then push it into the stack
- If you meet opening parenthesis, push it into the stack
- If you meet closing parenthesis, pop everything until you meet opening parenthesis Parenthesis' must not be written in the RPN string.
- When all initial string is already scanned, pop all operations into RPN string

Here is Delphi unit, implementing such a method Calculator.pas.

almost all approximate methods are based on Tailor's series:

Note that sometimes this works only for margined *d*,
and sometimes the best approximation is not achieved with increase of number of iterations.
To find approximation with required error, just compare each next part of the sum with this error

Here is a sample code on evaluating Tailor's series Tailorrw.pas

Note the method to solve systems of any equations. Let the system to be written in the form
*f _{i}(x_{1},x_{2},...,x_{n})=0, i=1..n*.
Then, using linear approximation, let's find each next

In case of one-dimensional function it has such a simple meaning:

- - To model 2D-waves on liquid surfaces (resisting forces is also taken into account).
- - To model one-dimensional solitons on liquid surfaces
- - To model one-dimensional solitons in plasma, on liquid surfaces etc.
- - To model non-stable temperature fields
- - Schredinger's equation to evaluate distribution of possibilities in quantum system.
- - Van-der-Pohl equation for modelling radiowave generator

Both interference and golography as the application of interference
require only adding big number of harmonic fields (all with one defined frequency, but different phases) and evaluating the resulting
amplitude as . The result is

Here is the sample program source for Delphi Golography.zip

This is only the solving of Newton's (or Einstein's) equation of motion, in the resulting field of all particles. So here is the sample program source for Delphi Motion.zip

using two-dimensional Fourier analysis

Like one-dimensional case, in two-dimensional space Fourier analysis is implemented by such formulae:

Note now we are working with *wave vectors* **k**
and the phase is evaluated as *f= k*r*, where

In this version of popular game you have "mammals" (positive numbers)
and "predators" (negative numbers), it is possible to "feed" them,
note "mammals" and "predators" eat "postive" and "negative" food.
Use keys "up","down","left","right" to move the current postion,
use +/- keys (withou Shift) to set new postive/negative "beings",
use "0" and "9" keys to set food areas (positive/negative).
Press Esc to start evolution!

Here is also the "Life" games in 3D-space and on the surface of torus -
note that it is a topologically merged continuum!

Here is the sample program source for Pascal Life.pas

The other samples is for Delphi and OpenGL under Delphi: Life3D.zip LifeTor.zip

Compiled programs: LifeTor.exe

Less square method is a simple and quick method to obtain unknown parameters in functional dependances and
to estimate uncertainity of this parameters.
Let the expected dependance to be *y = f(x)*,
and we have obtained the set of measured values *(x _{i}, f(x_{i}))*.
Then the resulting error can be estimated as a sum of squared deviations from theoretically expected dependance: (x

If b parameter is equal to zero, then:

Such a method can be applied to any functional dependances. For example, the following problem evolved while discovering the properties of fractal structures (see Percolation theory). Results of experiments are boolean values

The error for some

To minimize it, we will consider

After some iterations an uncertainity "

Program sources for general case and for case of direct proportional dependance
LSM.pas LSM1.pas

Compiled programs
LSM.exe LSM1.exe

Functions are often defined implicitly by integrals:

*g(a) = *т^{b1}_{b2}* f(x,a)dx*

Here both *b1* and *b2* can tend to infinity, or the function *f(x,a)* itself
can tend to infinity at some points between *b1* and *b2*.
Approximate calculation of define integral is not the fastest way to calculate
the implicit function. Moreover, this way is often useless when the limits of integral *b1*
and *b2* tend to infinity. So what is to be done? Using series expansion and integration
of all the terms in the series analytically is quite a convenient method.
The simplest possible series are Tailor's series or Fourier series.
But there is a small disadvantage: Tailor's series can not be used for integration
when the limits of integral tend to infinity. But remember that negative
degrees of *x* or any other function, which is integrable at infinity, can be also used for series expansion. That is:

*f(x) = a _{2}/x^{2} + a_{3}/x^{3} ...* or:

and so on. Coefficients

where

т

You just have to summarize all the terms of obtained series with required precision. It is very important that series expansion in terms of negative degrees of

Beta-function is defined as:

Gamma-function is defined as:

The procedure which returns coefficients for Tailor series of

Сайт создан в системе uCoz