• Aucun résultat trouvé

Chapter 2 Numerical integration

N/A
N/A
Protected

Academic year: 2021

Partager "Chapter 2 Numerical integration"

Copied!
89
0
0

Texte intégral

(1)

Chapter 2

Numerical integration

(2)

I. Motivation

(3)

Example : f (x) = cos(πx) √

x

2

+ 1

Can we compute J = Z 2

0

f(x)dx?

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

(4)

Example : f (x) = cos(πx) √

x

2

+ 1

Can we compute J = Z 2

0

f(x)dx?

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

(5)

Rectangular rule

(leftpoints)

Approximation by a piecewise constant function

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

11 points

10 subintervals

(6)

Rectangular rule (leftpoints)

Approximation by a piecewise constant function

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

11 points 10 subintervals

(7)

Rectangular rule (leftpoints)

Approximation by a piecewise constant function

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

21 points 20 subintervals

(8)

Rectangular rule

(rightpoints)

Approximation by a piecewise constant function

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

11 points

10 subintervals

(9)

Rectangular rule (rightpoints)

Approximation by a piecewise constant function

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

11 points 10 subintervals

(10)

Rectangular rule (rightpoints)

Approximation by a piecewise constant function

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

21 points 20 subintervals

(11)

Rectangular rule

(midpoints)

Approximation by a piecewise constant function

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

11 points

10 subintervals

(12)

Rectangular rule (midpoints)

Approximation by a piecewise constant function

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

11 points 10 subintervals

(13)

Rectangular rule (midpoints)

Approximation by a piecewise constant function

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

21 points 20 subintervals

(14)

Trapezoidal rule

Approximation by a piecewise affine function

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

11 points

10 subintervals

(15)

Trapezoidal rule

Approximation by a piecewise affine function

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

11 points 10 subintervals

(16)

Trapezoidal rule

Approximation by a piecewise affine function

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

21 points 20 subintervals

(17)

Comparison of the different rules (20 subintervals)

Leftpoint rule Rightpoint rule

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

I=0.019664765868385 I=0.143271563618364 Midpoint rule Trapezoidal rule

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

I=0.080343177070866 I=0.081468164743374

(18)

Comparison of the different rules (100 subintervals)

Leftpoint rule Rightpoint rule

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

I=0.068388241234746 I=0.093109600784742 Midpoint rule Trapezoidal rule

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

0 0.5 1 1.5 2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5

I=0.080704188569061 I=0.080748921009744

(19)

II. Quadrature rules

1 Principle

(20)

Definition of a quadrature rule

Letf : [a, b]→R(a < b) be a continuous function

a

b x f(x)

Can we compute an approximate value of J(f) =

Z b a

f(x)dx?

Aquadrature ruleis an approximation of the integral J(f) stated as a linear combination of function values at specified points in [a, b].

(21)

Definition of a quadrature rule

Letf : [a, b]→R(a < b) be a continuous function

a

b x f(x)

Can we compute an approximate value of J(f) =

Z b a

f(x)dx?

Aquadrature ruleis an approximation of the integral J(f) stated as a linear combination of function values at specified points in [a, b].

(22)

Definition of a quadrature rule

Letf : [a, b]→R(a < b) be a continuous function

a

b x f(x)

Can we compute an approximate value of J(f) =

Z b a

f(x)dx?

Aquadrature ruleis an approximation of the integral J(f) stated as a linear combination of function values at specified points in [a, b].

(23)

Reduction to elementary quadrature rules

x0

xn x f(x)

xk

xk+1

Can we compute an approximate value of J(f) =

Z b a

f(x)dx?

Partition : a=x0< x1 < . . . < xk< xk+1< . . . < xN =b, withhk=xk+1−xk(0≤i≤N−1) andh= maxhk.

Z b

a

f(x)dx=

N−1

X

k=0

Z xk+1

xk

f(x)dx

Þwe want a quadrature rule on small elementary intervals

(24)

Reduction to elementary quadrature rules

x0

xn x f(x)

xk

xk+1

Can we compute an approximate value of J(f) =

Z b a

f(x)dx?

Partition : a=x0< x1 < . . . < xk< xk+1< . . . < xN =b, withhk=xk+1−xk(0≤i≤N−1) andh= maxhk.

