przyklady_do_w2.pdf
(
201 KB
)
Pobierz
Tutorial 2
Instytut Automatyki Politechniki Łódzkiej - Metody Numeryczne ET3 przykłady do wykładu 2
Problem 1
Zmierzono poziom Morza Północnego w pewnym punkcie:
t [h]
0
2
4
6
8
10
h [m]
1,0
1,6
1,4
0,6
0,2
0,8
Pływ ma okres 12h.
Proszę aproksymować dane funkcją:
h
*
(
t
)
=
h
+
a
sin
2
π
+
t
a
cos
2
π
t
0
1
12
2
12
rozwiązując liniowe zadanie aproksymacji średniokwadratowej. (Nie jest
możliwe rozwiązanie tego zdania dla funkcji
h
t
)
=
h
+
A
sin
2
π
(
t
−
t
0
)
,
0
12
do której nie wszystkie parametry wchodzą liniowo.
()
1
t
0
2
4
6
8
10
ϕ
0
t
=
1
1
1
1
1
1
sin
0
sin
π
sin
2π
π
sin
sin
4π
sin
5π
2
π
t
3
3
3
3
()
ϕ =
t
sin
1
12
3
3
3
3
0
0
−
−
2
2
2
2
π
2π
4π
5π
cos
0
cos
cos
π
cos
cos
cos
2
π
t
3
3
3
3
()
ϕ =
t
cos
2
12
1
1
1
1
1
−
-1
−
2
2
2
2
h
()
1,0
1,6
1,4
0,6
0,2
0,8
ϕ
0
,
ϕ
1
=
0
ϕ
0
,
ϕ
2
=
0
ϕ
1
,
ϕ
2
=
0
⎡
1
⎤
⎢
⎥
⎢
1
⎥
⎢
1
⎥
ϕ
,
ϕ
=
[
1
1
1
1
1
1
]
=
1
+
1
+
1
+
1
+
1
+
1
=
6
⎢
⎥
0
0
1
⎢
⎥
⎢
1
⎥
⎢
⎥
⎣
1
⎦
PW2 1
t
Instytut Automatyki Politechniki Łódzkiej - Metody Numeryczne ET3 przykłady do wykładu 2
⎡
0
⎤
3
⎢
⎥
2
⎢
⎥
3
⎢
⎥
⎡
3
3
3
3
⎤
3
3
3
3
⎢
2
⎥
ϕ
,
1
ϕ
=
⎣
0
0
−
−
⎦
=
0
+
+
+
0
+
+
=
3
⎢
⎥
1
2
2
2
2
0
4
4
4
4
⎢
3
⎥
⎢
−
⎥
2
⎢
⎥
3
⎢
⎥
−
⎢
⎥
⎣
2
⎦
⎡
1
⎤
⎢
⎥
⎢
⎥
2
⎢
1
⎥
⎢
−
⎥
⎡
1
1
1
1
⎤
2
1
1
1
1
ϕ
,
2
ϕ
=
1
−
−
1
−
⎢
⎥
=
1
+
+
+
1
+
+
=
3
⎣
⎦
−
1
2
2
2
2
2
⎢
⎥
4
4
4
4
⎢
−
⎥
⎢
2
⎥
⎢
1
⎥
⎢
⎥
⎣
2
⎦
⎡
1
⎤
⎢
⎥
⎢
1
⎥
⎢
1
4
⎥
ϕ
,
h
=
[
1
1
1
1
1
1
]
⎢
⎥
=
1
+
1
+
1
4
+
0
+
0
2
+
0
=
5
0
0
⎢
⎥
⎢
0
2
⎥
⎢
⎥
⎣
0
⎦
⎡
1
⎤
⎢
1
⎥
⎡
3
3
3
3
⎤
⎢
1
4
⎥
ϕ
,
h
=
⎣
0
0
−
−
⎦
⎢
⎥
=
1
2
2
2
2
0
⎢
⎥
⎢
⎥
0
2
⎢
⎥
⎣
0
⎦
=
0
+
1
⋅
3
+
1
4
⋅
3
+
0
−
0
2
⋅
3
−
0
⋅
3
=
3
2
2
2
2
⎡
1
⎤
⎢
⎥
⎢
1
⎥
⎢
1
4
⎥
ϕ
,
h
=
⎡
1
1
−
1
−
1
−
1
1
⎤
⎢
⎥
=
1
+
0
−
0
−
0
−
0
+
0
4
=
0
⎣
⎦
2
2
2
2
2
0
⎢
⎥
⎢
0
2
⎥
⎢
⎥
⎣
0
⎦
Układ równań normalnych redukuje się do:
PW2 2
⎢
⎥
1
⎢
⎥
Instytut Automatyki Politechniki Łódzkiej - Metody Numeryczne ET3 przykłady do wykładu 2
⎪
⎨
ϕ
0
,
ϕ
0
h
0
=
ϕ
0
,
h
ϕ
1
,
ϕ
1
a
1
=
ϕ
1
,
h
⎪
⎩
ϕ
2
,
ϕ
2
a
2
=
ϕ
2
,
h
⎡
6
h
0
⎤
⎡
5
,
6
⎤
⎡
h
0
⎤
⎡
0
,
933
⎤
⎢
⎥
⎢
⎥
⎢
⎥
⎢
⎥
3
a
=
3
a
=
0
,
577
⎢
1
⎥
⎢
⎥
⎢
1
⎥
⎢
⎥
⎢
3
a
⎥
⎢
0
8
⎥
⎢
a
⎥
⎢
0
,
267
⎥
⎣
2
⎦
⎣
⎦
⎣
2
⎦
⎣
⎦
h
*
(
t
)
=
0
933
+
0
577
sin
2
π
+
t
0
267
cos
2
π
t
12
12
Problem 2
Rozwiaż liniowe zadanie aproksymacji średniokwadratowej danych z tabeli
funkcją
f
*
(
x
)
=
c
0
+
c
1
x
:
x
1
3
4
6
7
f(x)
-2,1
()
()
x
-0,9
-0,6
0,6
0,9
Funkcje bazowe:
ϕ
0
x
=
1
. Współczynniki wag =1.
ϕ
x
=
1
Układ równań normalnych
⎡
ϕ
0
,
ϕ
0
ϕ
0
,
ϕ
1
⎤
⎡
c
0
⎤
⎡
ϕ
0
,
f
⎤
⎢
⎣
⎥
⎦
=
⎢
⎣
⎥
⎦
⎣
⎦
⎢
ϕ
,
ϕ
ϕ
ϕ
⎥
c
⎢
ϕ
,
f
⎥
1
0
1
1
1
1
⎡
1
⎤
⎢
1
⎥
ϕ
,
ϕ
=
1
1
1
1
1
]
⎢
⎥
=
1
+
1
+
1
+
1
+
1
=
5
1
0
0
⎢
⎥
⎢
1
⎥
⎢
1
⎥
⎣
⎦
⎡
1
⎤
⎢
3
⎥
ϕ
,
ϕ
=
[
1
1
1
1
1
]
⎢
⎥
=
1
+
3
+
4
+
6
+
7
=
21
4
0
1
⎢
⎥
⎢
6
⎥
⎢
7
⎥
⎣
⎦
PW2 3
⎧
,
,
⎢
⎥
[
⎢
⎥
Instytut Automatyki Politechniki Łódzkiej - Metody Numeryczne ET3 przykłady do wykładu 2
⎡
1
⎤
⎢
3
⎥
ϕ
,
ϕ
=
1
3
4
6
7
]
⎢
4
⎥
=
1
+
9
+
16
+
36
+
49
=
111
1
1
⎢
⎥
⎢
6
⎥
⎢
7
⎥
⎣
⎦
⎡
−
2
,
1
⎤
⎢
⎥
⎢
−
0
,
9
⎥
ϕ
,
f
=
[
1
1
1
1
1
]
⎢
−
0
,
6
⎥
=
−
2
1
−
0
,
9
−
0
6
+
0
,
6
+
0
,
9
=
−
2
1
0
⎢
⎥
⎢
0
,
6
⎥
⎢
0
,
9
⎥
⎣
⎦
⎡
−
2
,
1
⎤
⎢
⎥
⎢
−
0
,
9
⎥
ϕ
,
f
=
1
3
4
6
7
]
⎢
−
0
,
6
⎥
=
−
2
,
1
−
2
,
7
−
2
,
4
+
3
,
6
+
6
,
3
=
2
,
7
1
⎢
⎥
⎢
0
,
6
⎥
⎢
0
,
9
⎥
⎣
⎦
⎡
5
21
⎤
⎡
c
0
⎤
=
⎡
−
2
1
⎤
⎡
c
0
⎤
=
1
⎡
111
−
21
⎤
⎡
−
2
,
1
⎤
⎣
⎦
⎣
⎦
⎣
⎦
⎣
⎦
⎣
⎦
⎣
⎦
21
111
c
2
,
7
c
555
−
441
−
21
5
2
7
1
1
( ) ( )
( ) ( )
⎡
c
0
⎤
=
1
⎡
111
⋅
−
2
,
1
+
−
21
⋅
2
7
⎤
=
1
⎡
289
8
⎤
=
⎡
−
2
,
5421
⎤
⎣
⎦
⎣
⎦
⎣
⎦
⎣
⎦
c
114
−
21
⋅
−
2
,
1
+
5
⋅
2
,
7
114
57
,
6
0
,
5053
1
f
*
(
x
)
=
−
2 +
,
5421
0
,
5053
x
Problem 3
Znajdź wielomian interpolacyjny stosując
• Wzór Lagrange’a
• Metodę rodziny trójkatnej
i
0
1
2
3
x
i
-2
1
2
4
y
i
3
1
-3
8
PW2 4
⎢
⎥
[
,
,
,
[
,
,
,
,
Instytut Automatyki Politechniki Łódzkiej - Metody Numeryczne ET3 przykłady do wykładu 2
Ze wzoru Lagrangea dla n = 3:
()
x
=
y
( )( )( )
( )( )( )
x
−
x
1
x
−
x
2
x
−
x
3
+
y
( )( )( )
( )
( )
( )
x
−
x
0
x
−
x
2
x
−
x
3
+
y
( )( )( )
( )
( )
( )
x
−
x
0
x
−
x
1
x
−
x
3
+
0
x
−
x
x
−
x
x
−
x
1
x
−
x
x
−
x
x
−
x
2
x
−
x
x
−
x
x
−
x
0
1
0
2
0
3
1
0
1
2
1
3
2
0
2
1
2
3
( )( )( )
( )( )( )
( )( )( )
( )( )( )
+
y
x
−
x
0
x
−
x
1
x
−
x
2
=
3
x
−
x
x
−
x
x
−
x
2
0
2
1
2
2
( )( )( )
( )( )( )
( )( )( )
( )( )( )
( )( )( )
( )( )( )
=
3
x
−
1
x
−
2
x
−
4
+
1
x
+
2
x
−
2
x
−
4
−
3
x
+
2
x
−
1
x
−
4
+
8
x
+
2
x
−
1
x
−
2
=
−
2
−
1
−
2
−
2
−
2
−
4
1
+
2
1
−
2
1
−
4
2
+
2
2
−
1
2
−
4
4
+
2
4
−
1
4
−
2
=
−
1
(
x
3
−
7
x
2
+
14
x
−
8
) (
+
1
x
3
−
4
x
2
−
4
x
+
16
) (
+
3
x
3
−
3
x
2
−
6
x
+
8
) (
+
2
x
3
−
x
2
−
4
x
+
4
)
=
24
9
8
9
=
2
x
3
−
3
x
2
−
25
x
+
6
3
2
6
Metodą rodziny trójkątnej:
c
0
=
p
()
()
( )
x
0
=
3
c
=
p
x
1
−
c
0
=
1
−
3
=
−
2
1
x
−
x
1
+
2
3
1
0
( )
( )( )
( ) ( ) ( )( )
( )( )( )
() ( )
( )( )
−
3
−
3
+
2
2
+
2
p
x
−
c
−
c
x
−
x
5
3
c
=
2
0
1
2
0
=
=
−
2
x
−
x
x
−
x
2
+
2
2
−
1
6
2
0
2
1
c
=
p
x
3
−
c
0
−
c
1
x
3
−
x
0
−
c
2
x
3
−
x
0
x
3
−
x
1
=
3
x
−
x
x
−
x
x
−
x
3
0
3
1
3
2
8
−
3
+
( ) ( )( )
( )( )( )
3
2
4
+
2
+
5
4
+
2
4
−
1
2
3
6
=
=
4
+
2
4
−
1
4
−
2
Po podstawieniu współczynników
c
do
p(x)
dostajemy:
p
() ( ) ( )( ) ( )( )( )
x
=
c
0
+
c
1
x
−
x
0
+
c
2
x
−
x
0
x
−
x
1
+
c
3
x
−
x
0
x
−
x
1
x
−
x
2
=
=
3
−
2
( ) ( )( ) ( )( )( )
x
+
2
−
5
x
+
2
x
−
1
+
2
x
+
2
x
−
1
x
−
2
=
3
6
3
=
3
−
2
x
−
4
−
5
( ) (
x
2
+
x
−
2
+
2
x
3
−
x
2
−
4
x
+
4
)
=
3
3
6
3
=
2
x
3
−
3
x
2
−
25
x
+
6
3
2
6
Problem 4
Oblicz metodą Hornera wartość
()
p
x
=
2
x
3
−
3
x
2
−
25
x
+
6
dla x=1 .:
3
2
6
P
(
x
)
=
a
x
3
+
a
x
2
+
a
x
+
a
=
0
1
2
3
(
( )
)
=
a
0
x
+
a
1
x
+
a
2
x
+
a
3
b
0
=a
0
a
1
a
2
a
3
+x b
0
+x b
1
+x b
2
PW2 5
W
n
Plik z chomika:
Esme1991
Inne pliki z tego folderu:
Jankowscy - Przegląd metod i algorytmów numerycznych.rar
(52434 KB)
Jankowscy M. i J. - Przeglad Metod I Algorytmow Numerycznych Cz. 1.pdf
(15513 KB)
MathCad demo.pdf
(257 KB)
laborki1.rar
(444 KB)
przyklady_do_w4.pdf
(121 KB)
Inne foldery tego chomika:
elektrotechnika
Informatyka
matematyka
metrologia
Zgłoś jeśli
naruszono regulamin