2020年2月17日月曜日

学習環境

解析入門(上) (松坂和夫 数学入門シリーズ 4) (松坂 和夫(著)、岩波書店)の第9章(関数列と関数級数)、9.2(整級数)、問題3の解答を求めてみる。



    1. lim n log n log n + 1 = 1 - 1 n log n 1 log n

      よって、収束半径、収束区間はそれぞれ

      R = 1 - 1. , 1

    2. lim n 2 n n = 2 R = 1 2

      収束区間の端点における収束・発散について。

      2 n · 1 2 n = 1

      よって、

      1 2

      では発散する。

      2 n - 1 2 n = - 1 n

      よって

      - 1 2

      でも発散する。

      ゆえに、収束域は、

      - 1 2 , 1 2 x < 1 2

    3. lim n 1 2 n n = 1 2 R = 2 1 2 n - 2 n = - 1 n 1 2 n 2 n = 1 - 2 , 2 x < 2

    4. lim n n + 1 p n p = lim n 1 + 1 n p = 1 R = 1 n p 1 n = n p n p - 1 n - 1 , 1 x < 1

    5. lim n n p n + 1 p = 1 R = 1 1 n p - 1 n 1 n p

      よって 収束区間の端点について、

      x = - 1

      では収束する。

      x = 1

      について、

      0 < p 1

      ならば、発散する。

      よって、

      0 < p 1

      ならば収束域は

      - 1 , 1

      また、

      1 > p

      ならば、

      - 1 , 1 x 1

    6. lim n n + 1 ! n + 1 n + 1 · n n n ! = lim n n + 1 n + 1 1 + 1 n n = 1 e R = e n ! n n e n

      よって、収束域は

      - e , e x < e

コード

#!/usr/bin/env python3
from sympy import symbols, log, factorial, summation, pprint, oo, Limit, root, plot
from sympy import Rational

print('3.')

n = symbols('n', integer=True)
x = symbols('x')
p = symbols('p', positive=True)
ts = [1 / log(n),
      2 ** n,
      1 / 2 ** n,
      n ** p,
      1 / n ** p,
      factorial(n) / n ** n]
ns = [2, 0, 0, 0, 1, 1]

for i, (t, n0) in enumerate(zip(ts, ns), 1):
    print(f'({i})')
    l1 = Limit(root(t, n), n, oo)
    l2 = Limit(t.subs({n: n+1}) / t, n, oo)
    s = summation(t, (n, n0, oo))
    for o in [l1, l1.doit(), l2, l2.doit(), s]:
        pprint(o)
        print()

fs = [sum([t.subs({n: i}) * x ** i for i in range(n0, n0 + 5)])
      for t, n0 in zip(ts[:3] + [ts[5]], ns[:3] + [ns[5]])]
gs = [sum([t.subs({n: i, p: p0}) * x ** i for i in range(n0, n0 + 5)])
      for t, n0 in zip(ts[3:5], ns[3:5])
      for p0 in [Rational(1, 2), 1, 2]]
p = plot(*fs, *gs,
         (x, -5, 5),
         ylim=(-5, 5),
         legend=False,
         show=False)

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

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

for o in zip(fs + gs, colors):
    pprint(o)

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

入出力結果(Zsh、PowerShell、Terminal、Jupyter(IPython))

% ./sample3.py
3.
(1)
        ________
       ╱   1    
lim n ╱  ────── 
n─→∞╲╱   log(n) 

1

    ⎛  log(n)  ⎞
lim ⎜──────────⎟
n─→∞⎝log(n + 1)⎠

1

  ∞         
 ____       
 ╲          
  ╲         
   ╲    1   
   ╱  ──────
  ╱   log(n)
 ╱          
 ‾‾‾‾       
n = 2       

(2)
lim 2
n─→∞ 

2

    ⎛ -n  n + 1⎞
lim ⎝2  ⋅2     ⎠
n─→∞            

2

∞

(3)
lim (1/2)
n─→∞     

1/2

    ⎛ n  -n - 1⎞
lim ⎝2 ⋅2      ⎠
n─→∞            

1/2

2

(4)
       ____
    n ╱  p 
lim ╲╱  n  
n─→∞       

1

    ⎛ -p        p⎞
lim ⎝n  ⋅(n + 1) ⎠
n─→∞              

1

  ∞     
 ___    
 ╲      
  ╲    p
  ╱   n 
 ╱      
 ‾‾‾    
n = 0   

(5)
       _____
    n ╱  -p 
lim ╲╱  n   
n─→∞        

1

    ⎛ p        -p⎞
lim ⎝n ⋅(n + 1)  ⎠
n─→∞              

1

⎧  ζ(p)     for p > 1
⎪                    
⎪  ∞                 
⎪ ___                
⎪ ╲                  
⎨  ╲    -p           
⎪  ╱   n    otherwise
⎪ ╱                  
⎪ ‾‾‾                
⎪n = 1               
⎩                    

(6)
       ________
    n ╱  -n    
lim ╲╱  n  ⋅n! 
n─→∞           

 -1
ℯ  

    ⎛ n        -n - 1         ⎞
    ⎜n ⋅(n + 1)      ⋅(n + 1)!⎟
lim ⎜─────────────────────────⎟
n─→∞⎝            n!           ⎠

 -1
ℯ  

  ∞         
 ___        
 ╲          
  ╲    -n   
  ╱   n  ⋅n!
 ╱          
 ‾‾‾        
n = 1       

⎛   6        5        4        3        2       ⎞
⎜  x        x        x        x        x        ⎟
⎜────── + ────── + ────── + ────── + ──────, red⎟
⎝log(6)   log(5)   log(4)   log(3)   log(2)     ⎠
⎛    4      3      2                 ⎞
⎝16⋅x  + 8⋅x  + 4⋅x  + 2⋅x + 1, green⎠
⎛ 4    3    2              ⎞
⎜x    x    x    x          ⎟
⎜── + ── + ── + ─ + 1, blue⎟
⎝16   8    4    2          ⎠
⎛    5      4      3    2           ⎞
⎜24⋅x    3⋅x    2⋅x    x            ⎟
⎜───── + ──── + ──── + ── + x, brown⎟
⎝ 625     32     9     2            ⎠
⎛   4       3       2            ⎞
⎝2⋅x  + √3⋅x  + √2⋅x  + x, orange⎠
⎛   4      3      2            ⎞
⎝4⋅x  + 3⋅x  + 2⋅x  + x, purple⎠
⎛    4      3      2          ⎞
⎝16⋅x  + 9⋅x  + 4⋅x  + x, pink⎠
⎛    5    4       3       2          ⎞
⎜√5⋅x    x    √3⋅x    √2⋅x           ⎟
⎜───── + ── + ───── + ───── + x, gray⎟
⎝  5     2      3       2            ⎠
⎛ 5    4    3    2             ⎞
⎜x    x    x    x              ⎟
⎜── + ── + ── + ── + x, skyblue⎟
⎝5    4    3    2              ⎠
⎛ 5    4    3    2            ⎞
⎜x    x    x    x             ⎟
⎜── + ── + ── + ── + x, yellow⎟
⎝25   16   9    4             ⎠
%

0 コメント:

コメントを投稿