Processing math: 100%

2019年1月11日金曜日

学習環境

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


  1. 1+(ddxlogx)2dx=1+1x2dx=x2+1xdxt=x2+1dtdx=12·2x·1x2+1=xx2+1tx·x2+1xdt=t2x2dt=t2t2-1dt=t2-1+1t2-1dt=(1+1t2-1)dt=t+1t2-1dtat+1+bt-1=(a+b)t+(-a+b)t2-1a+b=0-a+b=12b=1b=12a=-121t2-1dt=12(1t-1-1t+1)dt=12(log(t-1)-log(t+1))x=12,t=52x=2,t=5

    よって求める曲線、対数関数の指示された区間における長さは、

    [t]552+12[logt-1t+1]552=5-52+12(log5-15+1-log5-25+2)=52+12log(5-15+1·5+25-2)=52+12log3+53-5=52+12log(3+5)24=52+log3+52

コード

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, Integral, Derivative, plot, sqrt, Rational
from sympy import log

x = symbols('x')

f = log(x)
I = Integral(sqrt(1 + Derivative(f, x, 1) ** 2), (x, Rational(1, 2), 2))

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

p = plot((f, (x, 0.1, Rational(1, 2))),
         (f, (x, Rational(1, 2), 2)),
         (f, (x, 2, 3)),
         legend=True, show=False)
colors = ['red', 'green', 'blue']
for i, color in enumerate(colors):
    p[i].line_color = color
p.save('sample2.png')

for t in [I.doit(), sqrt(5) / 2 + log((3 + sqrt(5)) / 2)]:
    print(float(t))

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

$ python3 sample1.py
1.
4                          
⌠                          
⎮      _________________   
⎮     ╱           2        
⎮    ╱  ⎛d ⎛ 3/2⎞⎞         
⎮   ╱   ⎜──⎝x   ⎠⎟  + 1  dx
⎮ ╲╱    ⎝dx      ⎠         
⌡                          
0                          

  8    80⋅√10
- ── + ──────
  27     27  

$

0 コメント:

コメントを投稿