0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

不定積分の三角関数(sin,cos,tan)の早見表「List of integrals of trigonometric functions」をつくりたい。sympyで

Last updated at Posted at 2023-10-04
  • 表と言いながら、罫線はありません。(いつの日か、markdown表で)
  • ソースコードあります。約分?通分?log? 色々あります。(勉強中)
  • mathematicaにありますか?

wikipedia

(勉強中)早見表 ver0.1

  • sin,cos,tanの(4乗)から(-4乗)までです。
  • 記号はxです。wikipediaの記号にしました。
  • 確認できた式の行に、◎をつけています。
#    ∫sin(x)^( 4)dx = 3*x/8 - sin(2*x)/4 + sin(4*x)/32
#    ∫sin(x)^( 3)dx = cos(x)**3/3 - cos(x)
#    ∫sin(x)^( 2)dx = x/2 - sin(x)*cos(x)/2
# ◎ ∫sin(x)^( 1)dx = -cos(x)
#    ∫sin(x)^(-1)dx = log(sqrt(cos(x) - 1)/sqrt(cos(x) + 1))
#    ∫sin(x)^(-2)dx = -1/tan(x)
#    ∫sin(x)^(-3)dx = log((cos(x) - 1)**(1/4)/(cos(x) + 1)**(1/4)) + cos(x)/(2*cos(x)**2 - 2)
#    ∫sin(x)^(-4)dx = -2/(3*tan(x)) - cos(x)/(3*sin(x)**3)
#    ------------------------------------------------------------------------------------------
#    ∫cos(x)^( 4)dx = 3*x/8 + sin(2*x)/4 + sin(4*x)/32
#    ∫cos(x)^( 3)dx = -sin(x)**3/3 + sin(x)
#    ∫cos(x)^( 2)dx = x/2 + sin(x)*cos(x)/2
# ◎ ∫cos(x)^( 1)dx = sin(x)
#    ∫cos(x)^(-1)dx = log(sqrt(sin(x) + 1)/sqrt(sin(x) - 1))
#    ∫cos(x)^(-2)dx = tan(x)
#    ∫cos(x)^(-3)dx = log((sin(x) + 1)**(1/4)/(sin(x) - 1)**(1/4)) - sin(x)/(2*sin(x)**2 - 2)
#    ∫cos(x)^(-4)dx = sin(x)/(3*cos(x)**3) + 2*tan(x)/3
#    ------------------------------------------------------------------------------------------
#    ∫tan(x)^( 4)dx = (3*x*cos(x)/4 + x*cos(3*x)/4 - sin(3*x)/3)/cos(x)**3
#    ∫tan(x)^( 3)dx = log(cos(x)) + 1/(2*cos(x)**2)
#    ∫tan(x)^( 2)dx = -x + sin(x)/cos(x)
#  ◎ ∫tan(x)^( 1)dx = -log(cos(x))
#    ∫tan(x)^(-1)dx = log(sin(x))
#    ∫tan(x)^(-2)dx = -x - 1/tan(x)
#    ∫tan(x)^(-3)dx = -log(sin(x)) - 1/(2*sin(x)**2)
#    ∫tan(x)^(-4)dx = (3*x*sin(x)/4 - x*sin(3*x)/4 - cos(3*x)/3)/sin(x)**3

早見表 ver0.1作成のソースコード

To apply identities 1 and 2 from right to left, use logcombine().
https://docs.sympy.org/latest/tutorials/intro-tutorial/simplification.html#logcombine

# sin,cos,tanの(4乗)から(-4乗)までです。
from sympy import *
var('x',real   =True)
var('p',integer=True)
def myMk(f,p):
     return ""+str(f)+"^("+str(p).rjust(2) + ")dx ="
def myEq(f):
     p= 4; y=f**p ;print("#   ",myMk(f,p),           integrate(y).simplify()   )
     p= 3; y=f**p ;print("#   ",myMk(f,p),           integrate(y)              )
     p= 2; y=f**p ;print("#   ",myMk(f,p),           integrate(y)              )
     p= 1; y=f**p ;print("#   ",myMk(f,p),           integrate(y)              )
     p=-1; y=f**p ;print("#   ",myMk(f,p),logcombine(integrate(y),force=True ) )
     p=-2; y=f**p ;print("#   ",myMk(f,p),           integrate(y).simplify()   )
     p=-3; y=f**p ;print("#   ",myMk(f,p),logcombine(integrate(y),force=True ) )
     p=-4; y=f**p ;print("#   ",myMk(f,p),           integrate(y).simplify()   )
     return
myEq(sin(x))      ;print("#   ",90*"-")
myEq(cos(x))      ;print("#   ",90*"-")
myEq(tan(x))

いつもの? sympyの実行環境と 参考のおすすめです。

(テンプレート)

参考

以下、いつもの?おすすめです。

教えて下さい。

~~Using the beta function ~~
定積分は、奇数、偶数で分けてありました。
証明を探しています。
https://en.wikipedia.org/wiki/List_of_integrals_of_trigonometric_functions#Integrals_in_a_quarter_period

(2023/10/07修正)

過去問でサイト内検索

「大学入試数学問題集成」様 サイト内

(勉強中)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?