Piecewise Linear Interpolation | Numerical Analysis | With Example
Автор: Maths galaxy Era
Загружено: 2026-01-22
Просмотров: 19
Описание:
• Numerical Analysis
• Hermite interpolation in Numerical Analys...
Instead of constructing a single global polynomial that goes through all the points, one can construct local polynomials that are then connected together. In the the section following this one, we will discuss how this may be done using cubic polynomials. Here, we discuss the simpler case of linear polynomials. This is the default interpolation typically used when plotting data.
Suppose the interpolating function is y=g(x)y=g(x), and as previously, there are n+1n+1 points to interpolate. We construct the function g(x)g(x) out of nn local linear polynomials. We write
g(x)=gi(x), for xi≤x≤xi+1g(x)=gi(x), for xi≤x≤xi+1
where
gi(x)=ai(x−xi)+bigi(x)=ai(x−xi)+bi
and i=0,1,…,n−1i=0,1,…,n−1.
We now require y=gi(x)y=gi(x) to pass through the endpoints (xi,yi)(xi,yi) and (xi+1,yi+1)(xi+1,yi+1). We have
yiyi+1=bi=ai(xi+1−xi)+bi.yi=biyi+1=ai(xi+1−xi)+bi.
Therefore, the coefficients of gi(x)gi(x) are determined to be
ai=yi+1−yixi+1−xi,bi=yiai=yi+1−yixi+1−xi,bi=yi
Although piecewise linear interpolation is widely used, particularly in plotting routines, it suffers from a discontinuity in the derivative at each point. This results in a function which may not look smooth if the points are too widely spaced. We next consider a more challenging algorithm that uses cubic polynomials.
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: