数学のブログ

3重積分 重心 密度、一様、物体、対数関数、累乗、部分積分法

続 解析入門 (原書第2版) (S.ラング(著)、松坂 和夫(翻訳)、片山 孝次(翻訳)、岩波書店)の第9章(3重積分)、3(重心)の練習問題7の解答を求めてみる。

m = 1 a log x dx = [ x log x ] 1 a - 1 a x · 1 x d x = a log a - 1 a dx = a log a - ( a - 1 ) = a log a - a + 1

重心の各座標。

x - = 1 m 1 a 0 log x x dy dx = 1 m 1 a x log x dx = 1 m ( [ 1 2 x 2 log x ] 1 a - 1 a 1 2 x 2 · 1 x dx ) = 1 2 m ( a 2 log a - 1 a x dx ) = 1 2 m ( a 2 log a - [ 1 2 x 2 ] 1 a ) = 1 2 m ( a 2 log a - 1 2 a 2 + 1 2 ) = 1 4 ( a log a - a + 1 ) ( 2 a 2 log a - a 2 + 1 )

また、

y - = 1 m 1 a 0 log x y d y dx = 1 2 m 1 a ( log x ) 2 d x = 1 2 m ( [ x ( log x ) 2 ] 1 a - 1 a x · 2 ( log x ) 1 x dx ) = 1 2 m ( a ( log a ) 2 - 2 1 a log x dx ) = 1 2 m ( a ( log a ) 2 - 2 ( [ x log x ] 1 a - 1 a dx ) ) = 1 2 m ( a ( log a ) 2 - 2 ( a log a - ( a - 1 ) ) ) = a ( log a ) 2 2 ( a log a - a + 1 ) - 1

コード

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

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

a = 5
x = symbols('x')
p = plot(log(x),
         (2 * a ** 2 * log(a) - a ** 2 + 1) / (4 * (a * log(a) - a + 1)),
         a * log(a) ** 2 / (2 * (a * log(a) - a + 1)) - 1,
         (x, 1, a),
         legend=True,
         show=False)

for o, color in zip(p, colors):
    o.line_color = color
p.show()
p.save('sample7.png')

入出力結果

% ./sample6.py
%