2017年9月16日土曜日

学習環境

数学読本〈5〉微分法の応用/積分法/積分法の応用/行列と行列式(松坂 和夫(著)、岩波書店)の第20章(面積、体積、長さ - 積分法の応用)、20.1(面積)、面積の公式、問1.を取り組んでみる。


    1. y=( x+1 )( x1 ) 1 1 ( 0( x 2 1 ) )dx =2 0 1 x 2 dx +2 0 1 1dx =2 [ 1 3 x 3 ] 0 1 +2 [ x ] 0 1 = 2 3 +2 = 4 3

    2. y=( 1x )( x 2 +x+1 ) 0 1 ( 1 x 3 )dx = [ x 1 4 x 4 ] 0 1 =1 1 4 = 3 4

    3. y= x 2 ( 1x ) 0 1 ( x 2 x 3 )dx = [ 1 3 x 3 1 4 x 4 ] 0 1 = 1 3 1 4 = 1 12

    4. y=( x 2 2x3 ) =( x3 )( x+1 ) 1 3 ( x 2 +2x+3 )dx = [ 1 3 x 3 + x 2 +3x ] 1 3 =( 9+9+9 )( 1 3 +13 ) =9+ 5 3 = 32 3

    5. x 2 = x 2 +3x+5 2 x 2 3x5=0 ( x+1 )( 2x5 )=0 x=1, 5 2 0 2 ( ( x 2 +3x+5 ) x 2 )dx = 0 2 ( 2 x 2 +3x+5 )dx = [ 2 3 x 3 + 3 2 x 2 +5x ] 0 2 = 16 3 +6+10 = 32 3

    6. y= x x 2 = x x 4 =x x( x 3 1 )=0 x=0,1 0 1 ( x x 2 )dx = [ 2 3 x 3 2 1 3 x 3 ] 0 1 = 2 3 1 3 = 1 3

    7. y 2 =3x x= y 2 3 4y y 2 = y 2 3 12y3 y 2 = y 2 4 y 2 12y=0 4y( y3 )=0 y=0,3 0 3 ( ( 4y y 2 ) y 2 3 )dy = 0 3 ( 4y 4 3 y 2 )dy = [ 2 y 2 4 9 y 3 ] 0 3 =1812 =6

    8. 0 π 4 cosxdx = [ sinx ] 0 π 4 =sin π 4 sin0 = 1 2

    9. sinx=cosx x= π 4 0 π 4 ( cosxsinx )dx = [ sinx+cosx ] 0 π 4 =( sin π 4 +cos π 4 )( sin0+cos0 ) = 1 2 + 1 2 ( 0+1 ) = 2 2 1 = 2 1

    10. = 0 π sinxdx π 2π sinxdx + 2π 3π sinxdx =2 0 π sinxdx π 2π sinxdx =2 [ cosx ] 0 π [ cosx ] π 2π =2( cosπ+cos0 )+( cos2πcosπ ) =2( 1+1 )+( 1+1 ) =6

    11. y= 1 x y= 5 2 x 5 2 x= 1 x 5 2 x x 2 1=0 2 x 2 5x+2=0 x= 5± 2516 4 = 5± 9 4 = 5±3 4 = 1 2 ,2 1 2 2 ( ( 5 2 x ) 1 x )dx = 1 2 2 ( 5 2 x 1 x )dx = [ 5 2 x 1 2 x 2 logx ] 1 2 2 =( 52log2 )( 5 4 1 8 log 1 2 ) =( 3log2 )( 9 8 log 1 2 ) = 15 8 log2+log 1 2 = 15 8 log2log2 = 15 8 2log2

コード(Emacs)

Python 3

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from sympy import pprint, symbols, Integral, sqrt, cos, pi, sin, Rational

print('1.')
x = symbols('x')
fs = [(0 - (x ** 2 - 1), (-1, 1)),
      (1 - x ** 3, (0, 1)),
      (x ** 2 - x ** 3, (0, 1)),
      (- x ** 2 + 2 * x + 3, (-1, 3)),
      (-x ** 2 + 3 * x + 5 - x ** 2, (0, 2)),
      (sqrt(x) - x ** 2, (0, 1)),
      ((4 * x - x ** 2) - x ** Rational(2, 3), (0, 3)),
      (cos(x), (0, pi / 4)),
      (cos(x) - sin(x), (0, pi / 4)),
      (abs(sin(x)), (0, 3 * pi)),
      (Rational(5, 2) - x - 1 / x, (Rational(1, 2), 2))]

for i, (f, (x1, x2)) in enumerate(fs, 1):
    print(f'({i})')
    I = Integral(f, (x, x1, x2))
    for g in [I, I.doit()]:
        pprint(g)
        print()
    print()

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

$ ./sample1.py
1.
(1)
1               
⌠               
⎮  ⎛   2    ⎞   
⎮  ⎝- x  + 1⎠ dx
⌡               
-1              

4/3


(2)
1              
⌠              
⎮ ⎛   3    ⎞   
⎮ ⎝- x  + 1⎠ dx
⌡              
0              

3/4


(3)
1               
⌠               
⎮ ⎛   3    2⎞   
⎮ ⎝- x  + x ⎠ dx
⌡               
0               

1/12


(4)
3                     
⌠                     
⎮  ⎛   2          ⎞   
⎮  ⎝- x  + 2⋅x + 3⎠ dx
⌡                     
-1                    

32/3


(5)
2                      
⌠                      
⎮ ⎛     2          ⎞   
⎮ ⎝- 2⋅x  + 3⋅x + 5⎠ dx
⌡                      
0                      

32/3


(6)
1             
⌠             
⎮ ⎛      2⎞   
⎮ ⎝√x - x ⎠ dx
⌡             
0             

1/3


(7)
3                       
⌠                       
⎮ ⎛   2/3    2      ⎞   
⎮ ⎝- x    - x  + 4⋅x⎠ dx
⌡                       
0                       

     2/3    
  9⋅3       
- ────── + 9
    5       


(8)
π          
─          
4          
⌠          
⎮ cos(x) dx
⌡          
0          

√2
──
2 


(9)
π                      
─                      
4                      
⌠                      
⎮ (-sin(x) + cos(x)) dx
⌡                      
0                      

-1 + √2


(10)
3⋅π            
 ⌠             
 ⎮  │sin(x)│ dx
 ⌡             
 0             

3⋅π            
 ⌠             
 ⎮  │sin(x)│ dx
 ⌡             
 0             


(11)
 2                 
 ⌠                 
 ⎮  ⎛     5   1⎞   
 ⎮  ⎜-x + ─ - ─⎟ dx
 ⎮  ⎝     2   x⎠   
 ⌡                 
1/2                

-2⋅log(2) + 15/8


$

0 コメント:

コメントを投稿