Z b

a

f(x)dx=

N−1

X

k=0

Z xk+1

xk

f(x)dx

Þwe want a quadrature rule on small elementary intervals

(25)

Reduction to elementary quadrature rules

x0

xn x f(x)

xk

xk+1

Can we compute an approximate value of J(f) =

Z b a

f(x)dx?

Partition : a=x0< x1 < . . . < xk< xk+1< . . . < xN =b, withhk=xk+1−xk(0≤i≤N−1) andh= maxhk.

Z b a

f(x)dx=

N−1

X

k=0

Z xk+1

xk

f(x)dx

Þwe want a quadrature rule on small elementary intervals

(26)

Reduction to elementary quadrature rules

x0

xn x f(x)

xk

xk+1

Can we compute an approximate value of J(f) =

Z b a

f(x)dx?

Partition : a=x0< x1 < . . . < xk< xk+1< . . . < xN =b, withhk=xk+1−xk(0≤i≤N−1) andh= maxhk.

Z b a

f(x)dx=

N−1

X

k=0

Z xk+1

xk

f(x)dx

Þwe want a quadrature rule on small elementary intervals

(27)

II. Quadrature rules

1 Principle

2 Examples

(28)

Leftpoint rule

xk xk+1

Z xk+1

xk

f(x)dx≈(xk+1−xk)f(xk)

Z b a

f(x)dx≈

N−1

X

k=0

(xk+1−xk)f(xk)

(29)

Leftpoint rule

xk xk+1

Z xk+1

xk

f(x)dx≈(xk+1−xk)f(xk)

Z b a

f(x)dx≈

N−1

X

k=0

(xk+1−xk)f(xk)

(30)

Leftpoint rule

xk xk+1

Z xk+1

xk

f(x)dx≈(xk+1−xk)f(xk)

Z b a

f(x)dx≈

N−1

X

k=0

(xk+1−xk)f(xk)

(31)

Rightpoint rule

xk xk+1

Z xk+1

xk

f(x)dx≈(xk+1−xk)f(xk+1)

Z b a

f(x)dx≈

N−1

X

k=0

(xk+1−xk)f(xk+1)

(32)

Rightpoint rule

xk xk+1

Z xk+1

xk

f(x)dx≈(xk+1−xk)f(xk+1)

Z b a

f(x)dx≈

N−1

X

k=0

(xk+1−xk)f(xk+1)

(33)

Rightpoint rule

xk xk+1

Z xk+1

xk

f(x)dx≈(xk+1−xk)f(xk+1)

Z b a

f(x)dx≈

N−1

X

k=0

(xk+1−xk)f(xk+1)

(34)

Midpoint rule

xk xk+1 xk+xk+1

2

Z xk+1

xk

f(x)dx≈ (xk+1−xk)f

xk+xk+1

2

Z b

a

f(x)dx≈

N−1

X

k=0

(xk+1−xk)fxk+xk+1 2

(35)

Midpoint rule

xk xk+1 xk+xk+1

2

Z xk+1

xk

f(x)dx≈ (xk+1−xk)f

xk+xk+1

2

Z b

a

f(x)dx≈

N−1

X

k=0

(xk+1−xk)fxk+xk+1 2

(36)

Midpoint rule

xk xk+1 xk+xk+1

2

Z xk+1

xk

f(x)dx≈ (xk+1−xk)f

xk+xk+1

2

Z b a

f(x)dx≈

N−1

X

k=0

(xk+1−xk)fxk+xk+1 2

(37)

Trapezoidal rule

xk xk+1

Z xk+1

xk

f(x)dx≈ (xk+1−xk)

f(xk) +f(xk+1) 2

Z b a

f(x)dx≈

N−1

X

k=0

(xk+1−xk)

f(xk) +f(xk+1) 2

(38)

Trapezoidal rule

xk xk+1

Z xk+1

xk

f(x)dx≈ (xk+1−xk)

f(xk) +f(xk+1) 2

Z b a

f(x)dx≈

N−1

X

k=0

(xk+1−xk)

f(xk) +f(xk+1) 2

(39)

Trapezoidal rule

xk xk+1

Z xk+1

xk

f(x)dx≈ (xk+1−xk)

f(xk) +f(xk+1) 2

Z b a

