# Interpolation, approximation and differential equations solvers

## Practical application of linear interpolation, least squares method, the Lagrange interpolation polynomial and cubic spline interpolation. Determination of the integral in the set boundaries in accordance with the rules of the rectangle and trapezoid.

 Рубрика Иностранные языки и языкознание Вид курсовая работа Язык английский Дата добавления 21.09.2010 Размер файла 207,7 K

### Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже

Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.

# Contents

• Problem 1
• 1.1 Problem definition
• 1.2 Solution of the problem
• 1.2.1 Linear interpolation
• 1.2.2 Method of least squares interpolation
• 1.2.3 Lagrange interpolating polynomial
• 1.2.4 Cubic spline interpolation
• 1.3 Results and discussion
• 1.3.1 Lagrange polynomial
• Problem 2
• 2.1 Problem definition
• 2.2 Problem solution
• 2.2.1 Rectangular method
• 2.2.2 Trapezoidal rule
• 2.2.3 Simpson's rule
• 2.2.4 Gauss-Legendre method and Gauss-Chebyshev method
• Problem 3
• 3.1 Problem definition
• 3.2 Problem solution
• Problem 4
• 4.1 Problem definition
• 4.2 Problem solution
• References

# Problem 1

## · Lagrange interpolating polynomial

Fig 1. Initial data points

· Cubic spline interpolation

### The method of least squares is an alternative to interpolation for fitting a function to a set of points. Unlike interpolation, it does not require the fitted function to intersect each point. The method of least squares is probably best known for its use in statistical regression, but it is used in many contexts unrelated to statistics.

Fig 2. Plot of the data with linear interpolation superimposed

Generally, if we have data points, there is exactly one polynomial of degree at most going through all the data points. The interpolation error is proportional to the distance between the data points to the power n. Furthermore, the interpolant is a polynomial and thus infinitely differentiable. So, we see that polynomial interpolation solves all the problems of linear interpolation.

However, polynomial interpolation also has some disadvantages. Calculating the interpolating polynomial is computationaly expensive compared to linear interpolation. Furthermore, polynomial interpolation may not be so exact after all, especially at the end points. These disadvantages can be avoided by using spline interpolation.

Example of construction of polynomial by least square method

Data is given by the table:

Polynomial is given by the model:

In order to find the optimal parameters the following substitution is being executed:

, , …,

Then:

The error function:

It is necessary to find parameters , which provide minimums to function :

It should be noted that the matrix must be nonsingular matrix.

For the given data points matrix become singular, and it makes impossible to construct polynomial with order, where - number of data points, so we will use polynomial

Fig 3. Plot of the data with polynomial interpolation superimposed

Because the polynomial is forced to intercept every point, it weaves up and down.

### When constructing interpolating polynomials, there is a tradeoff between having a better fit and having a smooth well-behaved fitting function. The more data points that are used in the interpolation, the higher the degree of the resulting polynomial, and therefore the greater oscillation it will exhibit between the data points. Therefore, a high-degree interpolation may be a poor predictor of the function between points, although the accuracy at the data points will be "perfect."

Fig 4. Plot of the data with Lagrange interpolating polynomial interpolation superimposed

One can see, that Lagrange polynomial has a lot of oscillations due to the high order if polynomial.

1.2.4 Cubic spline interpolation

Remember that linear interpolation uses a linear function for each of intervals . Spline interpolation uses low-degree polynomials in each of the intervals, and chooses the polynomial pieces such that they fit smoothly together. The resulting function is called a spline. For instance, the natural cubic spline is piecewise cubic and twice continuously differentiable. Furthermore, its second derivative is zero at the end points.

Like polynomial interpolation, spline interpolation incurs a smaller error than linear interpolation and the interpolant is smoother. However, the interpolant is easier to evaluate than the high-degree polynomials used in polynomial interpolation. It also does not suffer from Runge's phenomenon.

Fig 5. Plot of the data with Lagrange interpolating polynomial interpolation superimposed

It should be noted that cubic spline curve looks like metal ruler fixed in the nodal points, one can see that such interpolation method could not be used for modeling sudden data points jumps.

