<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hiratara</author_name>
  <author_url>https://blog.hatena.ne.jp/hiratara/</author_url>
  <blog_title>Pixel Pedals of Tomakomai</blog_title>
  <blog_url>https://hiratara.hatenadiary.jp/</blog_url>
  <categories>
    <anon>数学</anon>
    <anon>技術</anon>
  </categories>
  <description>概説微分積分の問題4.19の解答。台形公式は定積分を台形で近似するもの。台形の公式を使って面積を出して整理すればすぐ出てくる。 def trapezoidal(f, range_, n): a, b = range_ result = f(a) + f(b) for i in xrange(1, n): result += f(a + (b - a) * i / n) * 2 return result * (b - a) / 2 / n シンプソンの公式は定積分を放物線で近似するもの。これも愚直に計算して整理すれば出てくる。 def simpsons(f, range_, n): a, b …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhiratara.hatenadiary.jp%2Fentry%2F20120618%2F1339996543&quot; title=&quot;問題4.19の解答(台形公式、シンプソンの公式) - Pixel Pedals of Tomakomai&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-06-18 14:15:43</published>
  <title>問題4.19の解答(台形公式、シンプソンの公式)</title>
  <type>rich</type>
  <url>https://hiratara.hatenadiary.jp/entry/20120618/1339996543</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
