APPLICATION OF THE HAAR AND B-SPLINE WAVELETS TO APPROXIMATE SOLUTION OF THE BOUNDARY PROBLEMS

Podobne dokumenty
Hard-Margin Support Vector Machines

Weronika Mysliwiec, klasa 8W, rok szkolny 2018/2019

ZASTOSOWANIE SPLOTU FUNKCJI DO OPISU WŁASNOŚCI NIEZAWODNOŚCIOWYCH UKŁADÓW Z REZERWOWANIEM

ANALIZA WŁAŚCIWOŚCI FILTRU PARAMETRYCZNEGO I RZĘDU

Helena Boguta, klasa 8W, rok szkolny 2018/2019

Knovel Math: Jakość produktu

Linear Classification and Logistic Regression. Pascal Fua IC-CVLab

Z-ZIP Równania Różniczkowe. Differential Equations

Zwyczajne równania różniczkowe (ZRR) Metody Runge go-ku/y

DUAL SIMILARITY OF VOLTAGE TO CURRENT AND CURRENT TO VOLTAGE TRANSFER FUNCTION OF HYBRID ACTIVE TWO- PORTS WITH CONVERSION

ZASTOSOWANIE SPLOTU FUNKCJI DO OPISU WŁASNOŚCI NIEZAWODNOŚCIOWYCH UKŁADÓW Z REZERWOWANIEM

EXAMPLES OF CABRI GEOMETRE II APPLICATION IN GEOMETRIC SCIENTIFIC RESEARCH

WAVELET TRANSFORM OF SELECTED SIMULATION SIGNALS USING DETAILS AS INFORMATION SOURCE

R E P R E S E N T A T I O N S

y = The Chain Rule Show all work. No calculator unless otherwise stated. If asked to Explain your answer, write in complete sentences.

Revenue Maximization. Sept. 25, 2018

Krytyczne czynniki sukcesu w zarządzaniu projektami

LOKALNA APROKSYMACJA POCHODNYCH Z UŻYCIEM NIEREGULARNIE ROZMIESZCZONYCH WĘZŁÓW LOCAL APPROXIMATION OF DERIVATIVES USING SCATTERED NODES

WYKORZYSTANIE SYSTEMU Mathematica DO ROZWIĄZYWANIA ZAGADNIEŃ PRZEWODZENIA CIEPŁA

Aerodynamics I Compressible flow past an airfoil

RESONANCE OF TORSIONAL VIBRATION OF SHAFTS COUPLED BY MECHANISMS

Zastosowania metod analitycznej złożoności obliczeniowej do przetwarzania sygnałów cyfrowych oraz w metodach numerycznych teorii aproksymacji

General Certificate of Education Ordinary Level ADDITIONAL MATHEMATICS 4037/12

Proposal of thesis topic for mgr in. (MSE) programme in Telecommunications and Computer Science

Fig 5 Spectrograms of the original signal (top) extracted shaft-related GAD components (middle) and

Tadeusz SZKODNY. POLITECHNIKA ŚLĄSKA ZESZYTY NAUKOWE Nr 1647 MODELOWANIE I SYMULACJA RUCHU MANIPULATORÓW ROBOTÓW PRZEMYSŁOWYCH

QUANTITATIVE AND QUALITATIVE CHARACTERISTICS OF FINGERPRINT BIOMETRIC TEMPLATES

Towards Stability Analysis of Data Transport Mechanisms: a Fluid Model and an Application

Machine Learning for Data Science (CS4786) Lecture 11. Spectral Embedding + Clustering

A sufficient condition of regularity for axially symmetric solutions to the Navier-Stokes equations

Convolution semigroups with linear Jacobi parameters

TTIC 31210: Advanced Natural Language Processing. Kevin Gimpel Spring Lecture 9: Inference in Structured Prediction

ANALIZA TRÓJELEMENTOWEGO OBWODU MEMRYSTOROWEGO NIECAŁKOWITEGO RZĘDU

Rozpoznawanie twarzy metodą PCA Michał Bereta 1. Testowanie statystycznej istotności różnic między jakością klasyfikatorów

Matematyka Stosowana na Politechnice Wrocławskiej. Komitet Matematyki PAN, luty 2017 r.

PORTFOLIO Próbki tekstu składanego systemem L A TEX

STANISŁAW KĘPIŃSKI ( ) AND HIS PAPERS IN THE FIELD OF DIFFERENTIAL EQUATIONS

Liczbę 29 możemy zaprezentować na siedem różnych sposobów:

Twierdzenie Hilberta o nieujemnie określonych formach ternarnych stopnia 4

Wyk lad z Algebry Liniowej dla studentów WNE UW. Rok akademicki 2017/2018. Przyk lady zadań na ćwiczenia. 1. Które z cia

