To come in
Speech therapy portal
  • Presentation on physics on the topic: "Geocentric and Heliocentric Systems of the World"
  • Ready presentation on the topic of Spain by geography
  • Presentation section on the topic Galileo Galile
  • The position of various layers of society at the end of the XIX century
  • The beginning and development of Okrichnina
  • Chemistry lesson "hydrogen sulfide
  • Spline interpolation: an example of building a spline in the Statistica program. Cubic Interpolation Spline Numerical Methods Interpolation Functions Cubic Spline

    Spline interpolation: an example of building a spline in the Statistica program. Cubic Interpolation Spline Numerical Methods Interpolation Functions Cubic Spline

    Let the table of function values \u200b\u200bset y I.in nodes h. 0 < х 1 < ... < х п . Recognition h i \u003d x i - x i -1 , i.= 1, 2, ... , p.

    Spline- Smooth curve passing through the specified points ( x I., y I.), i \u003d.0, 1, ... , p. Interpolation splines lies in the fact that on each segment [ x I. -1 , x I.] The polynomial is used to a certain extent. The most commonly used polynomials of the third degree, less often - the second or fourth. At the same time, conditions of continuity of derivatives in interpolation nodes are used to determine the coefficients of polynomials.

    Interpolation of cubic splinesis a local interpolation when on each segment [ x I. -1 , x I.], i \u003d.1, 2, ... , pa cubic curve is applied that satisfies some conditions of smoothness, namely, the continuity of the function itself and its first and second derivatives at the nodal points. The use of cubic function is caused by the following considerations. If we assume that the interpolation curve corresponds to an elastic line attached at points ( x I., y I.), then from the course of resistance of materials it is known that this curve is defined as a solution differential equation f. (Iv) ( x.) \u003d 0 on the segment [ x I. -1 , x I.] (For simplicity, we do not consider issues related to physical dimensions). The general solution of such an equation is a polynomial of a 3rd degree with arbitrary coefficients, which is convenient to record as
    S I.(x.) = a I. + b I.(h. - x I. -1) + With I.(x. - x I. -1) 2 + d I.(x. - x I. -1) 3 ,
    x I. -1 £. H. £ x I., i \u003d.1, 2, ... , p.(4.32)

    Function coefficients S I.(x.) are determined from the continuity conditions of the function and its first and second derivatives in the internal nodes x I., I.= 1, 2,..., p - 1.

    From formulas (4.32) at h. = x I. -1 get

    S I.(x i- 1) = y I. -1 \u003d A I., i \u003d. 1, 2,..., p,(4.33)

    and for h. = x I.

    S I.(x I.) = a I. + b i h i + with i h i 2 + d i h i 3 ,(4.34)

    i.= 1, 2,..., n..

    The conditions for the continuity of the interpolation function are recorded as S I.(x I.) = S I. -1 (x I.), i.= 1, 2, ... , n. - 1 and from Conditions (4.33) and (4.34) it follows that they are fulfilled.

    Find derivatives S I.(x.):

    S "I.(x.) = B i +.2with I.(h. - x I. -1) + 3dI(h.x I. -1) 2 ,

    S "I.(x.) = 2c i +6d I.(x - X I -1).

    For x. = x I. -1, have S "I.(x I. -1) = b I., S " (x I. -1) = 2with I., and when h. = x I. Receive

    S "I.(x I.) = b I.+ 2with i h i+ 3dIH I. 2 , S " (x I.) = 2with i +.6d i h i.

    Terms of continuity of derivatives lead to equations

    S "I.(x I.) = S "I. +1 (x I.) Þ b I.+ 2with i h i+ 3dIH I. 2 = b I. +1 ,

    i. \u003d L, 2, ..., p - 1. (4.35)

    S "I. (x I.) = S "I. +1 (x I.) Þ 2. with i +.6d i h i= 2c I. +1 ,

    i. \u003d L, 2, ..., n.- 1. (4.36)

    We have 4 n. - 2 equations for definition 4 n. Unknown. To obtain two more equations, additional edge conditions are used, for example, the requirement of zero curvature of the interpolation curve at the end points, i.e. equality zero the second derivative at the ends of the segment [ but, b.] but = h. 0 , b.= x N.:

    S " 1 (x. 0) = 2c. 1 \u003d 0 þ from 1 = 0,

    S "N.(x N.) = 2with N. + 6d n h n = 0 Þ with N. + 3d n h n = 0. (4.37)

    The system of equations (4.33) - (4.37) can be simplified and obtaining recurrence formulas for calculating the spline coefficients.

    From condition (4.33) we have obvious formulas for calculating the coefficients a I.:

    a I. = y I. -1 , i \u003d.1,..., n.. (4.38)

    Express d I.through c I.with (4.36), (4.37):

    ; i. = 1, 2,...,n.; .

    Put with N. +1 \u003d 0, then for d I.we get one formula:

    , i. = 1, 2,...,n.. (4.39)

    Substitute expressions for a I. and d I. Equality (4.34):

    , i.= 1, 2,..., n..

    and express b I., through with I.:

    , i.= 1, 2,..., n.. (4.40)

    Except from equations (4.35) coefficients b I.and d I.with (4.39) and (4.40):

    i.= 1, 2,..., n. -1.

    From here we get a system of equations for determining with I.:

    The system of equations (4.41) can be rewritten as

    The designation has been introduced here

    , i. =1, 2,..., n.- 1.

    Resolving the system of equations (4.42) by the method of the rank. From the first equation express from 2 through from 3:

    c. 2 \u003d A 2 c. 3 + B 2 ,, (4.43)

    Substitute (4.43) in second equation (4.42):

    h. 2 (a 2 c. 3 + B 2) + 2 ( h. 2 + h. 3)c. 3 + H. 3 c. 4 = g. 2 ,

    and express from 3 through from 4:

    from 3 \u003d A 3 from 4 + B 3, (4.44)

    Assuming that with I. -1 \u003d A. I. -1 c I. + B. I. -1 iz i.-Ho equation (4.42) we get

    c I. \u003d A. I C I. +1 + B. I.

    , i. = 3,..., n.- 1, a N. \u003d 0, (4.45) C n +1 \u003d 0,

    c I. \u003d A. I C I. +1 + B. I., i.= n., n. -1,..., 2, (4.48)

    c. 1 = 0.

    3. Calculation of coefficients a I., b I., D I.:

    a I. = y I. -1 ,

    i.= 1, 2,..., n..

    4. Calculate the function value using splice. To do this, find such a value. i.that this value of the variable h.belongs to the segment [ x I. -1 , x I.] and calculate

    S I.(x.) = a I. + b I.(h. - x I. -1) + With I.(x. - x I. -1) 2 + d I.(x. - x I. -1) 3 . (4.50)

    Interpolation formulas of Lagrange, Newton and Stirling, etc. When using a large number of interpolation nodes on the whole segment [ a., b.] It is often leading to poor approximation due to the accumulation of errors in the process of computing. In addition, due to the divergence of the interpolation process, an increase in the number of nodes does not necessarily lead to an increase in accuracy. To reduce errors, the whole segment [ a., b.] The partial segments are divided into partial segments and on each of them is functioning approximately a low-level polynomial. It is called piecewise polynomial interpolation.

    One of the ways to interpolating all segments [ a., b.] is an interpolyting splines.

    Spline It is called a piecewise polynomial function defined by supporting [ a., b.] and having some continuous derivatives on this segment. The advantages of interpolation splines compared to conventional interpolation methods in convergence and stability of the computational process.

    Consider one of the most common cases in practice - interpolating function cubic spline.
    Let on the segment [ a., b.] The continuous function is specified. We introduce the splitting of the segment:

    and denote .

    Spline, corresponding to this feature, interpolation nodes (6) is a function that satisfies the following conditions:

    1) on each segment, the function is a cubic polynomial;

    2) function, as well as its first and second derivatives are continuous on the segment [ a., b.] ;

    The third condition is called interpolition condition. Spline defined by Conditions 1) - 3), called interpolation cubic splines.

    Consider the method of building a cubic splice.

    On each of the segments, We will look for a spline function in the form of a third-degree polynomial:

    (7)

    where second coefficients.

    Differentiating (7) three times h.:

    where follows

    From the interpolating condition 3) we get:

    From the continuity conditions of the function flows.


    Ministry of Education and Science of the Russian Federation

    Federal state budgetary educational institution Higher professional education

    "Don State University"

    Department " Software Computer Engineering I. automated systems»" Remote and AS "

    Specialty: Mathematical Provision and Administration of Information Systems

    COURSE WORK

    under the discipline "Methods of calculation"

    on the topic: "Spline interpolation"

    Manager:

    Medvedev Tatyana Aleksandrovna

    Rostov-on-Don

    THE TASK

    for the course work on the discipline "Methods of calculations"

    Student: Moiseenko Alexander Group of WPBM21

    Topic: "Spline Interpolation"

    Deadline for the protection of "__" _______ 201_

    Source data for term paper: Abstract lectures on calculation methods, RU.Wikipedia.org, KN. Workshop on higher mathematics Sable B.V.

    Sections of the main part: 1 Overview, 2 Interpolation Formula, 3 Cubic Interpolation Algorithm, 4 Software Design, 5 Software Results.

    Officer: / Medvedeva TA /

    ESSAY

    The report contains: pages-19, graphs-3, sources-3, block diagram -1.

    Keywords: interpolation, spline, Mathcad system, cubic interpolation splines.

    The interpolation method of cubic splines is considered in detail. The appropriate software module is presented. Illustrated block diagram of the software module. Several examples are considered.

    Introduction

    1. Theoretical Overview

    2. Interpolation

    2.1 Interpolation with a quadratic spline

    2.2 Interpolation with cubic splines

    2.3 Setting the task

    3. Interpolation algorithm with a cubic splice

    4. Software design

    5. Result of the software

    5.1 Description of examples

    5.2 Test result

    5.3 Check Example 1

    5.4 Check Example 2

    5.5 Check Example 3

    Conclusion

    BIBLIOGRAPHY

    Introduction

    Approximation of functions is the approximate replacement of a given function. f.(x.) Some function j ( x.) so that the deviation of the function j ( x.) OT f.(x.) The specified area was the smallest. Function j ( h.) It is called approximating. A typical task of approximation of functions is the problem of interpolation. The need for interpolation of functions is mainly associated with two reasons:

    1. Function f.(x.) has a complex analytical description, causing certain difficulties when used (for example, f.(x.It is a special confunction: gamma function, elliptical function, etc.).

    2. Analytical description of the function f.(x.) unknown, i.e. f.(x.) Set tables. It is necessary to have an analytical description, which is approximate f.(x.) (for example, to calculate values f.(x.) at arbitrary points, definitions of integrals and derivatives from f.(x.) etc.).

    1. Theoretical Overview

    Interpolation - in computing mathematics Method for finding intermediate values \u200b\u200bof the value according to the existing discrete set of known values. When solving tasks with scientific and engineering calculations, it is often necessary to operate with sets of values \u200b\u200bobtained by experienced by either by random sampling. As a rule, on the basis of these sets, it is necessary to construct a function on which other obtained values \u200b\u200bcould fall with high accuracy. This task is called the approximation of functions. Interpolation is called such a kind of approximation of functions, in which the curve of the constructed function passes exactly through the available data points.

    Spline - function, the definition area of \u200b\u200bwhich is divided into a finite number of segments, on each of which the spline coincides with some algebraic polynomial. The maximum degree from the used polynomials is called the degree of spline. The difference between the degree of splines and the resulting smoothness is called a spline defect.

    Splines make it possible to effectively solve problems of processing experimental dependencies between parameters having a rather complex structure.

    Cubic splines found wide practical application. The main ideas of the theory of cubic splines were formed as a result of attempts to mathematically described flexible racks from elastic material (mechanical splines), which the drawers were published in cases where there was a need for a smooth curve through the specified points. It is known that the rake from the elastic material, attached at some points and is in the equilibrium position, takes the form at which its energy is minimal. This fundamental property allows you to effectively use splines when solving practical tasks for processing experimental information.

    2. Interpolation

    2.1 Interpolation with a quadratic spline

    So, on each partial interpolating section, we will build a function of the form:

    Spline coefficients will be collaborating from the following conditions:

    a) Lagrange Conditions

    b) the continuity of the first derivative in the nodal points

    The last two conditions give equations, while the number of unknown coefficients. The missing equation can be obtained from additional conditions imposed on the spline behavior. For example, you can demand that the value of the first derivative of the spline S 1 at a point x 0 would be zero, i.e.

    The substitution of these expressions leads to the following equations

    where the designation has been introduced

    Express the coefficients of the second equation c. 1 , pre-substituting the values \u200b\u200bof the coefficients a. 1 From the first equation:

    Then, substituting this expression to the system equation, we get a simple recurrent ratio for coefficients

    Now the algorithm for determining the spline coefficients becomes quite obvious. First, by the formula, we determine the values \u200b\u200bof all coefficients, taking into account the fact that. Then, according to the formula, calculate the coefficients. The coefficients are determined from the first equation of the system. At the same time, the procedure for calculating the spline coefficients must be done only once.

    After the coefficients are calculated, to calculate the spline itself, it suffices to determine the interval number in which the interpolating point falls and use the formula. To determine the interval number we will apply an algorithm similar to that it was used in the previous example for piecewise quadratic interpolation.

    2.2 Interpolation with cubic splines

    Cubic interpolation splines , relevant this feature f.(x.) and these nodes x. i., called function S.(x.), satisfying the following conditions:

    1. On each segment [ x. i - 1 , X. i.], i \u003d1, 2, ..., N. function S.(x.) is a third-degree polynomial,

    2. Function S.(x.), And also its first and second derivatives are continuous on the segment [ a, B.],

    3. S.(x. i.) \u003d F.(x. i.), i \u003d0, 1, ..., N.

    On each of the segments [x. i - 1 , X. i.], i \u003d1, 2, ..., N. We will look for a function S.(x.) \u003d S. i.(x.) in the form of a third-degree polynomial:

    S. i.(x.) \u003d A. i. + B. i.(x - X. i - 1) + C. i.(x - X. i - 1) 2 + D. i.(x - 1) 3 ,

    x. i - 1 Ј X.Ј X. i.,

    where A. i., B. i., C. i., D. i. - coefficients to be defined at all n. Elementary segments. In order for the system of algebraic equations to have a solution, it is necessary that the number of equations is exactly equal to the number of unknown. So we have to get 4 n. equations.

    First 2. n. equations we get from the condition that the schedule of the function S.(x.) Must pass through the specified points, i.e.

    S. i.(x. i - 1) \u003d y. i - 1 , S. i.(x. i.) = y. i..

    These conditions can be written as:

    S. i.(x. i - 1) \u003d A. i. \u003d y. i - 1 ,

    S. i.(x. i.) \u003d A. i. + B. i.h. i. + C. i.h + D. i.h \u003d y. i.,

    h. i. \u003d X. i. - X. i - 1 , i \u003d1, 2, ..., n.

    Next 2. n -2 equations leak out from the condition of the continuity of the first and second derivatives in the interpolation nodes, i.e. the conditions of smoothness of the curve at all points.

    S " i +. 1 (x. i.) \u003d S " i.(x. i.), i \u003d.1, ..., n -1,

    S "" i +. 1 (x. i.) \u003d S "" i.(x. i.), i \u003d1, ..., n -1,

    S " i.(x.) \u003d B. i. + 2 c. i.(x - X. i - 1) + 3 d. i.(x - X. i - 1),

    S " i +. 1 (x.) \u003d B. i +. 1 + 2 c. i +. 1 (x - X. i.) + 3 d. i +. 1 (x - X. i.).

    Equating in each inner node x \u003d X. i. values \u200b\u200bof these derivatives calculated in the left and right of the node of the intervals are obtained (including h. i. \u003d X. i. - X. i - 1):

    b. i +. 1 \u003d B. i. + 2 h. i.c. i. + 3h. d. i., i \u003d1, ..., n -1,

    S "" i.(x.) = 2 c. i. + 6 d. i.(x - X. i - 1),

    S "" i +. 1 (x.) = 2 c. i +. 1 + 6 d. i +. 1 (x - X. i.),

    if a x. = x. i.

    c. i +. 1 \u003d C. i. + 3 h. i.d. i., i \u003d1, 2, ..., n -1.

    At this stage we have 4 n. Unknown and 4. n. - 2 equations. Therefore, it is necessary to find two more equations.

    With the free fixation of the ends, you can equate to zero curvature of the line at these points. From the conditions of zero curvature at the ends, there are equalities zero of the second derivatives at these points:

    S. 1" " (x. 0) = 0 I. S. n ""(x. n.) = 0,

    c. i. = 0 and 2 c. n. + 6 d. n.h. n. = 0.

    Equations make up a system of linear algebraic equations for definition 4 n.coefficients: a. i. , B. i. , C. i., D. i. (i. = 1, 2, . . ., n.).

    This system can be brought to a more convenient mind. From the condition you can immediately find all the coefficients a. i.

    i \u003d.1, 2, ..., n -1,

    Substituting, we get:

    b. i. = - (c. i +. 1 + 2c. i.) , i \u003d1, 2, ..., n -1,

    b. n. = - (h. n.c. n.)

    We exclude the coefficients from the equation b. i. and d. i.. Finally we obtain the following system of equations only for coefficients from i.:

    c. 1 = 0 I. c. n +. 1 = 0:

    h. i - 1 c. i - 1 + 2 (h. i - 1 + h. i.) c. i. + H. i.c. i +. 1 = 3 ,

    i \u003d.2, 3, ..., n.

    According to the coefficients found from i. easy to calculate d. i., B. i..

    2.3 Setting the task

    On the segment [ a, B.] are specified n. + 1 Points x. i. = h. 0 , h. 1 , . . ., h. n.called nodes interpolation , and the meanings of some function f.(x.) at these points

    f.(x. 0) \u003d y. 0 , F.(x. 1) = y. 1 , . . ., F.(x. n.) \u003d y. n..

    With the help of cubic splines to build an interpolation function f.(x.).

    3. Interpolation algorithm with a cubic splice

    We will get acquainted with the algorithm of the program.

    1. Calculate the values \u200b\u200band

    2. On the basis of these values, we consider the turning coefficients and about.

    3. Based on the data obtained, calculate the coefficients

    4. After that, calculate the value of the function using the spline.

    4. Software design

    5. Software Results

    5.1 Description of test examples

    During the implementation of this course, a software module was developed, which through the available points spends the corresponding curve. Test examples were carried out to verify the performance of work.

    5.2 Test results

    To verify the execution of test examples, the CSPLine function is built into the Mathcad package, which returns the vector of second derivatives when approaching the support points to the cubic polynomial.

    5.3 Check Example 1

    Figure 1.1 - Program performance

    Check Example 2.

    Figure 1.2 - Program performance

    Control example 3.

    Figure 1.3 Result of the program

    Conclusion

    spline interpolation function computing

    In computational mathematics, interpolation of functions plays a significant role, i.e. The construction of the specified function of another (as a rule, more simple), the values \u200b\u200bof which coincide with the values \u200b\u200bof the specified function in some number points. Moreover, interpolation has both practical and theoretical meaning. In practice, it often arises the problem of restoring a continuous function according to its table values, for example, obtained during some experiment. To calculate many functions, it turns out to effectively bring them with polynomials or fractional rational functions. The theory of interpolating is used in constructing and examining the quadrature formulas for numerical integration, to obtain methods for solving differential and integral equations. The main disadvantage of polynomial interpolation is that it is unstable on one of the most convenient and frequently used grids - a grid with equidistant nodes. If the task allows, this problem can be solved by choosing a grid with Chebyshev nodes. If we cannot freely choose interpolation nodes or we simply need an algorithm, not too demanding to choose nodes, then rational interpolation may be a suitable alternative to polynomial interpolation.

    The advantages of spline interpolation include the high speed of processing the computing algorithm, since the spline is a piecewise polynomial function and during interpolation, data is simultaneously processed by a small number of measurement points belonging to the fragment, which is currently being considered. The interpolated surface describes the spatial variability of a different scale and at the same time is smooth. The latter circumstance makes it possible to directly analyze geometry and topology of the surface using analytical procedures.

    BIBLIOGRAPHY

    1. B.V.Sobol, B.Ch.Meshi, I.M. Peshkhoev. Workshop on computational mathematics. - Rostov-on-Don: Phoenix, 2008;

    2. N.S. Bowls, N.P. Liquid, G.M. Kobelkov. Numerical methods. Publishing house "Laboratory of Basic Knowledge". 2003.

    3. www.wikipedia.ru/spline

    Similar documents

      Computational methods of linear algebra. Interpolation of functions. The interpolation polynomial Newton. Interpolation nodes. Interpolation polynomial Lagrange. Interpolation splines. Cubic spline coefficients.

      laboratory work, added 06.02.2004

      In computational mathematics, the interpolation of functions plays a significant role. Lagrange formula. Interpolization according to the Eitken scheme. Interpolation formulas Newton for equivalent nodes. Newton's formula with separated differences. Interpolation splines.

      examination, added 05.01.2011

      Build a Newton interpolation polynomial. Straighten the schedule and mark the interpolation nodes on it. Build interpolation polynomial Lagrange. Perpolation splines of the third degree.

      laboratory work, added 06.02.2004

      The role of interpolation of functions, the values \u200b\u200bof which coincide with the values \u200b\u200bof the specified function in some number points. Interpolating the function of polynomials, directly continuous functions on the segment and at the point. Determination of the concept of interpolation error.

      coursework, added 04/10/2011

      Continuous and point approximation. Interpolation polynomials Lagrange and Newton. The error of global interpolation, quadratic dependence. Least square method. Selection of empirical formulas. Piece and constant and piecewise linear interpolation.

      coursework, added 03/14/2014

      Acquaintance with the history of the method of the golden section. Consideration of the basic concepts and algorithm for the implementation of calculations. Studying the method of Fibonacci numbers and its features. Description of examples of the implementation of the gold cross section method in programming.

      coursework, added 08/09/2015

      PROBLEMS OF GLOBLY ON LOCAL INTERPOL'YATSIA FOR LAGRANGE І Newton; columan behavdock of the iNTERPOLOTSIKY polynomial; Funky Runge. SPLINE - GROWS POW "Yazy cubic polynomials of the Multi-Russian Finger і і и и и и иняю, Perevagi Spline-intropoitzії.

      presentation, added 06.02.2014

      Methods of numerical differentiation. Calculation of the derivative, simple formulas. Numerical differentiation based on interpolation by algebraic polynomials. Approximation by the polynomial of Lagrange. Differentiation, using interpolation.

      course work, added 15.02.2016

      Description of the methods of solving a system of a linear algebraic equation: reverse matrix, Jacobi, Gaussa-Zeidel. Staging and solving the problem of interpolation. Selection of polynomial dependence by the smallest square method. Features of the relaxation method.

      laboratory work, added 12/06/2011

      The task of finding extremum: essence and content, optimization. Solution by the methods of quadratic interpolation and gold section, their comparative characteristics, determination of the main advantages and disadvantages. Number of iterations and accuracy assessment.

    2.2 Interpolation with cubic splines

    The cubic interpolation splines corresponding to this function f (x) and these nodes X i is called the function S (x), satisfying the following conditions:

    1. On each segment, i \u003d 1, 2, ..., N function S (x) is the polynomial of the third degree,

    2. The function s (x), as well as its first and second derivatives are continuous on the segment,

    3. S (x i) \u003d f (x i), i \u003d 0, 1, ..., n.

    On each of the segments, I \u003d 1, 2, ..., n, we will look for the function S (x) \u003d s i (x) as a third-degree polynomial:

    S i (x) \u003d a i + b i (x - x i - 1) + c i (x - x i - 1) 2 + d i (x - 1) 3,

    x i - 1 ј x ј x i,

    where A I, B I, C I, D I are coefficients to be determined on all N elementary segments. In order for the system of algebraic equations to have a solution, it is necessary that the number of equations is exactly equal to the number of unknown. Therefore, we must get 4n equations.

    We obtain the first 2n equations from the condition that the graph of the function S (x) should pass through the specified points, i.e.

    S i (x i - 1) \u003d y i - 1, s i (x i) \u003d y i.

    These conditions can be written as:

    S i (x i - 1) \u003d a i \u003d y i - 1,

    S i (x i) \u003d a i + b i h i + c i h + d i h \u003d y i,

    h i \u003d x i - x i - 1, i \u003d 1, 2, ..., n.

    The following 2n - 2 equations arise from the condition of the continuity of the first and second derivatives in the interpolation nodes, i.e., the conditions of smoothness of the curve at all points.

    S i + 1 (x i) \u003d s i (x i), i \u003d 1, ..., n - 1,

    S i (x) \u003d b i + 2 c i (x - x i - 1) + 3 d i (x - x i - 1)

    S i + 1 (x) \u003d b i + 1 + 2 c i + 1 (x - x i) + 3 d i + 1 (x - x i).

    Equating in each inner node x \u003d x i the values \u200b\u200bof these derivatives calculated in the left and right on the node of the intervals, we obtain (taking into account H i \u003d x i - x i - 1):

    b i + 1 \u003d b i + 2 h i c i + 3h d i, i \u003d 1, ..., n - 1,

    S i (x) \u003d 2 c i + 6 d i (x - x i - 1)

    S i + 1 (x) \u003d 2 c i + 1 + 6 d i + 1 (x - x i)

    if x \u003d x i

    c i + 1 \u003d c i + 3 h i d i, i \u003d 1,2, ..., n - 1.

    At this stage, we have 4n unknown and 4n - 2 equations. Therefore, it is necessary to find two more equations.

    With the free fixation of the ends, you can equate to zero curvature of the line at these points. From the conditions of zero curvature at the ends, there are equalities zero of the second derivatives at these points:

    S 1 (x 0) \u003d 0 and S n (x n) \u003d 0,

    c i \u003d 0 and 2 C n + 6 d n h n \u003d 0.

    The equations make up a system of linear algebraic equations for determining 4N coefficients: A I, B I, C I, D I (I \u003d 1, 2 ,..., N).

    This system can be brought to a more convenient mind. From the condition you can immediately find all the coefficients A i.

    i \u003d 1, 2, ..., n - 1,

    Substituting, we get:

    b i \u003d - (c i + 1 + 2c i), i \u003d 1,2, ..., n - 1,

    b n \u003d - (h n c n)

    We exclude from the equation the coefficients B I and D I. Finally, we obtain the following system of equations only for coefficients with i:

    c 1 \u003d 0 and C n + 1 \u003d 0:

    h i - 1 c i - 1 + 2 (h i - 1 + h i) c i + h i c i + 1 \u003d 3,

    i \u003d 2, 3, ..., n.

    According to the found coefficients with i, it is easy to calculate D I, B i.

    Calculation of integrals by Monte Carlo

    In this software product, it is possible to set additional restrictions on the integration area with two two-dimensional spline surfaces (for the integrated dimension function 3) ...

    Interpolating functions

    Let the table of the values \u200b\u200bof the function f (xi) \u003d yi (), in which they are located ascending the values \u200b\u200bof the argument: x0< x1 < … < xn. Чтобы построить кубический сплайн, требуется определить коэффициенты ai0, ai1, ai2, ai3...

    Interpolation splines

    Interpolation splines

    Interpolation splines

    We will get acquainted with the algorithm of the program. 1. Calculate the values \u200b\u200band 2. Based on these values, we consider the turning coefficients and about. 3. Based on the data obtained, calculate the coefficients 4 ...

    Math modeling Technical objects

    Built-in Mathcad functions allow for interpolation to conduct curves through experimental points varying degrees difficulties. Linear interpolation ...

    Function approximation methods

    On each segment, the interpolation polynomial is equal to the constant, namely the left or right value of the function. For the left piecewise linear interpolation f (x) \u003d Fi-1, if xi-1? X

    Function approximation methods

    At each interval, the function is linear FI (X) \u003d KIX + LI. The values \u200b\u200bof the coefficients are from the performance of interpolation conditions at the ends of the segment: fi (xi-1) \u003d fi-1, fi (xi-1) \u003d fi. We obtain the system of equations: Kixi-1 + Li \u003d Fi-1, Kixi + Li \u003d Fi, from where they find ki \u003d li \u003d fi- kixi ...

    System solutions methods linear equations. Interpolation

    Setting the problem of interpolation. The interval of points (interpolation nodes) xi, i \u003d 0.1, ..., n is given on the interval. A? X I? b, and the values \u200b\u200bof an unknown function in these nodes fn i \u003d 0,1,2, ..., n. The following tasks may be delivered: 1) Construct a function f (x) ...

    Construction of a mathematical model describing the process of solving a differential equation

    3.1 Construction of the interpolation polynomial of Lagrange and the thickening of values. The obvious reception of solving this task is to calculate the values \u200b\u200bof ѓ (x), using the analytical values \u200b\u200bof the function ѓ. For this - on source information ...

    If they are degrees (1, x, x2, ..., xn), they are talking about algebraic interpolation, and the function is called interpolation polynomial and denoted as: (4) if () (5), then can be constructed interpolational polynomials n and ... one...

    Practical application of interpolating smooth functions

    Consider an example of interpolation for sets of sets. For simplicity and brevity, take \u003d [- 1; 1] ,. Let the points and will be different among themselves. We will put such a task: (12) to build a polynomial satisfying these conditions ...

    Application of numerical methods for solving mathematical tasks

    Numerical methods

    So, as mentioned above, the intellectual task is to search for such a polynomial whose graph passes through the specified points. Let the function y \u003d f (x) are set using the table (Table 1) ...

    Numerical methods for solving mathematical problems









































    Curves and surfaces found in practical problems often have a rather complicated form that does not allow the universal analytical task as a whole using elementary functions. Therefore, they are collected from relatively simple smooth fragments - segments (curves) or cuts (surfaces), each of which can be quite satisfactorily described using elementary functions of one or two variables. In this case, it is quite natural to require smooth functions that are used to build partial curves or surfaces, have a similar nature, for example, would be the same degree polynomials. And in order for the resulting curve or surface to be enough smooth, it is necessary to be especially attentive in places of docking of the corresponding fragments. The degree of polynomials is chosen from simple geometric considerations and is usually small. For a smooth change of tangentially along the entire composite curve, it is enough to describe the jumped curves with the help of many members of the third degree, cubic polynomials. The coefficients of these polynomials can always be picked up so that the curvature of the corresponding composite curve was continuous. Cubic splines arising when solving one-dimensional tasks can be adapted to the proceedings of fragments of compound surfaces. And here quite naturally appear bicubic splines described using the many polynomials of the third degree for each of the two variables. Work with such splines requires a significantly larger computation. But a properly organized process to allow continuously increasing the possibilities of computing equipment to the maximum extent. Spline functions Let on the segment, that is, the remark. Index (T) in numbers A ^ indicates that. As a set of coefficients that determine the function 5 (x), on each partial section D, its own. On each of the segments D1, the spline 5 (x) is a polynomial of the degree P and is determined on this segment P + 1 with the coefficient. Total partial segments - then. So, in order to fully define the spline, it is necessary to find (P + 1) that numbers of the condition) means the continuity of the function 5 (g) and its derivatives in all internal nodes of the grid w. The number of such nodes M - 1. Thereby, to find the coefficients of all polynomials, P (T - 1) of conditions (equations) is obtained. To complete the definition of the spline lack (conditions (equations). The choice of additional conditions is determined by the nature of the problem under consideration, and sometimes simply - the desire of the user. Spline theory Examples of solutions most often considered tasks of interpolation and smoothing when it is required to build one or another spline for a given array of points on the plane in the interpolation tasks, it is necessary that the splice schedule passes through the points that imposes on its coefficients M + 1 additional conditions (equations). The remaining P - 1 of the conditions (equations) for the unequivocal constructing of the spline is most often set in the form of the values \u200b\u200bof the junior spline derivatives at the ends of the segment under consideration [A, 6] - boundary (edible) conditions. The choice of various boundary conditions allows you to build splines with the most different properties. In the tasks of smoothing the spline build so that its schedule passes near the points (I "" y "), * \u003d 0, 1, ..., t, not through them. The measure of this intimacy can be determined in different ways, which leads to a significant variety of smoothing splines. The described possibilities of choice in the construction of spline functions do not exhaust all their diversity. And if it was originally considered piecewise polynomial spline functions, then, as they expand their applications, spline, "glued" and from other elementary functions began to occur. Interpolation Cubic Splines Setting the problem of interpolation Suppose on the segment [A, 6) The grid is set to the set of numbers of the task. Build a smooth on the segment (A, 6] the function that takes the specified values \u200b\u200bin the grid nodes, that is, the remark. The formulated interpolation task is to restore a smooth function specified table (Fig. 2). It is clear that such a task has many different decisions . Adjusting additional conditions to the constructed function, you can achieve the necessary unambiguity. Annexes often need to bring the function specified analytically, using a function with prescribed fairly good properties. For example, in cases where the calculation of the values \u200b\u200bof the specified function / (x) at the point of the segment [A, 6] is associated with significant difficulties and / or the specified function / (x) does not have the required smoothness, it is convenient to use another function that approached quite well A given function would be deprived of its flaws. The task of interpolation function. Build on a segment [A, 6] a smooth function A (x), which coincides in the nodes of the grid w with a given function / (x). Determination of the interpolation cubic spline by interpolation cubic spline S (x) on the grid w is called a function that 1) on each of the segments is a polynomial of the third degree, 2) twice continuously differentiable on the segment [a, b], that is, belongs to C2 class [ A, 6], and 3) satisfies the conditions on each of the segments of the spline S (x) is a polynomial of the third degree and is determined on this segment four coefficients. Total segments - t. So, in order to fully define a spline, it is necessary to find 4T numbers. The condition means the continuity of the function S (x) and its derivatives s "(x) and 5" (x) in all internal nodes of the grid w. The number of such nodes - M - 1. Thereby, to find the coefficients of all polynomials, another 3 (M - 1) conditions (equations) are obtained. Together with Conditions (2), conditions (equations) are obtained. Boundary (edge) conditions Two missing conditions are specified in the form of restrictions on the values \u200b\u200bof splines and / or its derivatives at the ends of the interval [A, 6]. When constructing an interpolation cubic spline, the boundary conditions of the following four types are most often used. A. Edge 1 type conditions. - Finally, the interval [A, b] are set values \u200b\u200bof the first derivative of the desired function. B. Regional conditions of the 2nd type. - Finals the gap (A, 6) are set values \u200b\u200bof the second derivative of the desired function. B. Regional conditions of the 3rd type. Called periodic. The fulfillment of these conditions naturally require in cases where the interpolated function is periodic with a period T \u003d b-a. The regional conditions of the 4th type. Require a special comment. Comment. In the internal nodes of Sepsi, the third derivative of the function s (x), generally speaking, breaking. However, the number of ruptures of the third derivative can be reduced by peeling the 4th type conditions. In this case, the built spline will continuously differentiate the constructing of an interpolation cubic splice by describing the method of calculating the cubic spline coefficients, in which the number of values \u200b\u200bto be determined is equal. At each of the intervals, the interpolation spline function is designed in the following form here the theory of spline examples of solutions and numbers are a solution of a system of linear algebraic equations, the type of which depends on the type of boundary conditions. For the boundary conditions of the 1st and 2nd types, this system has the following form where the coefficients depend on the selection of boundary conditions. The edge conditions of the 1st type: the edges of the 2nd type: in the case of the edible conditions of the 3rd type, the system for determining the numbers is written so the number of unknown in the last system is equal to TP, since the dimensions of the periodicity follows, which is by \u003d PT. For the boundary conditions of the 4th type, the system to determine the numbers, has the form where the found solution of the system number and PTs can be determined using the formulas important remark. The matrices of all three linear algebraic systems are matrices with a diagonal prevailing. Tamiya matrix is \u200b\u200bnot degenerate, and therefore each of these systems has a single solution. Theorem. Interpolation cubic spline that satisfies conditions (2) and the boundary condition of one of the listed four types, exists and the only one. Thus, to build an interpolation cubic spline - it means finding its coefficients when the spline coefficients are found, the value of the spline S (x) in an arbitrary point of the segment [A, b] can be found in the formula (3). However, the following algorithm for finding a value of 5 (g) is more suitable for practical calculations. Let x 6 [x ", first calculate the values \u200b\u200bof the A and B according to formulas and then the value 5 (g): The use of this algorithm significantly reduces the computational costs for determining the value of the advice to the user the choice of boundary (edible) conditions and interpolation sites allows to manage to a certain extent properties of interpolation splines. A. Selection of boundary (edge) conditions. The choice of boundary conditions is one of the central problems during interpolation of functions. It acquires a special importance when it is necessary to ensure the high accuracy of the approximation of the function f (x) spline 5 (g) near the ends of the segment [A, 6). The boundary values \u200b\u200bhave a noticeable effect on the behavior of the spline 5 (g) near the points A and B, and this influence as it removed from them quickly weakens. The selection of boundary conditions is often determined by the presence of additional information about the behavior of the approximated function F (X). If the values \u200b\u200bof the first derivative f "(x) are known at the ends of the segment (A, 6], then naturally use the edible conditions of the 1st type. If the values \u200b\u200bof the second derivative F" (x) are known at the ends of the segment [A, 6), then naturally Take advantage of the edible conditions of the 2nd type. If it is possible to choose between edible conditions of the 1st and 2nd types, then preference should be given to the conditions of the type. If f (x) is a periodic function, then the incisional conditions of the 3rd type should be stopped. In the event that no additional information on the behavior of the approximated function is often used by the so-called natural boundary conditions, however, it should be borne in mind that with such a selection of the boundary * conditions accuracy of approximation of the function f (x) spline S (x) near the ends of the segment (A, ft] decreases sharply. Sometimes the boundary conditions of the 1st or 2nd type are used, but not with the exact values \u200b\u200bof the corresponding derivatives, but with their difference approximations. The accuracy of this approach is low. The practical experience of calculations shows that the situation in question is most appropriate. The boundary conditions of the 4th type. B. Selecting interpolation nodes. If the third derivative f "" (x) the functions of the fault in the non-segment of the segment [a, b], then to improve the quality of the approximation, these points should be included in the number of interpolation nodes. If the break The second derivative / "(x), then in order to avoid oscillation of the spline near the discharge points, it is necessary to take special measures. Usually The interpolation nodes are chosen so that the break points of the second derivative fall into the gap \\ xif), such that. The value A can be chosen by numerical experiment (often enough to put a \u003d 0.01). There is a set of recipes to overcome the difficulties arising from the discontinuous first derivative F "(x). As one of the easiest possible, it is possible to offer such a: split approximation segment for intervals, where the derivative is continuous, and on each of these gaps to build a spline. Selecting the interpolation function (Pluses and cons) approach 1st. Interpolation polynomial Lagrange on a given array Theory of spline Solution examples (Fig. 3) Interpolation polynomial Lagrange is determined by the formula of the properties of interpolation polynomials are advisable to consider from two opposite positions, discussing the main advantages separately from flaws. Basic advantages 1 -to approach: 1) The graph of the interpolation polynomial of Lagrange passes through each point of the array, 2) the designed function is easily described (the number of the coefficients of the interpolation polynomial of Lagrange on the grid and\u003e is M + 1), 3) the constructed function has continuous derivatives of any pore The vendor, 4) a given array interpolation polynomial is definitely defined. The main disadvantages of the 1 -go approach: 1) The degree of interpolation polynomial Lagrange depends on the number of grid nodes, and the greater the number, the higher the degree of interpolation polynomial and, it means that the calculations are required, 2) a change in at least one point in the array requires full Recalculation of the coefficients of the interpolation polynomial Lagrange, 3) Adding new point The array increases the degree of interpolation polynomial Lagrange per unit and Taise leads to a complete recalculation of its coefficients, 4) with an unlimited grinding of the mesh, the degree of interpolation polynomial of Lagrange increases indefinitely. The behavior of the interpolation polynomial of Lagrange with an unlimited grinding of the grid in general requires special attention. Comments by A. On the approximation of a continuous function by polynomial. It is known (Weierstrass, 1885), that any continuous (and the more smooth) on the segment the function can be as good as well on this segment by polynomial. We describe this fact in the language of formulas. Let F (x) be a function continuous on the segment [A, 6]. Then I have any E\u003e 0, there is such a polynomial p "(x), the inequality (Fig. 4) will be performed (Fig. 4), to note that the polynomials of even one degree approaching the function f (x) with the specified accuracy There is indefinitely a lot. We construct the support [A, 6] grid w. It is clear that its nodes, generally speaking, do not coincide with the points of intersection of the graphs of the polynomial RP (X) and the functions F (x) (Fig. 5). Therefore, for a taking grid, the polynomial RP (X) is not interpolation. When approximating the continuous function of the interpolation polynomial of JLA-grade, its schedule is not only not obliged to be a close graphics of the function f (x) at each point of the segment [A, B), but can shy away from this function as you like strongly. We give two examples. Example 1 (Rung, 1901). With an unlimited increase in the number of nodes for a function on the segment [-1, 1], an extreme equality (Fig. 6) Example 2 (Berishtein, 1912) is performed. Sequence of interpolation polynomials of Lagrange constructed on uniform grids pcs for continuous function / (x) \u003d | x | On the segment with an increase in the number of nodes T does not tend to function / (x) (Fig. 7). Approach 2nd. Particular LIEINM Interpolation If the smoothness of the interpolated function is refused, the ratio between the number of advantages and the number of shortcomings can be noticeably changed towards the first. We construct a piecewise linear function by a sequential connection of the points (Xit y,) with rectilinear segments (Fig. 8). The main advantages of the 2 -go approach: 1) a graph of a piece-linear function passes through each point of the array, 2) the designed function is easily described (the number of coefficients to be determined by the corresponding linear functions for the mesh (1) is 2t), 3) a designed array of the constructed function is defined Alternatively, 4) The degree of polynomials used to describe the interpolation function does not depend on the number of mesh nodes (equal to 1), 5) change of one point in the array requires calculating four numbers (the coefficients of two straight links, outgoing from the new point), 6) add An additional point in the array requires the calculation of four coefficients. A piecewise linear function behaves quite well and when grinding grid. I have a major drawback of 2-time: approximating piecewise linear function is not smooth: the first produced tolerate the gap in the grid nodes (interpolation ears). Approach 3rd. Spline interpolation The proposed approaches can be combined so that the number of these advantages of both approaches is preserved while reducing the number of shortcomings. This can be done by building a smooth interpolation spline degree r. The main advantages of the 3 -go approach: 1) The graph of the constructed function passes through each point of the array, 2) the designed function is relatively easily described (the number of coefficients of the corresponding polynomials for the mesh (1) is 3) the designed array of the constructed function is defined unique, 4) The polynomials do not depend on the number of grid nodes and, therefore, does not change when it increases, 5) The constructed function has continuous derivatives to order P - 1 inclusive, 6) The constructed function has good approximation properties. Brief certificate. The proposed name - Spline - is not a random - the smooth-spirited-humid-polynomial functions introduced by us and drawing range are closely connected. Consider the flexible ideal tone line passing through the laying points of the array located on the plane (x, y). According to the law of Bernoulli-Euler, the linearized equation of the curved line has the form where S (x) is the bend, M (x) - the bending moment varies linearly from supporting the bending moment, E1 is the rigidity of the line. The function S (x), describing the formulator, is a polynomial of a third degree between each and two adjacent points of the array (supports) and twice continuously differentiable throughout the entire interval (A, 6). Comment. 06 Interpoles continuous function Unlike interpolation polynomials of Lagrange, the sequence of interpolation cubic splines on a uniform mesh is always to an interpolated continuous function, and with the improvement of the differential properties of this function, the rate of convergence increases. Example. For the function, the cubic spline on the grid with the number of nodes M \u003d 6 gives an accuracy of approximation of the same order as the interpolation polynomial Ls (z), and on the grid with the number of nodes M \u003d 21, this error is so small that on the scale of the usual book drawing is simply not It can be shown (Fig. 10) (interpolation polynomial 1\u003e 2o (g) gives in this case an error of about 10,000 g). The properties of the Imterspolakokok cubic spline A. Alproksimation properties of cubic splines. The approximation properties of the interpolation splines depend on the smoothness of the function f (x) - the higher the smoothness of the interpolated function, the higher the procedure for approximation and when grinding the grid, the higher the speed of convergence. If the interpolated function f (x) is continuous on the segment if the interpolated function f (x) has a continuous first derivative on the interpolate [A, 6], that is, an interpolation spline that satisfies the boundary conditions of the 1st or 3rd type, then when H is In this case, not only the spline converges to the interpolated function, but the spline derivative converges to the derivative of this function. If the spline S (x) approximates the function f (x), and its first and second derivatives are approximated by the function B. The extreme property of the cubic splice. Interpolation cubic spline has another beneficial property. Consider the following example. Riemer. Construct a function / (x), minimizing functional on the class of functions from the C2 space, whose graphs pass through the points of the array among all functions passing through the support points (x;, / (x,)) and belonging to the specified space, it is a cubic spline 5 ( x), satisfying the edge conditions delivers extremum (minimum) functionality Remark 1. Often, it is precisely this extremal property to be taken as the determination of an interpolation cubic splice. Note 2. It is interesting to note that the interpolation cubic spline has the extremal property described above on a very wide class of functions, namely, in class | Oh, 5]. 1.2. Smoothing cubic splines about the formulation of the smoothing problem. Let the grid and set of numbers comment on the initial data in practice often have to deal with the case when the values \u200b\u200bof y, in the array are set with some error. In fact, this means that the interval and any number of this interval can be taken as the value of y ,. The values \u200b\u200bof y, convenient to interpret, for example, as the results of measurements of some function in (x) at a given values \u200b\u200bof the variable x, containing a random error. When solving the task of restoring the function in such "experimental" values, it is unlikely to use interpolation, since the interpolation function will obediently reproduce bizarre oscillations due to a random component in the array (y,). A more natural is an approach based on the smoothing procedure, designed to somehow reduce the element of chance as a result of measurements. Usually in such tasks you need to find a function, the values \u200b\u200bof which at x \u003d w, * \u003d 0, 1, .... T, would fall at the appropriate intervals and which would also have quite good properties. For example, there would have continuous first and second derivatives, or its schedule would not be too twisted, that is, it would not have strong oscillations. The task of this kind occurs and then when according to the predetermined (accurately) array, it is necessary to build a function that takes no intendenateness, and close to them and also changed enough smoothly. In other words, the desired function as if smoothed a given array, and not interpolated it. Let the Mesh W and two sets of numbers of the spline theory examples the solution of the task. To construct a smooth on the segment [A] a function, the values \u200b\u200bof which in the nodes of the grid and "differed from the numbers of y, - to the specified values \u200b\u200bof the sortie. The formulated smoothing task is torecovery Smooth function specified table. It is clear that such a task has many different solutions. Adjusting additional conditions to the constructed function, you can achieve the necessary unambiguity. The definition of a smoothing cubic spline by smoothing cubic splines S (x) on the grid is called a function that 1) on each of the segments is a polynomial of a third degree, 2) twice continuously differentiable on the segment [A, 6], that is, belongs to C2 class [ , B], 3) gives the minimum functionality where the specified numbers, 4) satisfies the boundary conditions of one of the three types of the above. Boundary (edge) conditions The boundary conditions are set in the form of restrictions on the values \u200b\u200bof the spline and its derivatives in the boundary nodes of the grid w. A. Boundary conditions of the 1st type. - Finally, the interval [A, b) are set values \u200b\u200bof the first derivative of the desired function. Boundary conditions of the 2nd type. - The second derivatives of the desired function at the ends of the gap (A, b] are equal to zero. B. Boundary conditions of the 3rd type. They are called periodic. Theorem. Cubic spline S (x), minimizing functional (4) and satisfying the edge conditions of one of these three Types are defined unequivocally. Definition. Cubic spline, minimizing functionality J (F) and satisfying the boundary conditions of the I-Gotype, is called a smoothing spline I-Gotype. Comment. On each handoff (, spline 5 (x) is a minimal third degree and is determined on This segment is four coefficients. Total segments - t. So, in order to fully define the spline, it is necessary to find 4T numbers. The condition means the continuity of the function 5 (AG) and CE derivatives in all in-line grid nodes. "The number of such nodes - M - 1 . Thus, it turns out to be 3 (M - 1) the conditions (equations). Construction of smoothing cubic splines describe the coefficients of cubic propellane, In which the number of values \u200b\u200bto be determined is equal to 2t + 2. At each of the gaps, the smoothing spline function is searched as follows here a number and are a solution of a system of linear algebraic equations, the type of which the dependent type of boundary conditions. We will first describe how the values \u200b\u200bof P * are located. For boundary conditions of the 1st and 2nd types, the system of linear equations for determining the values \u200b\u200bof Hi is written in the following form where known numbers). The coefficients depend on the selection of boundary conditions. Boundary 1-th type: Boundary conditions of the 2nd type: In the case of the boundary conditions of the 3rd type, the system for determining the numbers is written as follows: and all coefficients are calculated using formulas (5) (values \u200b\u200bwith indexes K and T + K consider it equal : Important * Note. The system matrices are not born and therefore each of these systems has a single solution. If the numbers n are found, then the values \u200b\u200bare easily determined by the formulas where in the case of periodic boundary conditions, the choice of the coefficients selection of weight coefficients P, which are included in the functionality (4), make it possible to control the properties of smoothing splines. If everything and smoothing spline turns out to be interpolation. This, in particular, means that the more precisely the values \u200b\u200bare given, the smaller the reached weight coefficients. If it is necessary that the spline passed through the point (x ^, the Criminal Code), then the R \\ respondant to the weight multiplier should be damaged to zero. In practical calculations, the most important is the choice of pi-let d, - the error of measurement of the value of U ,. Then it is natural to require a smoothing spline to satisfy the condition or that the same, in the simplest case, the weights of PI can be set, for example, the form- where C is some sufficiently small constant. However, such a choice of scales P does not allow the "corridor", due to the errors of the values \u200b\u200bof y, -. A more rational, but more labor-intensive algorithm for determining the values \u200b\u200bof P, can look like this. If the magnitude of the value is found on the FCth iteration, it is believed where E is a small number, which is selected experimentally, taking into account the discharge mesh of the computer, the values \u200b\u200bof D, and the accuracy of solving a system of linear algebraic equations. If on the FCth iteration at the point I was impaired (6), then the last formula will reduce the corresponding weight coefficient R,. If then, in the next iteration, an increase in P leads to a more complete use of the "corridor" (6) and, ultimately, more smoothly changing the spline. A bit of theory A. The rationale for the formula for calculating the coefficients of interpolation cubic splines. We introduce the designations where M is unknown for now. Their number is M + 1. The spline recorded in the form where it satisfies the interpolation conditions and continuously on the entire interval [a, b \\: putting in the formula, respectively, it also has a continuous first derivative on the interval [A, 6]: Differentizing the relation (7) and putting, obtaining, respectively. . We show that the numbers T can be chosen so that the spline function (7) has a continuous second derivative on the segment [A, 6]. Calculate the second splice derivative on the interval: at point X, - 0 (at T \u003d 1) we have calculated on the interval of the second derivative of the spline at the point we have from the condition of continuity of the second derivative in the internal nodes of the grid A; We obtain M - 1 by the ratio where adding to these T - 1 the equations of two more, resulting in the boundary conditions, we obtain a system from M + 1 of the linear algebraic equation with T + I unknown MIY i \u003d 0, 1. ..., m. The system of equations for calculating the values \u200b\u200bof GS in the case of boundary conditions of the 1st and 2nd types has the form where (boundary conditions 1 -to type), (boundary conditions 2 -to type). For periodic boundary conditions (edge-type edge conditions) Mesh; Another node is lengthened and then the system is counted to determine the values \u200b\u200bof the GO * will be viewed to obtain a system of equations for determining the number of th, in the case of boundary conditions of the 4th type, we will find on the segment [third derivative of the spline (7) and we will require it continuity in the second and (go -!) - M nodes of the grid. We have from the last two relations we obtain the missing two equations that correspond to the edible conditions of 4 -to type: excluding an unknown GOO from equations, and from equations an unknown PC, as a result we obtain a system of equations, we note that the number of unknowns in this system is equal to I. 6. Justification of the formula for DM Calculation of YUEFFII who "smoothing the sub-flat spline. We introduce the notation where Zi and NJ are unknown so far. Their number is 2t + 2. Spline-Fucia, recorded in the form of continuous over the entire gap (A, 6]: putting in this formula, we will recommend that we will show that the numbers z, and n, you can select the spline written in the form ( 8), had a continuous first derivative in the interval [A, 6]. We calculate the first derivative of the spline s (x) on the interval: at point x ^ - 0 (at T \u003d 1) we have calculated the first product of the spline 5 (x) on the interval: At the point we have from the condition of continuity of the first production of the spline in the internal nodes of the grid and -\u003e we obtain M - 1, the relationship is conveniently written in the matrix form here the following notation also uses a spline on the interval [A, 6) has a continuous second derivative: inductaring The ratio (8) and putting, we obtain, respectively, Oly Olya, the matrix ratio is obtained from the condition of the minimum functional (4). We have two latter matrix equalities can be considered as a linear system 2T + 2 linear algebraic equations relative to 2T + 2 unknown. Replacing in the first equality of the column of its expression obtained from the ratio (9), we arrive at the matrix equation the theory of splines. Examples of solutions for determining the column M. This equation has a single decision due to the fact that the Matrix A + 6HRH7 is always nondegenerate. Finding, we define the city of Eameshin. The elements of the trold magal matrices A and H determinifying I only with the parameters of the mesh and (SS with the steps Hi) and do not depend on the values \u200b\u200bof y ^. Linear space of cubic spline functions Multi cubic splines constructed on a segment [A, 6) on a WCRA + L mesh node, is a linear dimension space T + 3: 1) the sum of two cubic splines, built on the grid and\u003e, and the product of the cubic spline built on the grid and\u003e, on an arbitrary number of secret are cubic splines built on this grid, 2) any cubic spline, built on the grid and from the node, is fully determined by the T + 1 value of the values \u200b\u200bof the values \u200b\u200bin these nodes and two boundary conditions - Total then + 3 parameters. By choosing the basis in this space, consisting of M + 3 linearly independent splines, we can write an arbitrary cubic spline A (x) as their linear combination with the only manner. Comment. Such a set of splines is widespread in computational practice. The basis is especially convenient, consisting of the so-called cubic-value (basic, or fundamental, splines). The use of D-splines makes it possible to significantly reduce the requirements for the volume of the computer's memory. L-splines. In the equipline degree constructed on the numeric straight on the grid, the function of the vilant of the walled degree K ^ i, built on the numerical straight line on the Mesh, is determined by the recurrence formula of the graphics in the first in, -1 "(g) and The second in \\ 7 \\ x) degrees are presented in Fig. 11 and 12, respectively. The on-spline of random degree can be different from zero only on a certain segment (defined to + 2 nodes). Cubic in-splines is more convenient to numbered so that the spline is more convenient to numbered so that the spline B, -3 * (I) was different from zero on the segment of Yag, - + 2]. We give the formula for the cubic splice of the third degree for the case of a uniform mesh (with a pitch). We have in other cases. Typical cubic graph in splines is presented In fig. 13. Loans *. Function a) Twice continuously differentiable on the segment, belong to the C2 class [A, "), to b) is excellent from zero only to four consecutive sections (supplement the grid with auxiliary nodes taken completely arbitrarily. By extended grid w * mo It is difficult to build a family from M + 3 cubic in-wear: This family is formed by the basis in the space of cubic splines on the segment (A, B]. Thus, an arbitrary cubic spline S (z), built on a segment | in, 6] a subsidiary of about; It is possible + 1 node, it can be represented by a naughter in the form of a linear combination with the conditions of the task of the FT coefficients, this decomposition is determined uniquely. ... in the case when values \u200b\u200bof * function are specified in the nodes of the mesh and the values \u200b\u200bof the o and ut of the first derivative of the function at the ends of the grid "(the problem of interpolation with the boundary conditions of the first kind), these coefficients are calculated from the next species system after exception b-I values And & M + I is a linear system with unknown 5q, ..., and three diajunal matrix. The condition provides a diagonal predominance and, it means that the method of applying the run method for its permission. 3Mmchmu 1. Linear systems of a similar species arise to LRN Consideration and other interpolation tasks. Zmmchnm * 2. Compared to the algorithms described in Skid 1.1, the use of I-spline in * interpolation tasks allows you to reduce * the amount of stored information, that is, to reduce the requirements for the memory of the computer, although it leads to an increase in the number of operations. The construction of splineer curves with the help of spline functions above was the arrays whose points were ranked so that their abscissa formed a strictly increasing sequence. For example, the case shown in Fig. 14, when different points of the array have the same abscissa, not allowed. This circumstance is determined and choosing the class of approximating curves (traffic traffic), and the way they are built. However, the proposed method allows sufficiently successfully to build an interpolation curve and in a more general case when the numbering of the points of the array and their location on the plane are usually not connected (Fig. 15). Moreover, by setting the task of constructing an interpolation curve, you can consider the specified array of non-plane m, that is, it is clear that to solve this common task it is necessary to significantly expand the class of permissive curves, including closed curves, and curves that have self-intersection points, and spatial curves. Such curves are conveniently described using parametric equations we will require. Additionally, that functions have sufficient smoothness, for example, belonged to C1 [A, / 0] class or class to find the parameter equations of the curve consistently passing through all the points of the array, are applied as follows. 1st step. On an arbitrarily taken segment)