You are on page 1of 12

1 Solutions of milestone 3

Three equispaced interpolation points.

(a) Error function π and its derivatives.

(b) Lebesgue function λ and its derivatives.

π
6 π0
π 00

3
π

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 1.2


x

(a)

1
λ
4
λ0
λ00

3.5

2.5
λ

1.5

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 1.2


x

(b)

2
Five equispaced interpolation points.

(a) Error function π and its derivatives.

(b) Lebesgue function λ and its derivatives.

π
π0
12
π 00

10

8
π

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 1.2


x

(a)

3
λ
λ0
100 λ00

80

60
λ

40

20

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 1.2


x

(b)

4
2 Solutions of milestone 4
Three equispaced interpolation points.
(a) Error first derivative at x = −1.
(b) Error first derivative at x = 0.
(c) Error second derivative at x = −1.
(d) Error second derivative at x = 0.

6  = 10−6
 = 10−3
4  = 10−1

0
log Error

−2

−4

−6

−8

−10

−12

−9 −8 −7 −6 −5 −4 −3 −2 −1
log ∆x

(a)

5
 = 10−6
5  = 10−3
 = 10−1

−5
log Error

−10

−15

−20

−9 −8 −7 −6 −5 −4 −3 −2 −1
log ∆x

(b)

6
15  = 10−6
 = 10−3
 = 10−1

10
log Error

−5

−9 −8 −7 −6 −5 −4 −3 −2 −1
log ∆x

(c)

7
15  = 10−6
 = 10−3
 = 10−1

10

5
log Error

−5

−10
−9 −8 −7 −6 −5 −4 −3 −2 −1
log ∆x

(d)

8
Five equispaced interpolation points.
(a) Error first derivative at x = −1.
(b) Error first derivative at x = 0.
(c) Error second derivative at x = −1.
(d) Error second derivative at x = 0.

6  = 10−6
 = 10−3
4  = 10−1

0
log Error

−2

−4

−6

−8

−10

−12

−9 −8 −7 −6 −5 −4 −3 −2 −1
log ∆x

(a)

9
 = 10−6
5  = 10−3
 = 10−1

−5
log Error

−10

−15

−20

−9 −8 −7 −6 −5 −4 −3 −2 −1
log ∆x

(b)

10
15  = 10−6
 = 10−3
 = 10−1

10
log Error

−5

−9 −8 −7 −6 −5 −4 −3 −2 −1
log ∆x

(c)

11
15  = 10−6
 = 10−3
 = 10−1

10

5
log Error

−5

−10
−9 −8 −7 −6 −5 −4 −3 −2 −1
log ∆x

(d)

12

You might also like