• Non ci sono risultati.

Formula del punto medio con N sottointervalli:

N/A
N/A
Protected

Academic year: 2021

Condividi "Formula del punto medio con N sottointervalli:"

Copied!
7
0
0

Testo completo

(1)

Formule di quadratura composite

I

Formula del punto medio con N sottointervalli:

Z

b

a

f (x ) dx ≈ H

N

X

i =1

f  x

i −1

+ x

i

2

 .

I

Formula del trapezio con N sottointervalli:

Z

b

a

f (x ) dx ≈ H 2

"

f (x

0

) + 2

N−1

X

i =1

f (x

i

) + f (x

N

)

# .

I

Formula di Cavalieri-Simpson con N sottointervalli:

Z

b

a

f (x ) dx ≈ H 6

N

X

i =1



f (x

i −1

) + 4f  x

i −1

+ x

i

2

 + f (x

i

)

 .

H = (b − a)/N, x

i

= a + iH, i = 0, 1, . . . , N.

(2)

Esercizio

Scrivere tre funzioni di Matlab che approssimino Z

b

a

f (x ) dx

usando le formule composite con N sottointervalli

I

del punto medio,

I

dei trapezi,

I

di Simpson,

rispettivamente.

(3)

Il comando quad

>> Q = quad(FUN,A,B)

“Tries to approximate the integral of scalar-valued function FUN

from A to B to within an error of 1.e-6 using recursive adaptive

Simpson quadrature. FUN is a function handle. The function

Y=FUN(X) should accept a vector argument X and return a vector

result Y, the integrand evaluated at each element of X.”

(4)

Stima a posteriori dell’errore - I

Errore con passo H

I (f ) − I

HS

= − b − a 180

H

4

2

4

f

(iv )

(ζ) Errore con passo H/2

I (f ) − I

H/2S

= − b − a 180

(H/2)

4

2

4

f

(iv )

(b ζ) Quindi

I (f ) − I

HS

≈ 2

4

h

I (f ) − I

H/2S

i

if f

(iv )

(ζ) ≈ f

(iv )

(b ζ).

(5)

Stima a posteriori dell’errore - II

Stima dell’errore usando |I

H/2S

− I

HS

|:

I (f ) − I

HS

= I (f ) − I

H/2S

+ I

H/2S

− I

HS

. 2

4

h

I (f ) − I

H/2S

i

≈ I (f ) − I

H/2S

+ I

H/2S

− I

HS

. (2

4

− 1) h

I (f ) − I

H/2S

i

≈ I

H/2S

− I

HS

|I (f ) − I

H/2S

| ≈ 1

2

4

− 1 |I

H/2S

− I

HS

| .

(6)

Esercizio

I

Scrivere una funzione di Matlab per approssimare Z

b

a

f (x ) dx

con errore stimato minore di toll usando la formula di

Simpson.

(7)

Esercizio

I

Scrivere una funzione di Matlab che implementi la formula di Gauss a due punti composita

Z

b a

f (x ) dx ≈ H 2

N

X

i =1

 f



m

i

− H 2 √ 3

 + f



m

i

+ H 2 √ 3



H = (b − a)/N, x

i

= a + iH, i = 0, 1, . . . , N

m

i

= (x

i −1

+ x

i

)/2, i = 1, . . . , N.

Riferimenti

Documenti correlati

Abstract Weighted labelled transition systems (WLTSs) are an estab- lished (meta-)model aiming to provide general results and tools for a wide range of systems such

Figure 22: A cytoplasmic mutant p53 drives the oncogenic response to insulin. A-B) Insulin-induced proliferation and invasion are mediated by cytoplasmic mutant p53.

We use p-adic analysis to generalize Garcia and Luca’s result, by proving that the quotient set of k-generalized Fibonacci numbers is dense in Q p , for any integer k ≥ 2 and any

Key words: Abel-Jacobi map, Normal function, Homological and Algebraic equivalence, Noether-Lefschetz Theory, Monodromy, Dual variety, Isolated singularity, Intersection

“Tries to approximate the integral of scalar-valued function FUN from A to B to within an error of 1.e-6 using recursive adaptive Simpson quadrature. FUN is a

tendons: it was reported that the production of tenascin-C and collagen XII, closely associated to type I collagen fibrils[127], is high in fibroblasts attached to a stretched

Horowitz and Malkhi [9]propose a scheme for dynamically estimating net- work size at each node of the network as the network evolves (that is, nodes join and leave the network),

In another study, directed expression of Hsp70, a chaperone up-regulated in stress re- sponses that refolds misfolded proteins and is able to suppress the neuronal toxicity