## The following results were obtained by employing described interpolation methods for the points ; ; :

Linear interpolation

Least squares interpolation

Lagrange polynomial

Cubic spline

Root mean square

0.148

0.209

0.015

0.14

0.146

0.678

0.664

0.612

0.641

0.649

1.569

1.649

1.479

1.562

1.566

Table 1. Results of interpolation by different methods in the given points.

In order to determine the best interpolation method for the current case should be constructed the table of deviation between interpolation results and root mean square, if number of interpolations methods increases then value of RMS become closer to the true value.

Linear interpolation

Least squares interpolation

Lagrange polynomial

Cubic spline

Average deviation from the RMS

Table 2. Table of Average deviation between average deviation and interpolation results.

One can see that cubic spline interpolation gives the best results among discussed methods, but it should be noted that sometimes cubic spline gives wrong interpolation, especially near the sudden function change. Also good interpolation results are provided by Linear interpolation method, but actually this method gives average values on each segment between values on it boundaries.

# 8. Burden, Richard L.; J. Douglas Faires (2000). Numerical Analysis (7th Ed. ed.). Brooks/Cole. ISBN 0-534-38216-9.

### Подобные документы

• Development of the calculation procedures. Initial values of liquid density and dynamic viscosity of crude oil-gas mixes components at 200C and 0.1 MPa. Chart of experimental conditions and properties of crude oil saturated with natural gas samples.

статья [78,1 K], добавлен 21.03.2012

• The linguistic status of the article. Noun: the category of determination. Indefinite meaning expressed by a/an. The definite article the. Cataphoric the as heavily concentrated in non-fiction writing. Percentage use of reference for definite phrases.

курсовая работа [357,9 K], добавлен 27.04.2015

• The process of scientific investigation. Contrastive Analysis. Statistical Methods of Analysis. Immediate Constituents Analysis. Distributional Analysis and Co-occurrence. Transformational Analysis. Method of Semantic Differential. Contextual Analysis.

реферат [26,5 K], добавлен 31.07.2008

• Concept of methods of research. Value of introduction of laboratory experiment and measurement in psychology. Supervision and experiment, their features. Methods of processing and interpretation of results of experiments. Rules of the conversation.

реферат [19,1 K], добавлен 31.10.2011

• Example of "simple linear progression". Additive. adversative. temporal textual connector. Anaphoric relations and their use in fairy tales. Major types of deictic markers: person deixis, place deixis, time deixis, textual deixis, social deixis.

творческая работа [300,8 K], добавлен 05.07.2011

• The Keynesian concept in economic of endogenous cycles seems to require non-linear structures. One of the theories of business cycles in the Keynesian vein is that expounded in a pioneering article by N. Kaldor. Non-linear dynamics of the Kaldor's cycle.

контрольная работа [233,8 K], добавлен 18.07.2009

• The fundamental rules for determining the correct form of a noun, pronoun and verb "to be" in English. Plural nouns in English. Spelling compositions "About myself". Translation of the text on "Our town". Сompilation questions to the italized words.

контрольная работа [19,9 K], добавлен 15.01.2014

• Principles of learning and language learning. Components of communicative competence. Differences between children and adults in language learning. The Direct Method as an important method of teaching speaking. Giving motivation to learn a language.

курсовая работа [66,2 K], добавлен 22.12.2011

• Wireless LANs will provide the first layer of connectivity between mobile users and the global information infrastructure. Wireless application design, data reduction, caching, active documents, dynamic URLs. Interworking units for wireless connectivity.

реферат [23,7 K], добавлен 07.10.2010

• Comparative teaching methodologies. Effective ways and techniques of teaching a foreign language. Role plays as a method of teaching. Comparative characteristics of modern techniques of teaching english. Grammar translation method. Communicative approach.

дипломная работа [71,9 K], добавлен 18.04.2015

Работы в архивах красиво оформлены согласно требованиям ВУЗов и содержат рисунки, диаграммы, формулы и т.д.
PPT, PPTX и PDF-файлы представлены только в архивах.
Рекомендуем скачать работу.