f(x)dx≈

N−1

X

k=0

(xk+1−xk)

f(xk) +f(xk+1) 2

(40)

II. Quadrature rules

1 Principle

2 Examples

3 Generalization

(41)

Change of variables

From[xk, xk+1] to [−1,1]





x= xk+xk+1

2 +xk+1−xk

2 s

dx= xk+1−xk

2 ds

Z xk+1

xk

f(x)dx= xk+1−xk

2

Z 1

−1

f

xk+xk+1

2 +xk+1−xk

2 s

ds

= xk+1−xk

2

Z 1

−1

ϕk(s)ds.

Þquadrature rule for Z 1

−1

ϕ(s)ds?

(42)

Change of variables

From[xk, xk+1] to [−1,1]





x= xk+xk+1

2 +xk+1−xk

2 s

dx= xk+1−xk

2 ds

Z xk+1

xk

f(x)dx= xk+1−xk

2

Z 1

−1

f

xk+xk+1

2 +xk+1−xk

2 s

ds

= xk+1−xk 2

Z 1

−1

ϕk(s)ds.

Þquadrature rule for Z 1

−1

ϕ(s)ds?

(43)

Change of variables

From[xk, xk+1] to [−1,1]





x= xk+xk+1

2 +xk+1−xk

2 s

dx= xk+1−xk

2 ds

Z xk+1

xk

f(x)dx= xk+1−xk

2

Z 1

−1

f

xk+xk+1

2 +xk+1−xk

2 s

ds

= xk+1−xk 2

Z 1

−1

ϕk(s)ds.

Þquadrature rule for Z 1

−1

ϕ(s)ds?

(44)

Elementary quadrature rule (on [−1, 1])

Z 1

−1

ϕ(s)ds

| {z }

l

X

j=0

ωjϕ(τj)

| {z } J(ϕ) JQR(ϕ) with

l∈N

τj ∈[−1,1]for 0≤j≤l,

l

X

j=0

ωj = 2.

Examples

Midpoint rule :l= 0,τ0= 0,ω0 = 2,

Trapezoidal rule :l= 1,τ0=−1, τ1= 1,ω01 = 1.

(45)

Elementary quadrature rule (on [x

k

, x

k+1

])

Z xk+1

xk

f(x)dx= xk+1−xk 2

Z 1

−1

f

xk+xk+1

2 +xk+1−xk

2 s

ds

≈ xk+1−xk

2

l

X

j=0

ωjf(xk+xk+1

2 +xk+1−xk

2 τj) Þ let setλj = ωj

2 ,τkj = xk+xk+1

2 + xk+1−xk

2 τj

General form Z xk+1

xk

f(x)dx≈(xk+1−xk)

l

X

j=0

λjf(τkj)

with l∈N,

τkj ∈[xk, xk+1]for 0≤j≤l,

l

X

j=0

λj = 1.

(46)

Elementary quadrature rule (on [x

k

, x

k+1

])

Z xk+1

xk

f(x)dx= xk+1−xk 2

Z 1

−1

f

xk+xk+1

2 +xk+1−xk

2 s

ds

≈ xk+1−xk

2

l

X

j=0

ωjf(xk+xk+1

2 +xk+1−xk

2 τj)

Þ let setλj = ωj

2 ,τkj = xk+xk+1

2 + xk+1−xk

2 τj

General form Z xk+1

xk

f(x)dx≈(xk+1−xk)

l

X

j=0

λjf(τkj)

with l∈N,

τkj ∈[xk, xk+1]for 0≤j≤l,

l

X

j=0

λj = 1.

(47)

Elementary quadrature rule (on [x

k

, x

k+1

])

Z xk+1

xk

f(x)dx= xk+1−xk 2

Z 1

−1

f

xk+xk+1

2 +xk+1−xk

2 s

ds

≈ xk+1−xk

2

l

X

j=0

ωjf(xk+xk+1

2 +xk+1−xk

2 τj) Þ let setλj = ωj

2 ,τkj = xk+xk+1

2 +xk+1−xk 2 τj

General form Z xk+1

xk

f(x)dx≈(xk+1−xk)

l

X

j=0

λjf(τkj)

with l∈N,

τkj ∈[xk, xk+1]for 0≤j≤l,

l

