E.S. 2003 – 7 – P.N.I.

Verificare l’uguaglianza \displaystyle \pi=4\int_{0}^1\, \frac{1}{1+x^2}\,dx e utilizzarla per calcolare un’approssimazione di pi greco, applicando un metodo di integrazione numerica.

E.S. 2006 – 10 – P.N.I.

Tenuto conto che \displaystyle \frac{\pi}{4}=\int_{0}^1\, \frac{dx}{1+x^2} calcola un’approssimazione di pi greco utilizzando uno dei metodi di integrazione numerica studiati.


Osserva

\displaystyle \int_{0}^1\ \frac{1}{1+x^2}\ dx[\arcta x]_0^1 = \arcta\ {1}-\arcta\ {0} = \frac{\pi}{4}-0 = \frac{\pi}{4}


Metodo dei rettangoli

n h x y h\cdot\sum_{i}\ y_i \frac{\pi}{4} \pi
1 1 0 1 1\cdot 1 1 4
2 \frac{1}{2} 0, \frac{1}{2} 1, \frac{4}{5} \frac{1}{2}\left(1+\frac{4}{5}\right) \frac{9}{10} \frac{36}{10}=3.6
3 \frac{1}{3} 0, \frac{1}{3}, \frac{2}{3} 1, \frac{9}{10}, \frac{9}{13} \frac{1}{3}\left ( 1+\frac{9}{10}+\frac{9}{13} \right ) \frac{337}{390} \frac{674}{195}=3.456410…
4 \frac{1}{4} 0, \frac{1}{4}, \frac{1}{2}, \frac{3}{4} 1, \frac{16}{17}, \frac{4}{5}, \frac{16}{25} \frac{1}{4}\left(1+\frac{16}{17}+\frac{4}{5}+\frac{16}{25} \right) \frac{1437}{1700} \frac{1437}{425}=3.381176…
5 \frac{1}{5} 0, \frac{1}{5}, \frac{2}{5}, \frac{3}{5}, \frac{4}{5} 1, \frac{25}{26}, \frac{25}{29}, \frac{25}{34}, \frac{25}{41} \frac{1}{5}\left(1+\frac{25}{26}+\frac{25}{29}+\frac{25}{34}+\frac{25}{41}\right) 3.334926…
6 \frac{1}{6} 0, \frac{1}{6}, \frac{1}{3}, \frac{1}{2}, \frac{2}{3}, \frac{5}{6} 1, \frac{36}{37}, \frac{9}{10}, \frac{4}{5}, \frac{9}{13}, \frac{36}{61} \frac{1}{6}\left(1+\frac{36}{37}+\frac{9}{10}+\frac{4}{5}+\frac{9}{13}+\frac{36}{61} \right) 3.303630…

Metodo dei trapezi

n h x y \frac{h}{2}\cdot(y_1+2y_2+\ \dots\ +y_{n+1}) \frac{\pi}{4} \pi
1 1 0, 1 1, \frac{1}{2} \frac{1}{2}\left(1+\frac{1}{2}\right) \frac{3}{4} 3
2 \frac{1}{2} 0, \frac{1}{2}, 1 1, \frac{4}{5}, \frac{1}{2} \frac{1}{4}\left(1+2\cdot\frac{4}{5}+\frac{1}{2}\right) \frac{31}{40} \frac{31}{10}=3.1
3 \frac{1}{3} 0, \frac{1}{3}, \frac{2}{3}, 1 1, \frac{9}{10}, \frac{9}{13}, \frac{1}{2} \frac{1}{6}\left (1+2\cdot\frac{9}{10}+2\cdot\frac{9}{13}+\frac{1}{2} \right ) 3.123077…
4 \frac{1}{4} 0, \frac{1}{4}, \frac{1}{2}, \frac{3}{4}, 1 1, \frac{16}{17}, \frac{4}{5}, \frac{16}{25}, \frac{1}{2} \frac{1}{8}\left(1+2\cdot\frac{16}{17}+2\cdot\frac{4}{5}+2\cdot\frac{16}{25}+\frac{1}{2} \right) 3.131176…
5 \frac{1}{5} 0, \frac{1}{5}, \frac{2}{5}, \frac{3}{5}, \frac{4}{5}, 1 1, \frac{25}{26}, \frac{25}{29}, \frac{25}{34}, \frac{25}{41}, \frac{1}{2} \frac{1}{10}\left(1+2\cdot\frac{25}{26}+2\cdot\frac{25}{29}+2\cdot\frac{25}{34}+2\cdot\frac{25}{41}+\frac{1}{2}\right) 3.134926…
6 \frac{1}{6} 0, \frac{1}{6}, \frac{1}{3}, \frac{1}{2}, \frac{2}{3}, \frac{5}{6}, 1 1, \frac{36}{37}, \frac{9}{10}, \frac{4}{5}, \frac{9}{13}, \frac{36}{61}, \frac{1}{2} \frac{1}{12}\left(1+2\cdot\frac{36}{37}+2\cdot\frac{9}{10}+2\cdot\frac{4}{5}+2\cdot\frac{9}{13}+2\cdot\frac{36}{61}+\frac{1}{2} \right) 3.136963…

Metodo delle parabole (n pari…)

n h x y \frac{h}{3}\cdot(y_1+4y_2+2y_3+\ \dots\ +y_{n+1}) \frac{\pi}{4} \pi
2 \frac{1}{2} 0, \frac{1}{2}, 1 1, \frac{4}{5}, \frac{1}{2} \frac{1}{6}\left(1+4\cdot\frac{4}{5}+\frac{1}{2}\right) \frac{47}{60} \frac{47}{15}=3.133333…
4 \frac{1}{4} 0, \frac{1}{4}, \frac{1}{2}, \frac{3}{4}, 1 1, \frac{16}{17}, \frac{4}{5}, \frac{16}{25}, \frac{1}{2} \frac{1}{12}\left(1+4\cdot\frac{16}{17}+2\cdot\frac{4}{5}+4\cdot\frac{16}{25}+\frac{1}{2} \right) 3.141569…
6 \frac{1}{6} 0, \frac{1}{6}, \frac{1}{3}, \frac{1}{2}, \frac{2}{3}, \frac{5}{6}, 1 1, \frac{36}{37}, \frac{9}{10}, \frac{4}{5}, \frac{9}{13}, \frac{36}{61}, \frac{1}{2} \frac{1}{18}\left(1+4\cdot\frac{36}{37}+2\cdot\frac{9}{10}+4\cdot\frac{4}{5}+2\cdot\frac{9}{13}+4\cdot\frac{36}{61}+\frac{1}{2} \right) 3.141592…

Approssimazioni di pi greco, al variare di n, con i 3 metodi precedenti

n Rettangoli Trapezi Parabole
1 4 3
2 3,6 3,1 3,133333…
3 3,456410… 3,123077…
4 3,381176… 3,131176… 3,141569…
5 3,334926… 3,134926…
6 3,303630… 3,136963… 3,141592


Codifica: Python

Notice: This work is licensed under a BY-NC-SA. Permalink: E.S. 2003 – 7 – P.N.I.

Comments are closed.