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

2019年1月18日金曜日

学習環境

解析入門 原書第3版 (S.ラング(著)、松坂 和夫(翻訳)、片山 孝次(翻訳)、岩波書店)の第3部(積分)、第13章(積分の応用)、補充問題、曲線の長さの練習問題7の解答を求めてみる。


  1. 130(ddt9t2)2+(ddt(9t3-3t))2dt=130(32·2t)2+(32·3t2-3)2dt=13036t4+22·34t2-2·34t2+32dt13=334t4+22·32t2-2·32t2+1dt=313034t4+2·32t2+1dt=3130(32t2+1)2dt=3130(32t2+1)dt=3[3t3+t]103=3(3·133+13)=63=23

コード

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, Integral, Derivative, plot, sqrt
from sympy.plotting import plot_parametric

t = symbols('t', real=True)

x = 9 * t ** 2
y = 9 * t ** 3 - 3 * t
I = Integral(sqrt(Derivative(x, t, 1) ** 2 +
                  Derivative(y, t, 1) ** 2), (t, 0, 1 / sqrt(3)))

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

p = plot_parametric((x, y, (t, -1, 0)),
                    (x, y, (t, 0, 1 / sqrt(3))),
                    (x, y, (t, 1 / sqrt(3), 1)),
                    legend=True,
                    show=False)
colors = ['red', 'green', 'blue']
for i, color in enumerate(colors):
    p[i].line_color = color
p.save('sample7.png')

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

$ python3 sample7.py
√3                                          
──                                          
3                                           
⌠                                           
⎮       _________________________________   
⎮      ╱           2                   2    
⎮     ╱  ⎛d ⎛   2⎞⎞    ⎛d ⎛   3      ⎞⎞     
⎮    ╱   ⎜──⎝9⋅t ⎠⎟  + ⎜──⎝9⋅t  - 3⋅t⎠⎟   dt
⎮  ╲╱    ⎝dt      ⎠    ⎝dt            ⎠     
⌡                                           
0                                           

              √3        
  √3          ──        
  ──          3         
  3           ⌠         
  ⌠           ⎮     2   
3⋅⎮  1 dt + 3⋅⎮  9⋅t  dt
  ⌡           ⌡         
  0           0         

2⋅√3

$

0 コメント:

コメントを投稿