APPLICATION OF THE CLONAL SELECTION ALGORITHM FOR RECONSTRUCTION OF THE THIRD KIND BOUNDARY CONDITION

Matematyka 3. Suma szeregu. Promień zbieżności szeregu. Przykład 1: Przykład 2: GenerateConditions

PORÓWNANIE WYBRANYCH SCHEMATÓW RÓŻNICO- WYCH NA PRZYKŁADZIE RÓWNANIA SELECTED DIFFERENTIAL SCHEMES COMPARISON BY MEANS OF THE EQUATION

Karpacz, plan miasta 1:10 000: Panorama Karkonoszy, mapa szlakow turystycznych (Polish Edition)

Latent Dirichlet Allocation Models and their Evaluation IT for Practice 2016

II wariant dwie skale ocen II alternative two grading scales

Instrukcja obsługi User s manual

KONSPEKT DO LEKCJI MATEMATYKI W KLASIE 3 POLO/ A LAYER FOR CLASS 3 POLO MATHEMATICS

Zakopane, plan miasta: Skala ok. 1: = City map (Polish Edition)

2017 R. Robert Gajewski: Mathcad Prime 4. Solution of examples Rozwiązania przykładów

The Lorenz System and Chaos in Nonlinear DEs

Stany związane. Andrzej Baran 18 stycznia 2017 UMCS

Innowacje społeczne innowacyjne instrumenty polityki społecznej w projektach finansowanych ze środków Europejskiego Funduszu Społecznego

I. KARTA PRZEDMIOTU CEL PRZEDMIOTU

H γ0 - the standard enthalpy of g phase. H β γ - the transition enthalpy of b to g

PRZEWODNIK PO PRZEDMIOCIE. Negotiation techniques. Management. Stationary. II degree

Selection of controller parameters Strojenie regulatorów

DOBÓR FUNKCJI WŁASNEJ PRZEMIESZCZENIA UKŁADÓW DRGAJĄCYCH GIĘTNIE W RUCHU UNOSZENIA

MODEL RACHUNKU OPERATORÓW DLA RÓŻ NICY WSTECZNEJ PRZY PODSTAWACH

MaPlan Sp. z O.O. Click here if your download doesn"t start automatically

A Zadanie

Zdzisław Kamont ( )

Nauka Przyroda Technologie

1 Wartości własne oraz wektory własne macierzy

INSPECTION METHODS FOR QUALITY CONTROL OF FIBRE METAL LAMINATES IN AEROSPACE COMPONENTS

Zaawansowane metody programowania. Algorytmy

P R A C A D Y P L O M O W A

OPTYMALIZACJA PUBLICZNEGO TRANSPORTU ZBIOROWEGO W GMINIE ŚRODA WIELKOPOLSKA

OPISYWANIE IZOTERM SORPCJI WYBRANYMI RÓWNANIAMI Z WYKORZYSTANIEM PROGRAMU EXCEL

OpenPoland.net API Documentation

Gradient Coding using the Stochastic Block Model

Machine Learning for Data Science (CS4786) Lecture11. Random Projections & Canonical Correlation Analysis

Wojewodztwo Koszalinskie: Obiekty i walory krajoznawcze (Inwentaryzacja krajoznawcza Polski) (Polish Edition)

Modelowanie zagadnień cieplnych: analiza porównawcza wyników programów ZSoil i AnsysFluent

Cracow University of Economics Poland

Metody numeryczne rozwiązywania równań różniczkowych

The Overview of Civilian Applications of Airborne SAR Systems

harmonic functions and the chromatic polynomial

PRZYKŁAD ZASTOSOWANIA DOKŁADNEGO NIEPARAMETRYCZNEGO PRZEDZIAŁU UFNOŚCI DLA VaR. Wojciech Zieliński

Inverse problems - Introduction - Probabilistic approach

WYZNACZANIE KOSZTÓW TRANSPORTU Z WYKORZYSTANIEM OCTAVE 3.4.3

tum.de/fall2018/ in2357

TRANSFORMATA FALKOWA WYBRANYCH SYGNAŁÓW SYMULACYJNYCH

Uniwersytet Rzeszowski

APROKSYMACJA DANYCH RÓŻNYMI FUNKCJAMI PRZY OBLICZENIACH DEFORMACJI TERENU

NIEPEWNOŚĆ POMIARÓW POZIOMU MOCY AKUSTYCZNEJ WEDŁUG ZNOWELIZOWANEJ SERII NORM PN-EN ISO 3740

ZASTOSOWANIE RACHUNKU UŁAMKOWEGO RZĘDU DO MODELOWANIA PEWNEJ KLASY GENERATORÓW NIELINIOWYCH

PRACA DYPLOMOWA Magisterska

PROGRAMOWANIE DYNAMICZNE W ROZMYTYM OTOCZENIU DO STEROWANIA STATKIEM