X

j=0

λj = 1.

(48)

Elementary quadrature rule (on [x

k

, x

k+1

])

Z xk+1

xk

f(x)dx= xk+1−xk 2

Z 1

−1

f

xk+xk+1

2 +xk+1−xk

2 s

ds

≈ xk+1−xk

2

l

X

j=0

ωjf(xk+xk+1

2 +xk+1−xk

2 τj) Þ let setλj = ωj

2 ,τkj = xk+xk+1

2 +xk+1−xk 2 τj

General form Z xk+1

xk

f(x)dx≈(xk+1−xk)

l

X

j=0

λjf(τkj)

with l∈N,

τkj ∈[xk, xk+1]for 0≤j≤l,

l

X

j=0

λj = 1.

(49)

Conclusion : general form of a quadrature rule

Z b a

f(x)dx

| {z }

N−1

X

k=0

(xk+1−xk)

l

X

j=0

λjf(τkj)

| {z }

J(f) JhQR(f) with

l∈N,

τkj ∈[xk, xk+1]for 0≤j≤l,0≤i≤N−1

l

X

j=0

λj = 1.

(50)

III. Order and error estimate

1 Order of a quadrature rule

(51)

Definition of the order

Definition

A quadrature rule is of orderp if

it integrates exactly every polynomial function with a degree less than p,

it doesn’t integrate exactly at least one polynomial function with a degree p+ 1.

How to determinate the degree of a quadrature rule ? We verify that the elementary ruleJQR(ϕ) =

l

X

j=0

ωjϕ(τj) is exact(it means that JQR(ϕ) =J(ϕ)) for the functionsϕ: x7→1,x7→x, . . . , x7→xp

inexact for x7→xp+1.

(52)

Examples

Leftpoint rule

áorder 0

JQR(ϕ) = 2ϕ(−1)

JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) =−2 6=J(x7→x)(= 0)

Rightpoint rule

á order 0

JQR(ϕ) = 2ϕ(1)

JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) = 2 6=J(x7→x)(= 0)

(53)

Examples

Leftpoint rule áorder 0

JQR(ϕ) = 2ϕ(−1)

JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) =−2 6=J(x7→x)(= 0)

Rightpoint rule

á order 0

JQR(ϕ) = 2ϕ(1)

JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) = 2 6=J(x7→x)(= 0)

(54)

Examples

Leftpoint rule áorder 0

JQR(ϕ) = 2ϕ(−1)

JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) =−2 6=J(x7→x)(= 0) Rightpoint rule

á order 0

JQR(ϕ) = 2ϕ(1)

JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) = 2 6=J(x7→x)(= 0)

(55)

Examples

Leftpoint rule áorder 0

JQR(ϕ) = 2ϕ(−1)

JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) =−2 6=J(x7→x)(= 0) Rightpoint rule á order 0

JQR(ϕ) = 2ϕ(1)

JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) = 2 6=J(x7→x)(= 0)

(56)

Examples

Midpoint rule

á order 1

JQR(ϕ) = 2ϕ(0)

JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) = 0 =J(x7→x)

JQR(x7→x2) = 0 6=J(x7→x2)(= 2 3) Trapezoidal rule

á order 1

JQR(ϕ) = ϕ(−1) +ϕ(1) JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) = 0 =J(x7→x) JQR(x7→x2) = 2 6=J(x7→x2)

(57)

Examples

Midpoint rule

á order 1

JQR(ϕ) = 2ϕ(0)

JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) = 0 =J(x7→x) JQR(x7→x2) = 0 6=J(x7→x2)(= 2

3)

Trapezoidal rule

á order 1

JQR(ϕ) = ϕ(−1) +ϕ(1) JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) = 0 =J(x7→x) JQR(x7→x2) = 2 6=J(x7→x2)

(58)

Examples

Midpoint rule á order 1

JQR(ϕ) = 2ϕ(0)

JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) = 0 =J(x7→x) JQR(x7→x2) = 0 6=J(x7→x2)(= 2

3)

Trapezoidal rule

á order 1

JQR(ϕ) = ϕ(−1) +ϕ(1) JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) = 0 =J(x7→x) JQR(x7→x2) = 2 6=J(x7→x2)

(59)

Examples

Midpoint rule á order 1

