2020年1月15日水曜日

学習環境

解析入門(上) (松坂和夫 数学入門シリーズ 4) (松坂 和夫(著)、岩波書店)の第8章(積分の計算)、8.2(定積分の計算)、問題6の解答を求めてみる。



    1. t = x + x 2 - 1

      とおくと、

      dt dx = 1 + x x 2 - 1 = x + x 2 - 1 x 2 - 1 1 dx x + a x 2 - 1 = 1 1 x + a x 2 - 1 · x 2 - 1 x + x 2 - 1 dt = 1 dt x + a x + x 2 - 1 = 1 dt t x + a t - x = x 2 - 1 x 2 - 2 t x + t 2 = x 2 - 1 x = t 2 + 1 2 t 1 dt t x + a = 1 dt t t 2 + 1 2 t + a = 1 2 t 2 + 2 a t + 1 dt = 2 1 dt t + a 2 + 1 - a 2 s = t + a d s dt = 1 2 1 dt t + a 2 + 1 - a 2 = 2 a d s s 2 + 1 - a 2 = 2 lim b a b d s s 2 + 1 - a 2

      場合分け。

      a < 1

      の場合、

      2 lim b a b d s s 2 + 1 - a 2 = 2 lim n a b d s s 2 + 1 - a 2 2 = 2 lim b 1 1 - a 2 arctan s 1 - a 2 n = 2 1 - a 2 lim b arctan b 1 - a 2 - arctan a 1 - a 2 = 2 1 - a 2 π 2 - arctan a 1 - a 2

      また、

      a = 1

      の場合、

      2 lim b a b d s s 2 = 2 lim b - 1 s a b = 2 lim b - 1 b + 1 a = 2 a

      また、

      a > 1

      の場合、

      2 lim b a b d s s 2 + 1 - a 2 = 2 lim b a b d s s 2 - a 2 - 1 2 A s + a 2 - 1 + B s - a 2 - 1 = A + B s + B - A a 2 - 1 s 2 - a 2 - 1 2 A + B = 0 B - A = 1 a 2 - 1 2 B = 1 a 2 - 1 B = 1 2 a 2 - 1 A = - 1 2 a 2 - 1 2 lim b a b d s s 2 + 1 - a 2 = 1 a 2 - 1 lim b a b 1 s - a 2 - 1 - 1 s + a 2 - 1 d s = 1 a 2 - 1 lim b log s - a 2 - 1 s + a 2 - 1 a b = 1 a 2 - 1 lim b log b - a 2 - 1 b + a 2 - 1 - log a - a 2 - 1 a + a 2 - 1 = 1 a 2 - 1 log a + a 2 - 1 a - a 2 - 1

    2. t = 1 + 2 a cos θ + a 2 dt d θ = - 2 a sin θ 0 π sin θ 1 + 2 a cos θ + a 2 d θ = - 1 2 a a + 2 a + 1 a 2 - 2 a + 1 1 t dt = - 1 2 a · 2 t a 2 + 2 a + 1 a 2 - 2 a + 1 = - 1 a a 2 - 2 a + 1 - a 2 + 2 a + 1 = - 1 a a - 1 2 + a + 1 2 a 1 - 1 a a - 1 + a + 1 = - 2 a 1 - 1 a 1 - a + a + 1 = - 2 a a - 1 - 1 a 1 - a - a - 1 = 2

コード

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

print('6.')

x, a = symbols('x, a', real=True)
f = 1 / ((x + a) * sqrt(x ** 2 - 1))
g = sin(x) / sqrt(1 + 2 * a * cos(x) + a ** 2)
xs = [(1, oo), (0, pi)]
for i, (h, (x1, x2)) in enumerate(zip([f, g], xs), 1):
    print(f'({i})')
    I = Integral(h, (x, x1, x2))
    for o in [I, I.doit()]:
        pprint(o.simplify())
        print()


p = plot(*[h.subs({a: a0})
           for h in [f, g]
           for a0 in range(-2, 3)],
         (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(p, colors):
    pprint(o)
    print()

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

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

% ./sample6.py 
6.
(1)
∞                       
⌠                       
⎮          1            
⎮ ─────────────────── dx
⎮            ________   
⎮           ╱  2        
⎮ (a + x)⋅╲╱  x  - 1    
⌡                       
1                       

⎧⎧a⋅(2⋅acosh(│a│) - ⅈ⋅π) + ⅈ⋅π⋅│a│       2                          
⎪⎪────────────────────────────────  for a  > 1                      
⎪⎪            ________                                              
⎪⎪           ╱  2                                                   
⎪⎪       2⋅╲╱  a  - 1 ⋅│a│                                          
⎪⎪                                                                  
⎪⎨                     π⋅│a│                    for 2⋅│arg(a)│ < 2⋅π
⎪⎪      -a⋅asin(│a│) + ─────                                        
⎪⎪                       2                                          
⎪⎪      ────────────────────        otherwise                       
⎪⎪           ________                                               
⎨⎪          ╱      2                                                
⎪⎩        ╲╱  1 - a  ⋅│a│                                           
⎪                                                                   
⎪          ∞                                                        
⎪          ⌠                                                        
⎪          ⎮          1                                             
⎪          ⎮ ─────────────────── dx                  otherwise      
⎪          ⎮            ________                                    
⎪          ⎮           ╱  2                                         
⎪          ⎮ (a + x)⋅╲╱  x  - 1                                     
⎪          ⌡                                                        
⎩          1                                                        

(2)
π                            
⌠                            
⎮          sin(x)            
⎮ ──────────────────────── dx
⎮    _____________________   
⎮   ╱  2                     
⎮ ╲╱  a  + 2⋅a⋅cos(x) + 1    
⌡                            
0                            

⎧     ______________      ______________           
⎪    ╱  2                ╱  2                      
⎪- ╲╱  a  - 2⋅a + 1  + ╲╱  a  + 2⋅a + 1            
⎨───────────────────────────────────────  for a ≠ 0
⎪                   a                              
⎪                                                  
⎩                   2                     otherwise

(cartesian line: 1/((x - 2)*sqrt(x**2 - 1)) for x over (-5.0, 5.0), red)

(cartesian line: 1/((x - 1)*sqrt(x**2 - 1)) for x over (-5.0, 5.0), green)

(cartesian line: 1/(x*sqrt(x**2 - 1)) for x over (-5.0, 5.0), blue)

(cartesian line: 1/((x + 1)*sqrt(x**2 - 1)) for x over (-5.0, 5.0), brown)

(cartesian line: 1/((x + 2)*sqrt(x**2 - 1)) for x over (-5.0, 5.0), orange)

(cartesian line: sin(x)/sqrt(5 - 4*cos(x)) for x over (-5.0, 5.0), purple)

(cartesian line: sin(x)/sqrt(2 - 2*cos(x)) for x over (-5.0, 5.0), pink)

(cartesian line: sin(x) for x over (-5.0, 5.0), gray)

(cartesian line: sin(x)/sqrt(2*cos(x) + 2) for x over (-5.0, 5.0), skyblue)

(cartesian line: sin(x)/sqrt(4*cos(x) + 5) for x over (-5.0, 5.0), yellow)

%

0 コメント:

コメントを投稿