Processing math: 100%

2017年12月14日木曜日

学習環境

解析入門〈3〉(松坂 和夫(著)、岩波書店)の第12章(距離空間の位相)、12.4(n次元実数空間における曲線)、問題6.を取り組んでみる。


  1. γ'(t)=(a(1-cost),arcsint)|r'(t)|=a2(1-cost)2+a2sin2t=a1+cos2t-2cost+sin2t=a2-2cost=a2(1-cost)

    ここで、 三角関数の加法定理より、

    cost=cos(t2+t2)=cos2t2-sin2t2=1-sin2t2-sin2t2=1-2sin2t21-cost=2sin2t2

    となるので、

    |γ'(t)|=a2·2sin2t2=2a·sint2

    よって、求める曲線サイクロイドの長さは、

    2π0|γ'(t)|dt=2a2π0sint2dt=2a[-2cost2]2π0=-4a(cos2π2-cos02)=-4a(-2)=8a

コード(Emacs)

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, sqrt, sin, cos, pi, Integral

t = symbols('t', real=True)
a = symbols('a', positive=True)
f = sqrt(a ** 2 * (1 - cos(t)) ** 2 + a ** 2 * sin(t) ** 2)
I = Integral(f, (t, 0, 2 * pi))

for o in [f, I, I.doit()]:
    pprint(o)
    print()

f = a * sqrt(2 * (1 - cos(t)))
I = Integral(f, (t, 0, 2 * pi))
for o in [f, I, I.doit()]:
    pprint(o)
    print()

f = 2 * a * Integral(sin(t / 2), (t, 0, 2 * pi))
for o in [f, I, I.doit()]:
    pprint(o)
    print()

入出力結果(Terminal, Jupyter(IPython))

$ ./sample6.py
   ________________________________
  ╱  2              2    2    2    
╲╱  a ⋅(-cos(t) + 1)  + a ⋅sin (t) 

2⋅π                                       
 ⌠                                        
 ⎮     ________________________________   
 ⎮    ╱  2              2    2    2       
 ⎮  ╲╱  a ⋅(-cos(t) + 1)  + a ⋅sin (t)  dt
 ⌡                                        
 0                                        

  2⋅π                                         
   ⌠                                          
   ⎮     __________________________________   
   ⎮    ╱    2         2                      
a⋅ ⎮  ╲╱  sin (t) + cos (t) - 2⋅cos(t) + 1  dt
   ⌡                                          
   0                                          

    _______________
a⋅╲╱ -2⋅cos(t) + 2 

2⋅π                       
 ⌠                        
 ⎮      _______________   
 ⎮  a⋅╲╱ -2⋅cos(t) + 2  dt
 ⌡                        
 0                        

     2⋅π                   
      ⌠                    
      ⎮    _____________   
√2⋅a⋅ ⎮  ╲╱ -cos(t) + 1  dt
      ⌡                    
      0                    

    2⋅π          
     ⌠           
     ⎮     ⎛t⎞   
2⋅a⋅ ⎮  sin⎜─⎟ dt
     ⎮     ⎝2⎠   
     ⌡           
     0           

2⋅π                       
 ⌠                        
 ⎮      _______________   
 ⎮  a⋅╲╱ -2⋅cos(t) + 2  dt
 ⌡                        
 0                        

     2⋅π                   
      ⌠                    
      ⎮    _____________   
√2⋅a⋅ ⎮  ╲╱ -cos(t) + 1  dt
      ⌡                    
      0                    

$

0 コメント:

コメントを投稿