JQR(ϕ) = 2ϕ(0)

JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) = 0 =J(x7→x) JQR(x7→x2) = 0 6=J(x7→x2)(= 2

3) Trapezoidal rule

á order 1

JQR(ϕ) = ϕ(−1) +ϕ(1) JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) = 0 =J(x7→x) JQR(x7→x2) = 2 6=J(x7→x2)

(60)

Examples

Midpoint rule á order 1

JQR(ϕ) = 2ϕ(0)

JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) = 0 =J(x7→x) JQR(x7→x2) = 0 6=J(x7→x2)(= 2

3) Trapezoidal rule á order 1

JQR(ϕ) = ϕ(−1) +ϕ(1) JQR(x7→1) = 2 =J(x7→1) JQR(x7→x) = 0 =J(x7→x) JQR(x7→x2) = 2 6=J(x7→x2)

(61)

III. Order and error estimate

1 Order of a quadrature rule

2 Error estimate

(62)

How to estimate the efficiency of a quadrature rule ?

Z b a

f(x)dx

| {z }

N−1

X

k=0

(xk+1−xk)

l

X

j=0

λjf(τkj)

| {z }

J(f) JhQR(f)

We want that, for every functionf,

JhQR(f)→J(f)as h tends to 0 (N tends to+∞),

the error Ef(h) =|JhQR(f)−J(f)|tends to 0 “as rapidly as possible”.

Particularly, ifEf(h) =Cfhα, the quadrature rule is even more efficient thatα is bigger.

(63)

Comparison of classical methods

Test case

f(x) =xsinx, a= 0, b= π 2, I=

Z π/2 0

f(x)dx= 1.

Convergence result

Ef(h) =Cfhα. Leftpoint rule : α= 1, Midpoint rule :α= 2, Trapezoidal rule :α= 2.

(64)

Comparison of classical methods

Test case

f(x) =xsinx, a= 0, b= π 2, I=

Z π/2 0

f(x)dx= 1.

Convergence result

Ef(h) =Cfhα. Leftpoint rule : α= 1, Midpoint rule :α= 2, Trapezoidal rule :α= 2.

(65)

General result

Theorem Let

JQR(f) be an elementary quadrature rule of orderp JhQR(f) the corresponding approximation ofJ(f) =

Z b a

f(x)dx Then, iff ∈ Cp+1([a, b]), there exists a constantCf such that

|JhQR(f)−J(f)|

| {z }

≤ Cfhp+1. Ef(h)

ÞA quadrature rule of orderp converges like hp+1.

(66)

IV. How to obtain quadrature rules ?

1 Link between numerical integration and interpolation

(67)

Value of the weights in an elementary quadrature rule

Problem

The points (τj)0≤j≤l are given.

We want to calculate the weights(ωj)0≤j≤l such that JQR(ϕ) =

l

X

j=0

ωjϕ(τj) has the maximal order.

Practical calculation

Writing JQR(x7→xk) =J(x7→xk)for all 0≤k≤l leads to a linear system of (l+ 1)equations on (ωj)0≤j≤l.

This system has a unique solution if τi 6=τj for all i6=j (the matrix is a Vandermonde matrix).

The obtained quadrature rule will have an order greater thanl.

(68)

Link with the Lagrangian basis associated to the (τ

j

)

0≤j≤l

JQR(ϕ) =

l

X

j=0

ωjϕ(τj) Assume that the (ωj)0≤j≤l have been calculated so that the quadrature rule has an order greater thanl.

Then, for all0≤k≤l,Lk∈Rl[X]and JQR(Lk) = J(Lk)

Reciprocally, let assume ωk=R1

−1Lk(s)ds for all 0≤k≤l. Then, for all P ∈Rl[X],P =

l

X

j=0

P(τj)Lj and J(P) =

Z 1

−1

P(s)ds=

l

X

j=0

P(τj) Z 1

−1

Lj(s)ds

áorder≥l

(69)

Link with the Lagrangian basis associated to the (τ

j

)

0≤j≤l

JQR(ϕ) =

l

X

j=0

ωjϕ(τj) Assume that the (ωj)0≤j≤l have been calculated so that the quadrature rule has an order greater thanl.

Then, for all0≤k≤l,Lk∈Rl[X]and JQR(Lk)

