Metóda najmenších štvorcov pre aproximáciu dát pomocou systému Mathematica

Základy        

"BG1_rukovatstudenta_2.gif"

"BG1_rukovatstudenta_3.gif"

"BG1_rukovatstudenta_4.gif"

"BG1_rukovatstudenta_5.gif"

"BG1_rukovatstudenta_6.gif"

"BG1_rukovatstudenta_7.gif"

"BG1_rukovatstudenta_8.gif"

"BG1_rukovatstudenta_9.gif"

"BG1_rukovatstudenta_10.gif"

"BG1_rukovatstudenta_11.gif"

"BG1_rukovatstudenta_12.gif"

"BG1_rukovatstudenta_13.gif"

"BG1_rukovatstudenta_14.gif"

"BG1_rukovatstudenta_15.gif"

"BG1_rukovatstudenta_16.gif"

"BG1_rukovatstudenta_17.gif"

"BG1_rukovatstudenta_18.gif"

"BG1_rukovatstudenta_19.gif"

"BG1_rukovatstudenta_20.gif"

"BG1_rukovatstudenta_21.gif"

"BG1_rukovatstudenta_22.gif"

"BG1_rukovatstudenta_23.gif"

"BG1_rukovatstudenta_24.gif"

"BG1_rukovatstudenta_25.gif"

"BG1_rukovatstudenta_26.gif"

"BG1_rukovatstudenta_27.gif"

"BG1_rukovatstudenta_28.gif"

"BG1_rukovatstudenta_29.gif"

"BG1_rukovatstudenta_30.gif"

"BG1_rukovatstudenta_31.gif"

"BG1_rukovatstudenta_32.gif"

"BG1_rukovatstudenta_33.gif"

"BG1_rukovatstudenta_34.gif"

"BG1_rukovatstudenta_35.gif"

"BG1_rukovatstudenta_36.gif"

"BG1_rukovatstudenta_37.gif"

"BG1_rukovatstudenta_38.gif"

"BG1_rukovatstudenta_39.gif"

"BG1_rukovatstudenta_40.gif"

Záver:   Vypočítaná chyba "BG1_rukovatstudenta_41.gif" je evidentne veľká a je zrejmá aj zo zobrazených grafov oboch funkcií. Je preto potrebné nájsť aproximáciu polynómom vyššieho stupňa.

Príklad 2.  Vrátime sa k funkcii z predchádzajúceho príkladu 1:   a)  Nájdeme polynóm druhého stupňa, ktorý je najlepšou  aproximáciou pomocou LSM. b) Vyhodnotíme chybu aproximácie. c) Nájdeme približnú hodnotu  f(1.33).

"BG1_rukovatstudenta_42.gif"

"BG1_rukovatstudenta_43.gif"

"BG1_rukovatstudenta_44.gif"

"BG1_rukovatstudenta_45.gif"

"BG1_rukovatstudenta_46.gif"

"BG1_rukovatstudenta_47.gif"

"BG1_rukovatstudenta_48.gif"

"BG1_rukovatstudenta_49.gif"

"BG1_rukovatstudenta_50.gif"

"BG1_rukovatstudenta_51.gif"

"BG1_rukovatstudenta_52.gif"

"BG1_rukovatstudenta_53.gif"

"BG1_rukovatstudenta_54.gif"

"BG1_rukovatstudenta_55.gif"

"BG1_rukovatstudenta_56.gif"

"BG1_rukovatstudenta_57.gif"

"BG1_rukovatstudenta_58.gif"

"BG1_rukovatstudenta_59.gif"

"BG1_rukovatstudenta_60.gif"

"BG1_rukovatstudenta_61.gif"

"BG1_rukovatstudenta_62.gif"

"BG1_rukovatstudenta_63.gif"

Záver:   Získané chyby  "BG1_rukovatstudenta_64.gif" a aer asú evidentne ešte stále veľké, ale akceptovateľnejšie, ako v predchádzajúcej  aproximácii (porovnajte aj grafy oboch funkcií).  Nájdeme preto aproximáciu polynómom ešte vyššieho stupňa.

Príklad 3.  Opäť sa vrátime k funkcii z príkladu 1:   a) Nájdeme aproximačný polynóm piateho stupňa .b) Vyhodnotíme chybu  aproximácie.  c) Nájdeme približnú hodnotu funkcie  f(1.33).

"BG1_rukovatstudenta_65.gif"

"BG1_rukovatstudenta_66.gif"

"BG1_rukovatstudenta_67.gif"

"BG1_rukovatstudenta_68.gif"

"BG1_rukovatstudenta_69.gif"

"BG1_rukovatstudenta_70.gif"

"BG1_rukovatstudenta_71.gif"

"BG1_rukovatstudenta_72.gif"

"BG1_rukovatstudenta_73.gif"

"BG1_rukovatstudenta_74.gif"

"BG1_rukovatstudenta_75.gif"

"BG1_rukovatstudenta_76.gif"

"BG1_rukovatstudenta_77.gif"

"BG1_rukovatstudenta_78.gif"

"BG1_rukovatstudenta_79.gif"

"BG1_rukovatstudenta_80.gif"

"BG1_rukovatstudenta_81.gif"

Záver:   Získaná chyba "BG1_rukovatstudenta_82.gif" a absolútna chyba majú pomerne vyhovujúce hodnoty.

Príklad 4.  Zobrazte riešenia predchádzajúcich troch príkladov v jednom grafe.

"BG1_rukovatstudenta_83.gif"

"BG1_rukovatstudenta_84.gif"

"BG1_rukovatstudenta_85.gif"

"BG1_rukovatstudenta_86.gif"

Spikey Created with Wolfram Mathematica 6