<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Illustration des différents schemas pour la dérivation numérique :: Physique, Chimie et Informatique</title>
    <link>https://dlatreyte.github.io/programmation/schemas_derivation/index.html</link>
    <description>Code le plus simple possible et donc pas modulable du tout &#34;&#34;&#34; Différences finies centrées, ordre 02 en h. Mise en évidence des erreurs de troncature et d&#39;arrondis. &#34;&#34;&#34; from math import sin, cos def df(x): return cos(x) def err_centree(x, f, df, h): return abs(df(x) - (f(x + h / 2) - f(x - h / 2)) / h) def err_progressive(x, f, df, h): return abs(df(x) - (f(x + h) - f(x)) / h) def err_retrograde(x, f, df, h): return abs(df(x) - (f(x) - f(x - h)) / h) def main(): f = lambda x: sin(x) # Fonction étudiée df = lambda x: cos(x) # Fonction dérivée de la fonction étudiée x0 = 1 # Point où le nombre dérivé est calculé hs = [1 / (10**i) for i in range(1, 15)] # Liste des pas h print( &#34;h \t\t Diff. finies Prog. Diff. finies Retro. Diff. finies centrées&#34; ) for h in hs: print(&#34;{:.1e} \t {:.4e} \t {:.4e} \t {:.4e}&#34;.format( h, err_progressive(x0, f, df, h), err_retrograde(x0, f, df, h), err_centree(x0, f, df, h))) main()</description>
    <generator>Hugo</generator>
    <language>fr-FR</language>
    <lastBuildDate></lastBuildDate>
    <atom:link href="https://dlatreyte.github.io/programmation/schemas_derivation/index.xml" rel="self" type="application/rss+xml" />
  </channel>
</rss>