| {z }

= J(Lk)

| {z }

l

X

j=0

ωjLkj) = Z 1

−1

Lk(s)ds

Reciprocally, let assume ωk=R1

−1Lk(s)ds for all 0≤k≤l. Then, for all P ∈Rl[X],P =

l

X

j=0

P(τj)Lj and J(P) =

Z 1

−1

P(s)ds=

l

X

j=0

P(τj) Z 1

−1

Lj(s)ds

áorder≥l

(70)

Link with the Lagrangian basis associated to the (τ

j

)

0≤j≤l

JQR(ϕ) =

l

X

j=0

ωjϕ(τj) Assume that the (ωj)0≤j≤l have been calculated so that the quadrature rule has an order greater thanl.

Then, for all0≤k≤l,Lk∈Rl[X]and JQR(Lk)

| {z }

= J(Lk)

| {z }

ωk =

Z 1

−1

Lk(s)ds

Reciprocally, let assume ωk=R1

−1Lk(s)ds for all 0≤k≤l. Then, for all P ∈Rl[X],P =

l

X

j=0

P(τj)Lj and J(P) =

Z 1

−1

P(s)ds=

l

X

j=0

P(τj) Z 1

−1

Lj(s)ds

áorder≥l

(71)

Link with the Lagrangian basis associated to the (τ

j

)

0≤j≤l

JQR(ϕ) =

l

X

j=0

ωjϕ(τj) Assume that the (ωj)0≤j≤l have been calculated so that the quadrature rule has an order greater thanl.

Then, for all0≤k≤l,Lk∈Rl[X]and JQR(Lk)

| {z }

= J(Lk)

| {z }

ωk =

Z 1

−1

Lk(s)ds Reciprocally, let assume ωk=R1

−1Lk(s)ds for all 0≤k≤l.

Then, for allP ∈Rl[X],P =

l

X

j=0

P(τj)Lj and J(P) =

Z 1

−1

P(s)ds=

l

X

j=0

P(τj) Z 1

−1

Lj(s)ds

áorder≥l

(72)

Link with the Lagrangian basis associated to the (τ

j

)

0≤j≤l

JQR(ϕ) =

l

X

j=0

ωjϕ(τj) Assume that the (ωj)0≤j≤l have been calculated so that the quadrature rule has an order greater thanl.

Then, for all0≤k≤l,Lk∈Rl[X]and JQR(Lk)

| {z }

= J(Lk)

| {z }

ωk =

Z 1

−1

Lk(s)ds Reciprocally, let assume ωk=R1

−1Lk(s)ds for all 0≤k≤l.

Then, for allP ∈Rl[X],P =

l

X

j=0

P(τj)Lj and J(P) =

Z 1

−1

P(s)ds=

l

X

j=0

P(τjj

áorder≥l

(73)

Link with the Lagrangian basis associated to the (τ

j

)

0≤j≤l

JQR(ϕ) =

l

X

j=0

ωjϕ(τj) Assume that the (ωj)0≤j≤l have been calculated so that the quadrature rule has an order greater thanl.

Then, for all0≤k≤l,Lk∈Rl[X]and JQR(Lk)

| {z }

= J(Lk)

| {z }

ωk =

Z 1

−1

Lk(s)ds Reciprocally, let assume ωk=R1

−1Lk(s)ds for all 0≤k≤l.

Then, for allP ∈Rl[X],P =

l

X

j=0

P(τj)Lj and J(P) =

Z 1

−1

P(s)ds=JQR(P)

áorder≥l

(74)

Link with the Lagrangian basis associated to the (τ

j

)

0≤j≤l

JQR(ϕ) =

l

X

j=0

ωjϕ(τj) Assume that the (ωj)0≤j≤l have been calculated so that the quadrature rule has an order greater thanl.

Then, for all0≤k≤l,Lk∈Rl[X]and JQR(Lk)

| {z }

= J(Lk)

| {z }

ωk =

Z 1

−1

Lk(s)ds Reciprocally, let assume ωk=R1

−1Lk(s)ds for all 0≤k≤l.

Then, for allP ∈Rl[X],P =

l

X

j=0

P(τj)Lj and J(P) =

Z 1

−1

P(s)ds=JQR(P) áorder≥l

(75)

Theorem Let

j)0≤j≤l,(l+ 1)distinct points in[−1,1],

