← Back
ExercisesBy topicItalian

Exercise 15 Solution

Study material for Matematica Numerica, shared by the Studwiz community and reviewed by moderators.

Matematica NumericaBy topic

Document information

What's included in this study material

Study material for Matematica Numerica, shared by the Studwiz community and reviewed by moderators.

Import quality: text was extracted directly from the original document.

Extracted content from the document

Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.

Page 1

MATEMATICA NUMERICA A.A. 2018 - 2019 Ingegneria Matematica Prof. A. Quarteroni Prof. A. Manzoni, Dr. I. Fumagalli Esercitazione 15 - Soluzione Integrazione numerica Esercizio 1 Sia g una funzione continua definita sull’intervallo [−1, 1]. Si prendano tre punti di interpolazione t0 = −1,t 1 = α e t2 = 1, doveα è un numero reale tale che|α| < 1. Per approssimare l’integrale ∫ 1 −1g(t) dt, si consideri la formula di quadratura seguente : I2(g) = 2∑ j=0 wjg(tj) =w0g(−1) +w1g(α) +w2g(1). (1) a) Trovare i pesiw0,w 1 ed w2 in funzione diα tali che la formula (1) abbia grado di esattezza 2. b) Trovare inoltreα tale cheI2(p) = ∫ 1 −1p(t) dt per tutti i polinomip di grado 3. c) Riscrivere la formula per approssimare l’integrale ∫b a f(x) dx, utilizzando il cambio di variabili T : [−1, 1]→ [a,b ], x =T (t) = 1 2 [(a +b) +t(b−a)], e ponendog(t) =f(T (t)). Cosa si osserva? Soluzione 1 a) Poniamog0(t) =t0≡ 1,g 1(t) =t,g 2(t) =t2. Deve, dunque, essere I2(g0) =w0 +w1 +w2 = ∫ 1 −1 1 dt = 2, I2(g1) =−w0 +αw1 +w2 = ∫ 1 −1 t dt = 0, I2(g2) =w0 +α2w1 +w2 = ∫ 1 −1 t2 dt = 2/3, da cui w0 = 1 + 3α 3(1 +α), w 1 = 4 3(1−α2), w 2 = 1− 3α 3(1−α). b) In questo caso deve valere anche I2(t3) =−w0 +α3w1 +w2 = ∫ 1 −1 t3 dt = 0 da cui si ottiene l’equazione4α(α2− 1) = 0 ; poiché deve essere|α| < 1, la soluzione accettabile è α = 0, e quindi w0 =w2 = 1/3, w 1 = 4/3. 1 c) Introduciamo la trasformazioneT : [−1, 1]→ [a,b ], T (t) = 1 2 [(a +b) +t(b−a)]. Data una funzione f ∈ C([a,b ]), poniamo g(t) = f(T (t)). Grazie al teorema del cambio di variabili di integrazione, abbiamo ˜I(f) = ∫ b a f(x) dx = ∫ 1 −1 f(T (t))|T′(t)| dt = b−a 2 ∫ 1 −1 g(t) dt = b−a 2 I(g). La formula di quadratura “mappata” sul nuovo intervallo[a,b ] si scriverà allora ˜I2(f) = b−a 2 I2(g) = b−a 2 [ w0f(a) +w1f (a +b 2 ) +w2f(b) ] ,…

Preview

First page of the document.

First page: Exercise 15 Solution