Information Technology Reference
In-Depth Information
The quadratic least squares approximation of (
5.135
) is therefore given by
p.t/
D
0:100
0:004 t
C
0:957 t
2
:
5.3.4
Summary of the Examples
In the examples above we computed constant, linear and quadratic least squares
approximations of three given functions. Here we will give a summary and plot
these functions together with their approximations.
Function 1
Let
y.t/
D
sin.t /
be defined on 0
t
=2. Then the constant, linear and quadratic least squares
approximations are given by
p
0
.t /
0:637;
p
1
.t /
0:115
C
0:664 t;
p
2
.t /
0:024
C
1:196 t
0:338 t
2
;
respectively. All the functions are plotted in Fig.
5.18
.
Function 2
Let
y.t/
D
e
t
e
t
be defined on 0
t
1. Then the constant, linear, and quadratic least squares
approximations are given by
p
0
.t /
1:086;
p
1
.t /
0:070
C
2:312 t;
p
2
.t /
0:019
C
1:782 t
C
0:531 t
2
;
respectively, see Fig.
5.19
.