Opis Przedmiotu Zamówienia oraz kryteria oceny ofert. Część nr 8

Discretization of continuous signals (M 19) Dyskretyzacja sygnałów ciągłych

Warsztaty Ocena wiarygodności badania z randomizacją

Wykaz linii kolejowych, które są wyposażone w urządzenia systemu ETCS

Szybka wielobiegunowa metoda elementów brzegowych w analizie układów liniowosprężystych

deep learning for NLP (5 lectures)

METODA MACIERZOWA OBLICZANIA OBWODÓW PRĄDU PRZEMIENNEGO

XII International PhD Workshop OWD 2010, October Metodyka pozyskiwania i analizy wyników badań symulacyjnych ścieżek klinicznych

Few-fermion thermometry

Ankiety Nowe funkcje! Pomoc Twoje konto Wyloguj. BIODIVERSITY OF RIVERS: Survey to students

PROCEEDINGS OF THE INSTITUTE OF VEHICLES 5(109)/2016

Transkrypt:

ZESZYTY NAUKOWE POLITECHNIKI ŚLĄSKIEJ 2011 Seria: MATEMATYKA STOSOWANA z. 1 Nr kol. 1854 Anna KORCZAK Institute of Mathematics Silesian University of Technology APPLICATION OF THE HAAR AND B-SPLINE WAVELETS TO APPROXIMATE SOLUTION OF THE BOUNDARY PROBLEMS Summary. This paper presents an application of the wavelet theory to function approximation and to approximate solutions of chosen differentialequations.thereareconsideredthefunctionsofclassl 2 (R)andthe first and the second order linear differential equations in interval[0, 1] with appropriate boundary conditions. Haar wavelet and linear B-spline wavelet were applied to approximate these functions and solving these problem. ZASTOSOWANIE FALEK HAARA I B-SPLAJNOWEJ W PRZYBLIŻONYM ROZWIĄZYWANIU ZAGADNIEŃ BRZEGOWYCH Streszczenie. W artykule przedstawiono zastosowanie teorii falek w aproksymacji funkcji oraz w aproksymacji rozwiązań wybranych równań różniczkowych.rozważanesąrównieżfunkcjeklasyl 2 (R)orazrównania różniczkowe liniowe rzędów pierwszego i drugiego, określone na przedziale [0, 1], z odpowiednimi warunkami brzegowymi. Do aproksymacji wyżej wymienionych funkcji oraz równań zostały zastosowane falka Haara oraz falka B-splajnowa liniowa. 2010 Mathematics Subject Classification: 80M99, 65M99. Wpłynęło do Redakcji(received): 05.07.2011 r.

150 A. Korczak 1. Introduction Wavelettheoryisarespectivelynewfieldofmathematics.Ithasbeenveryintensively developed since eighties and is promising in usage to various applications. Wavelets find an application in many different problems like analyzing acoustic emission pulses[1], technical diagnostics[4], local images filtering[6], finite elements method[3]. Their popularity is caused by the combination of theoretical and applied mathematics represented by this approach. WaveletisakindoffunctionΨ(x) L 2 (R)suchthattheset B Ψ ={2 j/2 Ψ(2 j x k);j Z,k Z} (1) isabaseinspacel 2 (R)[2].FamillyB Ψ iscalledthewaveletbase. Previousdefinitionimpliesthatanyfunctionf(x) L 2 (R)canbeshowedas linearcombinationofbasefunctionsψ jk =2 j/2 Ψ(2 j x k)(ifψisawavelet). Thatmeansthatfunctionfcanbewrittenasthefollowingseries f(x)= f jk Ψ jk (x), (2) j Zk Z wheref jk arethefouriercoefficientsdefinedasfollows f jk = f(x),ψ jk (x) = f(x)ψ jk (x)dx. 2. Haar wavelet ThesimplestexampleofwaveletistheHaarwaveletwhichisdefinedasfollows 1, x [0, 1 2 ), H(x)= 1, x [ 1 2,1), 0, x/ [0,1). Function H(x) is connected with the set B H ={2 j/2 H(2 j k);j Z,k Z}. (3) FunctionsH jk (x) B H (forfixedjandk)havetheform 2 j/2, x [k2 j,(k+ 1 2 )2 j ), H jk (x)= 2 j/2, x [(k+ 1 2 )2 j,(k+1)2 j ), 0, x/ [k2 j,(k+1)2 j ). (4)

