2019年11月12日火曜日

学習環境

微分積分学 (ちくま学芸文庫) (吉田 洋一(著)、筑摩書房)のⅢ.(平均値の定理)、6.(関数値の変動と導関数)、問6.の解答を求めてみる。


  1. 1+x2-1+2x=1+2x+x2-1-2x=x2>0

    また、

    fx=1+xn-1+nx

    とおく。

    f'x=n1+xn-1-n=n1+xn-1-1>0f0=0

    よって、

    x>0fx>0

    ゆえに、帰納法により

    n>1,x>01+xn>1+nx

    が成り立つ。

    (証明終)

コード

#!/usr/bin/env python3
from sympy import pprint, symbols, plot

print('6.')

x, n = symbols('x, n', positive=True)
f = (1 + x) ** n
g = 1 + n * x
fs = [f.subs({n: n0}) for n0 in range(2, 7)]
gs = [g.subs({n: n0}) for n0 in range(2, 7)]
for f0, g0 in zip(fs, gs):
    print(bool(f0 - g0))
    print()

p = plot(*fs, *gs,
         (x, 0, 5),
         ylim=(1, 6),
         legend=True,
         show=False)

colors = ['red', 'green', 'blue', 'brown', 'orange',
          'purple', 'pink', 'gray', 'skyblue', 'yellow']

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

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

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

% ./sample6.py
6.
True

True

True

True

True

%

0 コメント:

コメントを投稿