(Lk)0≤k≤l, the Lagrangian basis ofRl[X]associated to the points(τj)0≤j≤l.

Then, the quadrature rule JQR(ϕ) =

l

X

j=0

ωjϕ(τj) has an order at less equal tolif and only if

ωk= Z 1

−1

Lk(s)ds ∀0≤i≤l.

In this case, for all ϕ∈ C[−1,1], we have JQR(ϕ) = Z 1

−1

Pϕ(s)ds, where Pϕ is the Lagrangian interpolating polynomial of ϕ in the points(τj)0≤j≤l.

(76)

IV. How to obtain quadrature rules ?

1 Link between numerical integration and interpolation

2 Newton-Cotes quadrature

(77)

Definition

The Newton-Cotes formulas are the quadrature rules

JQR(ϕ) =

l

X

j=0

ωjϕ(τj)

of maximal order obtained for points equally spaced on[−1,1].

It means :

τj =−1 +2j

l for 0≤j≤l, ωj =

Z 1

−1

Lj(s)ds.

(78)

Examples of Newton-Cotes formulas

l= 1 : trapezoidal rule

JQR(ϕ) =ϕ(1) +ϕ(−1).

l= 2 : Simpson rule JQR(ϕ) = 1

3ϕ(−1) + 4

3ϕ(0) + 1 3ϕ(1).

l= 4 : Boole-Villarceau rule JQR(ϕ) = 7

45ϕ(−1)+32 45ϕ(−1

2)+ 4

15ϕ(0)+32 45ϕ(1

2)+ 7 45ϕ(1).

Order of these quadrature rules l, if lis odd,

l+ 1, ifl is even.

(79)

IV. How to obtain quadrature rules ?

1 Link between numerical integration and interpolation

2 Newton-Cotes quadrature

3 Gaussian quadrature

(80)

Principle

Knowing (τj)0≤j≤l, we take ωj = Z 1

−1

Lj(s)ds in order to have the maximal order associated to the given points.

The objective of Gaussian method consists now in choosing the points (τj)0≤j≤l leading to a quadrature rule of maximal order.

Example 2 points τ01 (l= 1), we assume τ0 =−τ1=−τ. JQR(ϕ) =ω0ϕ(−τ) +ω1ϕ(τ).

JQR(x7→1) =J(x7→1) =⇒ ω01 = 2 JQR(x7→x) =J(x7→x) =⇒ −ω0τ+ω1τ = 0 JQR(x7→x2) =J(x7→x2) =⇒ ω0τ21τ2 = 2 3

=⇒ω01= 1, τ =

√3 3 .

á order 3

(81)

Principle

Knowing (τj)0≤j≤l, we take ωj = Z 1

−1

Lj(s)ds in order to have the maximal order associated to the given points.

The objective of Gaussian method consists now in choosing the points (τj)0≤j≤l leading to a quadrature rule of maximal order.

Example 2 points τ01 (l= 1), we assume τ0 =−τ1=−τ. JQR(ϕ) =ω0ϕ(−τ) +ω1ϕ(τ).

JQR(x7→1) =J(x7→1) =⇒ ω01 = 2 JQR(x7→x) =J(x7→x) =⇒ −ω0τ+ω1τ = 0 JQR(x7→x2) =J(x7→x2) =⇒ ω0τ21τ2 = 2 3

=⇒ω01= 1, τ =

√3 3 .

á order 3

(82)

Principle

Knowing (τj)0≤j≤l, we take ωj = Z 1

−1

Lj(s)ds in order to have the maximal order associated to the given points.

The objective of Gaussian method consists now in choosing the points (τj)0≤j≤l leading to a quadrature rule of maximal order.

Example 2 points τ01 (l= 1), we assume τ0 =−τ1=−τ. JQR(ϕ) =ω0ϕ(−τ) +ω1ϕ(τ).

JQR(x7→1) =J(x7→1) =⇒ ω01 = 2 JQR(x7→x) =J(x7→x) =⇒ −ω0τ+ω1τ = 0 JQR(x7→x2) =J(x7→x2) =⇒ ω0τ21τ2 = 2 3

=⇒ω01= 1, τ =