Application of the Haar and B-spline wavelets... 151 ThesupportoffunctionH jk (x)istheinterval supph jk (x)= [ k2 j,(k+1)2 j]. (5) BasicpropertyoftheHaarwaveletistheorthogonalityofbaseH jk H j1k 1,H j2k 2 =0 for j 1 j 2 k 1 k 2. (6) AnyfunctionH jk isobtainedbytranslatingandscalingofthehaarwavelet. 2.1. Haar wavelet approximation Function f(x) belonging to the appropriate function space can be approximatedbyusingthehaarwaveletandthebaseb H associatedwithit. Weapproximatefunctionfonlyininterval[ 2 m,2 m ],outofitwetake value0.moreover,wedefinethevaluer Z,whichisthemaximumapproximation (resolution) level of function f. Forfixedmandrtheapproximationoffunctionfisasfollows f(x)=f m (x)+ r j=m 2 j m 1 k= 2 j m f jk H jk (x). (7) where,forj<m,wehave f m (x)= 2 m 2 m 0 f(x)dx, x [ 2 m,0), 0 2 m f(x)dx, x [0,2 m ). 2 m Example 2.1 In this example, we will approximate function f(x), defined as follows { sinx+0.5, x [0,1), f(x)= 0, x/ [0,1). Functionf(x)istheelementofspaceL 2 (R)andcanbeapproximatedbyusing the Haar wavelet. Forthefollowingapproximationlevels:r=1,2,3,4,Figure1illustratesthe comparisons of function f(x) and its approximations. Whereas, the error of approximationsforlevels:r=1,2,3,4,aredisplayedinfigure2.basingonthe

152 A. Korczak r=1 r=2 1.2 1.2 1.0 1.0 0.6 0.6 0.4 0.4 r=3 0.4 0.6 1.0 r=4 0.4 0.6 1.0 1.2 1.2 1.0 1.0 0.6 0.6 0.4 0.4 0.4 0.6 1.0 0.4 0.6 1.0 Fig. 1. Comparison of function f(x) and its approximations Rys. 1. Porównanie przebiegu funkcji f(x) i jej aproksymacji presented diagrams we can say that the increase of approximation level causes the double decrease of the approximation error. Calculatingtheapproximationerrorinpointsx i = i 10 fori=0,1,2,...,10 the efficiency of function approximation can be compared for different wavelets. Errorsinpointsx i forthehaarwaveletareshownintable1. WaveletbaseB H givesanopportunitytoapproximatethesolutionsoflinear differential equations. We consider differential equation of the form forx [0,1],withtheinitialcondition y +f(x)y=g(x), (8) y(0)=y 0, wheretheunknownfunctiony=y(x)andthegivenfunctionsf(x)ig(x)belong totheappropriateclassin[0,1].byusingwaveletbaseb H wearelookingforthe solution having the following form ỹ r (x)=a+ r 2 j 1 j=0k=0 a jk H jk (x), (9)

Application of the Haar and B-spline wavelets... 153 r=1 r=2 0.08 0.04 0.06 0.03 0.04 0.02 0.02 0.01 r=3 0.4 0.6 1.0 r=4 0.4 0.6 1.0 0.020 0.010 0.015 0.008 0.010 0.005 0.4 0.6 1.0 0.4 0.6 1.0 Fig. 2. Error of the function approximation Rys. 2. Błąd aproksymacji funkcji Functionỹ r dependsonparametersaanda jk,whichareunknownandneedto befound.thisfunctionisconstantineachofintervals [ i2 r 1,(i+1)2 r 1), i=0,...,2 r+1 1[2]. Example 2.2 ByusingthewaveletbaseB H wewillfindtheapproximatesolutionofthe following differential equation of the first order y (x)+y(x)=x 2 sinx, x [0,1], (10) with initial condition y(0)=1. Exact solution of this equation is the following y(x)= 1 2 e x ( 3+e x cosx 2e x xcosx+e x x 2 cosx+e x sinx e x x 2 sinx).(11)

154 A. Korczak Table 1 Function approximation error x i r=1 r=2 r=3 r=4 0 0.025 0.12 0.06 0.03 0.1 0.04 0.06 0.01 0.02 0.11 0.02 0.03 0.3 0.09 0.01 0.02 0.4 0.03 0.04 0.01 0.5 0.11 0.05 0.03 0.01 0.6 0.02 0.03 0.005 0.007 0.7 0.05 0.009 0.01 0.04 0.007 0.01 0.9 0.01 0.02 0.003 0.005 1.0 0.06 0.03 0.01 By using described algorithm of finding approximate solution we obtain the approximate solution in points x i =(i+ 1 2 )2 r 1 fori=0,...,2 r+1 1. Forthefollowingapproximationlevels:r=1,2,3,4,Figure3illustratescomparison of the exact solution of considered problem and its approximations. Whereas, the approximation errors for these levels are illustrated in Figure 4. Basing on the presented diagrams we can say that the increase of approximation level causes the decrease of approximation error. InthenextexampleofwaveletbaseB H applicationthreeboundaryproblems for linear differential equation of the second order will be considered. Let us consider the equation y (x)+f(x)y (x)+g(x)y(x)=h(x), x [0,1], (12) with the following boundary conditions: { y(0)=y 0, y (0)=y 0, (13)

Application of the Haar and B-spline wavelets... 155 r=1 r=2 5 0.9 0 0.75 0.70 0.65 0.7 0.60 0.4 0.6 1.0 r=3 0.4 0.6 1.0 r=4 0.9 0.9 0.7 0.7 0.4 0.6 1.0 0.4 0.6 1.0 Fig. 3. Comparison of the exact and approximate solution of differential equation(10) Rys. 3. Porównanie przebiegu rozwiązania dokładnego równania różniczkowego i jego aproksymacji(10) { { y(0)=y 0, y(1)=y 1, y (0)=y 0, y(1)=y 1. (14) (15) Theunknownfunctiony=y(x)andthegivenfunctionsf(x),g(x)ih(x)belong to the appropriate class. Solutionofthisproblemissoughtasthesum(9).Similarlylikeincaseofthe firstorderequationtheunknownelementsareaanda jk. Example 2.3 ByusingthewaveletbaseB H wewillfindtheapproximatesolutionofthe following linear differential equation of the second order y (x)+y(x)= cosxe x, x [0,1], (16)

156 A. Korczak r=1 0.06 r=2 0.030 0.05 0.025 0.04 0.020 0.03 0.015 0.02 0.010 0.01 0.005 r=3 0.015 0.4 0.6 1.0 r=4 0.4 0.6 1.0 0.010 0.005 0.4 0.6 1.0 0.4 0.6 1.0 Fig. 4. Error of approximate solution of differential equation(10) Rys. 4. Błąd aproksymacji rozwiązania równania różniczkowego(10) with the boundary conditions of the second type y(0)=0 and y(1)=0. Exact solution of this equation is the following: y(x) = 1 10 (2cosx 2ex cosxcos2x+5esinx 5e x sinx+ecos2sinx 2ctg1sinx+2ecos2ctg1sinx+2esin2sinx ectg1sin2sinx +e x cosxsin2x 2e x sinxsin2x). By applying the proposed approach we obtain the approximated solution in points x i =(i+ 1 2 )2 r 1 fori=0,...,2 r+1 1.Forthefollowingapproximationlevels:r=1,2,3,4,Figure 5 shows the comparison of the exact and approximate solution of the considered

Application of the Haar and B-spline wavelets... 157 r=1 0 r=2 0.15 0.15 0.10 0.10 0.05 0.05 r=3 0 0.4 0.6 1.0 r=4 0 0.4 0.6 1.0 0.15 0.15 0.10 0.10 0.05 0.05 0.4 0.6 1.0 0.4 0.6 1.0 Fig. 5. Comparison solution of differential equation(16) and its approximation Rys. 5. Porównanie przebiegu rozwiązania równania różniczkowego(16) i jego aproksymacji problem. Whereas, approximation errors for levels: r = 1, 2, 3, 4, are illustrated in Figure 6. According to the presented diagrams we can say that with the increase of approximation level the approximation error decreases. 3. B-spline wavelet B-spline wavelet is often defined by means of the scaling functions[7]. Scaling function of the m-order B-spline wavelet is defined as the following convolution: φ m (t)=(φ m 1 φ 1 (t))= φ m 1 (t x)φ 1 (x)dx= 1 0 φ m 1 (t x)dx. (17) Moreover, the m-order B-spline wavelet can be defined as the linear combination of scaling functions: Ψ m (x)= 3m 2 k=0 q k φ m (2x k), (18)

158 A. Korczak r=1 r=2 0.08 0.04 0.06 0.03 0.04 0.02 0.02 0.01 r=3 0.4 0.6 1.0 r=4 0.4 0.6 1.0 0.012 0.020 0.010 0.015 0.008 0.010 0.005 0.4 0.6 1.0 0.4 0.6 1.0 Fig. 6. Error of approximate solution of differential equation(16) Rys. 6. Błąd aproksymacji rozwiązania równania różniczkowego(16) where q k =( 1) k 2 1 m m l=0 ( ) m φ 2m (k+1 l). (19) l ItisworthtonoticethatthefirstorderB-splinewaveletistheHaarwavelet. Scaling function of the linear B-spline wavelet is defined by the formula x, x [0,1), φ 2 (x)= 2 x, x [1,2), (20) 0, x/ [0,2). Furtherscalingfunctionform=2isdenotedasφ(x).Then,thetwo-scalerelation for this function is the following x j k, x [k2 j,(k+1)2 j ), φ j,k (x)= 2 (x j k), x [(k+1)2 j,(k+2)2 j ), (21) 0, x/ [k2 j,(k+2)2 j ), wherex j =2 j x k.

Application of the Haar and B-spline wavelets... 159 m=1 2.0 m=2 1.0 1.5 0.6 1.0 0.4 0.5 m=3 0.7 0.6 0.5 0.4 0.3 0.1 0.4 0.6 1.0 1.2 1.4 m=4 0.6 0.5 0.4 0.3 0.1 0.5 1.0 1.5 2.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 1 2 3 4 Fig.7. Scalingfunctionsform=1,2,3,4 Rys.7. Funkcjeskalującedlam=1,2,3,4 Functionφ j,k (x)isdefinedasthescaledandtransformedfunctionφ(x)by usingparametersjandk.functionsφ j,k (x)arehelpfulinformingthefunctions approximation. Linear B-spline wavelet is defined by the formula: x 6, x [0,1 2 ), Ψ 2 (x)= 1 6 ( 7x+4), x [1 2,1), 1 6 (16x 19), x [1,3 2 ), 1 6 ( 16+29), x [3 2,2), 1 6 (7x 17), x [2,5 2 ), 1 6 ( x+3), x [5 2,3), 0, x/ [0,3). (22)

160 A. Korczak m=1 1.0 0.5 m=2 0.6 0.4 0.4 0.6 1.0 0.5 0.5 1.0 1.5 2.0 2.5 3.0 1.0 m=3 0.3 0.4 m=4 0.1 0.1 0.1 0.3 1 2 3 4 5 0.1 1 2 3 4 5 6 7 Fig.8. B-splinewaveletsoforder1,2,3,4 Rys.8. FalkiB-splajnowerzędu1,2,3,4 Ψ 2 (x)waveletisassociatedwiththewaveletbase[5](x j =2 j x k): ψ j,k (x)= x j 2 j/2 6, x [k2 j,(k+ 1 2 )2 j ), ( 7x j +4) 2j/2 6, x [(k+1 2 )2 j,(k+1)2 j ), (16x j 19) 2j/2 6, x [(k+1)2 j,(k+ 3 2 )2 j ), ( 16x j +29) 2j/2 6, x [(k+3 2 )2 j,(k+2)2 j ), (7x j 17) 2j/2 6, x [(k+2)2 j,(k+ 5 2 )2 j ), ( x j +3) 2j/2 6, x [(k+5 2 )2 j,(k+3)2 j ), 0, x/ [k2 j,(k+3)2 j ]. (23) Similarly like in case of the Haar wavelet, parameter j is responsible for scaling andparameterkisresponsiblefortranslatingthefunctionψ jk.

Application of the Haar and B-spline wavelets... 161 3.1. Linear B-spline wavelet approximation[5] Foranyfixedpositiveintegerr N,thefunctionf(x)definedover[0,1]may be represented by the B-spline scaling functions in the following way where s k = 1 0 f(x)= 2 r+1 1 k= 1 s k φ r+1,k (x), (24) f(x) φ r+1,k (x)dx, k= 1,0,...,2 r+1 1. (25) Functions φ r+1,k (x)arethedualfunctionsforφ r+1,k (x)givenbytherelation 1 0 Φ r+1 Φ r+1 dx=i, (26) whereφ r+1 =[φ r+1, 1,φ r+1,0,...,φ r+1,2 r+1 1] T andiistheidentitymatrixof dimension.(2 r+1 +1) (2 r+1 +1) Let From(26)and(27)weget P r+1 = 1 0 Φ r+1 Φ T r+1dx. (27) Φ r+1 =(P r+1 ) 1 Φ r+1. (28) Example 3.1 In this example we approximate the function f(x) defined as follows { sinx+0.5, x [0,1), f(x)= 0, x/ [0,1). For the first approximation level the comparison of function f(x) and its approximationisshowninfigure9.

162 A. Korczak 1.2 1.0 0.6 0.4 0.4 0.6 1.0 Fig.9. Comparisonoffunctionf(x)anditsapproximationforr=1 Rys.9. Porównanieprzebiegufunkcjiijejaproksymacjidlar=1 r=1 0.0030 r=2 0.0008 5 0 0.0015 0.0006 0.0004 0.0010 0.0005 0.0002 r=3 0.00020 0.4 0.6 1.0 r=4 0.00005 0.4 0.6 1.0 0.00015 0.00004 0.00010 0.00005 0.00003 0.00002 0.00001 0.4 0.6 1.0 0.4 0.6 1.0 Fig. 10. Error of the function approximation Rys. 10. Błąd aproksymacji funkcji Diagramoff(x)anditsapproximationarepracticallythesame,evenforfirst approximation level which confirms the good precision of approximation. Error analysis for the successive levels gives the opportunity to compare efficiency of approximation. Approximation errors for levels: r = 1, 2, 3, 4, are illustrated in Figure10.Basingonthepresenteddiagramswecansaythattheincreaseof

Application of the Haar and B-spline wavelets... 163 Error of the approximate solution Table 2 x i r=1 r=2 r=3 r=4 0 0.0006 0.00008 9.4 10 6 1.2 10 6 0.1 0.0003 0.00006 0.00002 2.8 10 6 02 0.0004 0.0001 1.9 10 6 10 10 6 0.3 0.0003 0.0002 9.5 10 6 10 10 6 0.4 0.001 0.00001 0.00006 1.9 10 6 0.5 0.003 0.0006 0.0002 0.00004 0.6 0.001 0.00005 0.00007 1.3 10 6 0.7 0.0003 0.0003 4.7 10 6 0.00002 0.00002 0.0003 9.9 10 6 0.00002 0.9 0.001 0.00002 0.00009 2.2 10 6 1.0 0.003 0.0008 0.0002 0.00005 approximation level causes the decrease of approximation error. Errors in points x i fortheb-splinewaveletareshownintable2. 3.2. B-spline wavelet approximation[5] Let us consider the linear differential equation of the first order y (x)+f(x)y=g(x), (29) with the initial condition y(0)=y 0, (30) wheref(x),g(x)arethegivenfunctionsofclassl 2 [0,1],y 0 isthegivenreal numberandy(x)istheunknownfunction.thedifferentiationofthevectorsφ r+1 andψcanbeexpressedinfollowingway Φ r+1 =D ΦΦ r+1, Ψ =D Ψ Ψ, (31) whered Φ andd Ψ denotethe(2 r+1 +1) (2 r+1 +1)operationalmatricesof derivative for B-spline scaling functions and wavelet.

164 A. Korczak Approximation of the function f(x) can be expressed y(x)=c T Ψ(x), (32) wherecisanunknownvectorofdimension2 r+1 +1.From(32)weobtain y (x)=c T Ψ (x)=c T D Ψ Ψ(x). (33) Using(29)and(33)wehave C T D Ψ Ψ+f(x)C T Ψ=g(x). (34) From(30)and(32)weget C T Ψ(0)=y 0. (35) Tofindthesolutiony(x)firstwecollocateequality(34)inx i = 2i 1 2 r+1 2,for i=1,2,...,2 r+1 1.Theresultingequationwithinitialcondition(35)generates 2 r+1 +1linearequations.SolutionoftheseequationsisvectorCwhichcanbeset into(32) and gives the approximation(29). Example 3.2 ByusingwaveletbaseΨ j,k,wewillfindtheapproximatesolutionofthefollowing differential equation y (x)+y(x)=x 2 sinx, x [0,1] (36) with the initial condition y(0)=1. Diagramoff(x)anditsapproximationarepracticallythesameevenforfirst approximation level(figure 11) what means the good precision of approximation. Error analysis at the successive levels gives opportunity to compare the efficiency ofapproximations.approximationerrorsforlevels:r=1,2,3,4,aredisplayedin Figure12.Basingonthepresenteddiagramswecansaythatwiththeincreaseof approximation level the approximation error decreases. We consider now the second order linear differential equation with the boundary condition y (x)+f(x)y +g(x)y(x)=h(x), (37) y(0)=y 0, y(1)=y 1, (38)

Application of the Haar and B-spline wavelets... 165 1.0 0.9 0.7 0.4 0.6 1.0 Fig. 11. Comparison of the solution of differential equation and its approximation for r=1 Rys. 11. Porównanie przebiegu rozwiązania równania różniczkowego i jego aproksymacji dlar=1 r=1 r=2 0.008 0.005 0.003 0.001 r=3 0.4 0.6 1.0 r=4 0.4 0.6 1.0 0.005 0.005 0.003 0.003 0.001 0.001 0.4 0.6 1.0 0.4 0.6 1.0 Fig. 12. Error of approximate solution of the differential equation Rys. 12. Błąd aproksymacji rozwiązania równania różniczkowego wheref(x),g(x),h(x)arethegivenfunctionsofclassl 2 [0,1],y 0 andy 1 arethe given real numbers and y(x) is the unknown function.

166 A. Korczak Tofindtheapproximationoffunctiony(x)weproceedasincaseofthefirst order linear differential equation. We substitute into equation(37) the following functions y(x)=c T Ψ(x), y (x)=c T Ψ (x)=c T D Ψ Ψ(x), (39) y (x)=c T DΨ 2Ψ(x). We obtain: From(38)and(39)wehave: C T D 2 ΨΨ+f(x)C T D Ψ Ψ+g(x)C T Ψ=h(x). (40) C T Ψ(0)=y 0, C T Ψ(1)=y 1. (41) Tofindthesolutiony(x)firstwecollocateequation(40)inpointsx i = 2i 1 2 r+1 2, fori=1,2,...,2 r+1 1.Theresultingequationwithboundaryconditions(38) generates2 r+1 +1linearequations.SolutionoftheseequationsisvectorCwhich canbesetinto(39)andgivestheapproximation(37). Example 3.3 ByusingwaveletbaseΨ j,k,wewillfindtheapproximatesolutionofthefollowing differential equation y (x)+y(x)= cosxe x, x [0,1] (42) with the boundary conditions and y(0)=0 y(1)=0. Diagramoff(x)anditsapproximationarepracticallythesameevenforfirstapproximation level(figure 13) which confirms the good precision of approximation. Error analysis at the successive levels gives opportunity to compare the efficiency of approximation. Approximation errors for levels: r = 1, 2, 3, 4, are illustrated infigure14.basingonpresenteddiagramswecansaythatwiththeincreaseof approximation level the approximation error decreases.

Application of the Haar and B-spline wavelets... 167 0 0.15 0.10 0.05 0.4 0.6 1.0 Fig. 13. Comparison of the exact solution of differential equation and its approximation forr=1 Rys. 13. Porównanie przebiegu dokładnego rozwiązania równania różniczkowego i jego aproksymacjidlar=1 r=1 r=2 0.010 0.008 0.008 r=3 0.4 0.6 1.0 r=4 0.4 0.6 1.0 0.008 0.008 0.4 0.6 1.0 0.4 0.6 1.0 Fig. 14. Error of approximate solution of the differential equation Rys. 14. Błąd aproksymacji rozwiązania równania różniczkowego 4. Conclusions This paper presents the comparison of Haar s wavelet and linear B-spline wavelet with regard to the efficiency in function approximations and in approximate

168 A. Korczak solutions of the first and second order differential equations. Presented examples prove that linear B-spline wavelet gives better results in functions approximation and in finding the approximate solutions of differential equations than Haar wavelet. Approximation errors calculated for each level of B-spline wavelet are much smaller than for Haar wavelet. Moreover, the examples show that errors for the Haar wavelet approximation counted for particular levels of approximation decrease much faster than approximation errors generated by using the B-spline wavelet. References 1. Boczar T.: Application of signal processing elements for the characteristics of acoustic emission pulses generated by partial discharges. Phys. Chem. Solid State 8(2007), 610 616. 2. Grzymkowski R., Zielonka A.: Application of the wavelets theory in the boundary problems. WPKJS, Gliwice 2004(in Polish). 3. Jiawei X., Xuefeng Ch., Zhengjia H., Yinghong Zh.: A new wavelet-based thin plate element using B-spline wavelet on the interval. Comput. Mech. 41(2008), 243 255. 4. Katunin A., Korczak A.: The possibility of application of B-spline family wavelets in diagnostic signal processing. Acta Mech. Autom. 3(2009), 43 48. 5. Lakestani M., Razzaghi M., Dehghan M.: Semiorthogonal spline wavelets approximation for Fredholm integro-differential equations. Math. Probl. Eng. 2006 (2006), 1 12. 6. Samavati F., Mahdavi-Amiri N.: A filtered B-spline models of scanned digital images. J. Sci. 10(2000), 258 264. 7. Ueda M., Lodha S.: Wavelets: an elementary introduction and examples. University of California at Santa Cruz, Santa Cruz 1995. Omówienie W niniejszym artykule dokonano porównania falki Haara i falki B-splajnowej liniowej pod względem efektywności aproksymacji funkcji oraz rozwiązań równań różniczkowych rzędów pierwszego i drugiego. Falka Haara jest najstarszą falką, zdefiniowaną już w 1910 roku, dobrze poznaną i obecnie powszechnie stosowaną w wielu dziedzinach. Falka Haara należy do grupy falek ortogonalnych i ze względu

Application of the Haar and B-spline wavelets... 169 na jej prostą postać funkcyjną jej użycie nie wymaga skomplikowanych algorytmów. Natomiast falka B-splajnowa liniowa nieco bardziej skomplikowana jest falką biortogonalną, co daje szersze możliwości zastosowania jej w wielu dziedzinach nauki. Analizując przykłady zawarte w tym artykule można zauważyć, że falka B-splajnowa liniowa daje dużo lepsze rezultaty w aproksymacji rozpatrywanych funkcji oraz rozwiązań równań różniczkowych. Na każdym z poziomów rozdzielczości błędy aproksymacji, liczone dla falki B-splajnowej liniowej, były mniejsze, aniżeli liczone dla falki Haara. W wybranych przykładach można również zaobserwować, że w przypadku falki Haara błąd liczony na poszczególnych poziomach aproksymacji spada dużo szybciej niż w przypadku falki B-splajnowej. Należy podkreślić, że teoria falek B-splajnowych jest teorią stosunkowo nową, intensywnie rozwijaną przez liczne ośrodki naukowe na całym świecie. Obecnie ze względu na swoje ciekawe własności i zastosowania jest tematem wielu prac naukowych.