Loading [MathJax]/jax/output/CommonHTML/jax.js

2019年4月12日金曜日

学習環境

解析入門 原書第3版 (S.ラング(著)、松坂 和夫(翻訳)、片山 孝次(翻訳)、岩波書店)の第4部(級数)、第14章(テイラーの公式)、4(指数関数)の練習問題11-(e)の解答を求めてみる。



    1. 置換積分法。

      t=x2dtdx=2xx=0,t=1x=0.1,t=0.010.10e(-x2)dx=120.010e-ttdte-t=1+R1(t)|R1(t)|e-0|t|=|t|

      よって、

      e-tt=1t+R1(t)t|R1(t)t|t

      ゆえに、

      120.010e-ttdt=[t]0.010+120.010R1(t)dtt0.010R1(t)tdt120.010tdt=13[tt]0.010=13·10-2·10-1<10-3

      よって、 求める積分の小数第3位までの値は、

      [t]0.010=10-2=0.1

コード

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, exp, plot, factorial, Integral, Rational

print('11-(e).')

x = symbols('x')
f = exp(-x ** 2)
If = Integral(f, (x, 0, 0.1))
y = Rational(1, 10)

for o in [If, If.doit(), float(If.doit()), float(y)]:
    pprint(o)
    print()

f = exp(-x) / (2 * x ** Rational(1, 2))
g = 1 / (2 * x ** Rational(1, 2))
p = plot(f, g,
         (x, 0, 0.015),
         ylim=(0, 20),
         show=False, legend=False)
colors = ['red', 'green', 'blue', 'brown']

for s, color in zip(p, colors):
    s.line_color = color

p.show()
p.save('sample11.png')

入出力結果(cmd(コマンドプロンプト)、Terminal、Jupyter(IPython))

C:\Users\...>py sample11.py
11-(e).
0.1        
 ⌠         
 ⎮     2   
 ⎮   -x    
 ⎮  ℯ    dx
 ⌡         
 0         

0.0562314580091424⋅√π

0.09966766429033636

0.1


C:\Users\...>

0 コメント:

コメントを投稿