√3 3 .

á order 3

(83)

Principle

Knowing (τj)0≤j≤l, we take ωj = Z 1

−1

Lj(s)ds in order to have the maximal order associated to the given points.

The objective of Gaussian method consists now in choosing the points (τj)0≤j≤l leading to a quadrature rule of maximal order.

Example 2 points τ01 (l= 1), we assume τ0 =−τ1=−τ. JQR(ϕ) =ω0ϕ(−τ) +ω1ϕ(τ).

JQR(x7→1) =J(x7→1) =⇒ ω01 = 2 JQR(x7→x) =J(x7→x) =⇒ −ω0τ+ω1τ = 0 JQR(x7→x2) =J(x7→x2) =⇒ ω0τ21τ2 = 2 3

=⇒ω01 = 1, τ =

√3 3 .

á order 3

(84)

Principle

Knowing (τj)0≤j≤l, we take ωj = Z 1

−1

Lj(s)ds in order to have the maximal order associated to the given points.

The objective of Gaussian method consists now in choosing the points (τj)0≤j≤l leading to a quadrature rule of maximal order.

Example 2 points τ01 (l= 1), we assume τ0 =−τ1=−τ. JQR(ϕ) =ω0ϕ(−τ) +ω1ϕ(τ).

JQR(x7→1) =J(x7→1) =⇒ ω01 = 2 JQR(x7→x) =J(x7→x) =⇒ −ω0τ+ω1τ = 0 JQR(x7→x2) =J(x7→x2) =⇒ ω0τ21τ2 = 2 3

=⇒ω01 = 1, τ =

√3 3 .

á order 3

(85)

A second example, with 3 points

We assume that the points are−τ,0 andτ.

JQR(ϕ) =ω0ϕ(−τ) +ω1ϕ(0) +ω2ϕ(τ).

JQR(x7→1) =J(x7→1) =⇒ ω012= 2 JQR(x7→x) =J(x7→x) =⇒ −ω0τ +ω2τ = 0 JQR(x7→x2) =J(x7→x2) =⇒ ω0τ22τ2 = 2 3 JQR(x7→x3) =J(x7→x3) =⇒ −ω0τ32τ3= 0 JQR(x7→x4) =J(x7→x4) =⇒ ω0τ42τ4 = 2 5

=⇒τ = r3

5, ω02 = 5

9, ω1= 8 9.

á order 5

(86)

A second example, with 3 points

We assume that the points are−τ,0 andτ.

JQR(ϕ) =ω0ϕ(−τ) +ω1ϕ(0) +ω2ϕ(τ).

JQR(x7→1) =J(x7→1) =⇒ ω012= 2 JQR(x7→x) =J(x7→x) =⇒ −ω0τ +ω2τ = 0 JQR(x7→x2) =J(x7→x2) =⇒ ω0τ22τ2 = 2 3 JQR(x7→x3) =J(x7→x3) =⇒ −ω0τ32τ3= 0 JQR(x7→x4) =J(x7→x4) =⇒ ω0τ42τ4 = 2 5

=⇒τ = r3

5, ω02 = 5

9, ω1= 8 9.

á order 5

Références

Documents relatifs

C’est ici ce qui m’intéresse particulièrement puisque je souhaite me rendre dans quatre classes d’école primaire afin de pouvoir y interroger les enseignants sur leur

Keywords: Governance, Self-government, Indigenous communities, policy outcomes, multilevel governance, corporate governance, land management, resource management... Table

The proof given there proceeds by showing that even increasing trees are counted by up-down (or alternating) permutations, which in turn satisfy the same recurrence as the

In the case of avant de and sans, the English translation is often a conjugated verb (Before they left), or a present participle (Before leaving), rather than the English

In the present paper we prove that, as the degree goes to infinity, the asymp- totic variance of the normalized number of real roots of a Kostlan-Shub-Smale square random system with

That is why, rather than proposing a complete set of economic measures and plans, the emphasis here has been to ask questions of method and highlight three essential ingredients for

Keywords : polynomials with several variables, absolute factorization, symbolic-numeric algo- rithm, symbolic algorithm, LLL,

In section 4, we point out the sensibility of the controllability problem with respect to the numerical approximation, and then present an efficient and robust semi-discrete scheme