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 3 years have passed since last update.

ローラン級数(Laurent Series)のテイラー展開を試す。

Last updated at Posted at 2021-02-11

ローラン級数Laurent Series)の概念が難しく手を焼いています
ローラン級数 - Wikipedia

負冪の項も含む形での冪級数としての関数の表示のことである。テイラー級数展開できない複素関数を表示する場合に利用される。ローラン級数の名は、最初の発表が1843年ピエール・アルフォンス・ローランによってなされたことに由来する。ローラン級数の概念自体はそれより先の1841年カール・ワイエルシュトラスによって発見されていたが公表されなかった。

こういう時にはとりあえず例題を動かしてみるに限ります。

関数exp(x)/x+exp(-x)のローラン変換
image.gif

Macrolin_expansion_Laurent<-function(x){

#グラフのスケール決定
Graph_scale_x<-c(0,3)
Graph_scale_y<-c(0,100)
#関数と凡例の決定
switch(x,
"0"= f0<-function(x) {2*x/x},
"1"= f0<-function(x) {2*(x^-1)+2+x/2},
"2"= f0<-function(x) {(x^-2)/2+2*(x^-1)+2+x/2+(x^2)/6},
"3"= f0<-function(x) {(x^-3)/6+(x^-2)/2+2*(x^-1)+2+x/2+(x^2)/6+(x^3)/24},
"4"= f0<-function(x) {(x^-4)/24+(x^-3)/6+(x^-2)/2+2*(x^-1)+2+x/2+(x^2)/6+(x^3)/24+(x^4)/120},
"5"= f0<-function(x) {(x^-5)/120+(x^-4)/24+(x^-3)/6+(x^-2)/2+2*(x^-1)+2+x/2+(x^2)/6+(x^3)/24+(x^4)/120+(x^5)/720},
"6"= f0<-function(x) {(x^-6)/720+(x^-5)/120+(x^-4)/24+(x^-3)/6+(x^-2)/2+2*(x^-1)+2+x/2+(x^2)/6+(x^3)/24+(x^4)/120+(x^5)/720+(x^6)/5040},
"7"= f0<-function(x) {(x^-7)/5040+(x^-6)/720+(x^-5)/120+(x^-4)/24+(x^-3)/6+(x^-2)/2+2*(x^-1)+2+x/2+(x^2)/6+(x^3)/24+(x^4)/120+(x^5)/720+(x^6)/5040+(x^7)/40320},
"8"= f0<-function(x) {(x^-8)/40320+(x^-7)/5040+(x^-6)/720+(x^-5)/120+(x^-4)/24+(x^-3)/6+(x^-2)/2+2*(x^-1)+2+x/2+(x^2)/6+(x^3)/24+(x^4)/120+(x^5)/720+(x^6)/5040+(x^7)/40320+(x^8)/362880},
"9"= f0<-function(x) {(x^-9)/362880+(x^-8)/40320+(x^-7)/5040+(x^-6)/720+(x^-5)/120+(x^-4)/24+(x^-3)/6+(x^-2)/2+2*(x^-1)+2+x/2+(x^2)/6+(x^3)/24+(x^4)/120+(x^5)/720+(x^6)/5040+(x^7)/40320+(x^8)/362880+(x^9)/3628800}
)

switch(x,
"0"=text<-c("2"),
"1"=text<-c("2x^-1+2+1/2*x/2"),
"2"=text<-c("x^-2/2!+2x^-1+2+1/2*x/2!+x^2/3!"),
"3"=text<-c("x^-3/3!+x^-2/2!+2x^-1+2+1/2*x/2!+x^2/3!+x^3/4!"),
"4"=text<-c("x^-4/4!+x^-3/3!+x^-2/2!+2x^-1+2+1/2*x/2!+x^2/3!+x^3/4!+x^4/5!"),
"5"=text<-c("x^-5/5!+x^-4/4!+x^-3/3!+x^-2/2!+2x^-1+2+1/2*x/2!+x^2/3!+x^3/4!+x^4/5!+x^5/6!"),
"6"=text<-c("x^-6/6!+x^-5/5!+x^-4/4!+x^-3/3!+x^-2/2!+2x^-1+2+1/2*x/2!+x^2/3!+x^3/4!+x^4/5!+x^5/6!+x^6/7!"),
"7"=text<-c("x^-7/7!+x^-6/6!+x^-5/5!+x^-4/4!+x^-3/3!+x^-2/2!+2x^-1+2+1/2*x/2!+x^2/3!+x^3/4!+x^4/5!+x^5/6!+x^6/7!+x^7/8!"),
"8"=text<-c("x^-8/8!+x^-7/7!+x^-6/6!+x^-5/5!+x^-4/4!+x^-3/3!+x^-2/2!+2x^-1+2+1/2*x/2!+x^2/3!+x^3/4!+x^4/5!+x^5/6!+x^6/7!+x^7/8!+x^8/9!"),
"9"=text<-c("x^-9/9!+x^-8/8!+x^-7/7!+x^-6/6!+x^-5/5!+x^-4/4!+x^-3/3!+x^-2/2!+2x^-1+2+1/2*x/2!+x^2/3!+x^3/4!+x^4/5!+x^5/6!+x^6/7!+x^7/8!+x^8/9!+x^9/10!")
)

f1=function(x){exp(x)/x+exp(-x)}

plot(f1,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(0,0,0),main="Laurent expansion", xlab="X", ylab="Y")
par(new=T)#上書き指定
plot(f0,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(1,0,0),main="", xlab="", ylab="")

legend("topright", legend=c("exp(x)/x+exp(-x)",text),lty=c(1,1),col=c(rgb(0,0,0),rgb(1,0,0)))
}

library("animation")
Time_Code=c("0","0","0","1","1","1","2","2","2","3","3","3","4","4","4","5","5","5","6","6","6","7","7","7","8","8","8","9","9","9")
saveGIF({
for (i in Time_Code){
  Macrolin_expansion_Laurent(i)
}
}, interval = 0.1, movie.name = "Laurent01.gif")

あれ、これで合ってるの? そもそもテイラー展開への理解が決定的に不足しているので何もわかりません。何しろこれまでは著名な関数のそれの表示に使ってただけですからね。
【Rで球面幾何学】オイラーの公式を導出したマクローリン級数の限界?

#「収束半径が有限」の場合のテイラー展開

そもそもテーラー展開が生成する演算結果集合は、それ自体が演算対象となるので、当然演算規則があります。
第9回 テイラー展開の計算/ローラン級数

展開前の関数f(z)について変数をz→wと置き換えてからテイラー展開したものは、f(z)をテイラー展開してからz→wと置き換えたものと同じである。

関数のf(z)+g(z)の級数展開は、収束半径内では級数の各項の和で与えられる。

関数のf(z)g(z)の級数展開は、一般にはコーシー積で与えられるが、場合によってはより単純に計算できる場合もある。
コーシー積 - Wikipedia

関数の微分f′(z)積分 ∫f(z)dzをテイラー展開したものは、収束半径の内部においては関数をテイラー展開してから微分・積分を取ったものと等しい。また、収束半径は微分・積分の前後で同じ値となる。工夫をすれば、この性質を利用してテイラー展開を簡単化することもできる。

そもそも基本中の基本を試してませんでした。

1/(1-x)のテイラー展開
image.gif

Macrolin_expansion_Laurent<-function(x){

#グラフのスケール決定
Graph_scale_x<-c(0,3)
Graph_scale_y<-c(0,100)
#関数と凡例の決定
switch(x,
"0"= f0<-function(x) {x/x},
"1"= f0<-function(x) {x+1},
"2"= f0<-function(x) {1+x+x^2},
"3"= f0<-function(x) {1+x+x^2+x^3},
"4"= f0<-function(x) {1+x+x^2+x^3+x^4},
"5"= f0<-function(x) {1+x+x^2+x^3+x^4+x^5},
"6"= f0<-function(x) {1+x+x^2+x^3+x^4+x^5+x^6},
"7"= f0<-function(x) {1+x+x^2+x^3+x^4+x^5+x^6+x^7},
"8"= f0<-function(x) {1+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8},
"9"= f0<-function(x) {1+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8+x^9}
)

switch(x,
"0"=text<-c("1"),
"1"=text<-c("1+x"),
"2"=text<-c("1+x+x^2"),
"3"=text<-c("1+x+x^2+x^3"),
"4"=text<-c("1+x+x^2+x^3+x^4"),
"5"=text<-c("1+x+x^2+x^3+x^4+x^5"),
"6"=text<-c("1+x+x^2+x^3+x^4+x^5+x^6"),
"7"=text<-c("1+x+x^2+x^3+x^4+x^5+x^6+x^7"),
"8"=text<-c("1+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8"),
"9"=text<-c("1+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8+x^9")
)

f1=function(x){1/(1-x)}

plot(f1,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(0,0,0),main="Macrolin expansion", xlab="X", ylab="Y")
par(new=T)#上書き指定
plot(f0,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(1,0,0),main="", xlab="", ylab="")

legend("topright", legend=c("1/(1-x)",text),lty=c(1,1),col=c(rgb(0,0,0),rgb(1,0,0)))
}

library("animation")
Time_Code=c("0","0","0","1","1","1","2","2","2","3","3","3","4","4","4","5","5","5","6","6","6","7","7","7","8","8","8","9","9","9")
saveGIF({
for (i in Time_Code){
  Macrolin_expansion_Laurent(i)
}
}, interval = 0.1, movie.name = "Macrolin02.gif")

1/(1-x)^2のテイラー展開
image.gif

Macrolin_expansion_Laurent<-function(x){

#グラフのスケール決定
Graph_scale_x<-c(0,3)
Graph_scale_y<-c(0,100)
#関数と凡例の決定
switch(x,
"0"= f0<-function(x) {x/x},
"1"= f0<-function(x) {2*x+1},
"2"= f0<-function(x) {1+2*x+3*x^2},
"3"= f0<-function(x) {1+2*x+3*x^2+4*x^3},
"4"= f0<-function(x) {1+2*x+3*x^2+4*x^3+5*x^4},
"5"= f0<-function(x) {1+2*x+3*x^2+4*x^3+5*x^4+6*x^5},
"6"= f0<-function(x) {1+2*x+3*x^2+4*x^3+5*x^4+6*x^5+7*x^6},
"7"= f0<-function(x) {1+2*x+3*x^2+4*x^3+5*x^4+6*x^5+7*x^6+8*x^7},
"8"= f0<-function(x) {1+2*x+3*x^2+4*x^3+5*x^4+6*x^5+7*x^6+8*x^7+9*x^8},
"9"= f0<-function(x) {1+2*x+3*x^2+4*x^3+5*x^4+6*x^5+7*x^6+8*x^7+9*x^8+10*x^9}
)

switch(x,
"0"=text<-c("1"),
"1"=text<-c("1+2x"),
"2"=text<-c("1+2x+3x^2"),
"3"=text<-c("1+2x+3x^2+4x^3"),
"4"=text<-c("1+2x+3x^2+4x^3+5x^4"),
"5"=text<-c("1+2x+3x^2+4x^3+5x^4+6x^5"),
"6"=text<-c("1+2x+3x^2+4x^3+5x^4+6x^5+7x^6"),
"7"=text<-c("1+2x+3x^2+4x^3+5x^4+6x^5+7x^6+8x^7"),
"8"=text<-c("1+2x+3x^2+4x^3+5x^4+6x^5+7x^6+8x^7+9x^8"),
"9"=text<-c("1+2x+3x^2+4x^3+5x^4+6x^5+7x^6+8x^7+9x^8+10x^9")
)

f1=function(x){1/(1-x)^2}

plot(f1,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(0,0,0),main="Macrolin expansion", xlab="X", ylab="Y")
par(new=T)#上書き指定
plot(f0,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(1,0,0),main="", xlab="", ylab="")

legend("topright", legend=c("1/(1-x)^2",text),lty=c(1,1),col=c(rgb(0,0,0),rgb(1,0,0)))
}

library("animation")
Time_Code=c("0","0","0","1","1","1","2","2","2","3","3","3","4","4","4","5","5","5","6","6","6","7","7","7","8","8","8","9","9","9")
saveGIF({
for (i in Time_Code){
  Macrolin_expansion_Laurent(i)
}
}, interval = 0.1, movie.name = "Macrolin05.gif")

次いで1/(1+x)のテイラー展開。
image.gif

Macrolin_expansion_Laurent<-function(x){

#グラフのスケール決定
Graph_scale_x<-c(0,100)
Graph_scale_y<-c(0,2)
#関数と凡例の決定
switch(x,
"0"= f0<-function(x) {x/x},
"1"= f0<-function(x) {1-x},
"2"= f0<-function(x) {1-x+x^2},
"3"= f0<-function(x) {1-x+x^2-x^3},
"4"= f0<-function(x) {1-x+x^2-x^3+x^4},
"5"= f0<-function(x) {1-x+x^2-x^3+x^4-x^5},
"6"= f0<-function(x) {1-x+x^2-x^3+x^4-x^5+x^6},
"7"= f0<-function(x) {1-x+x^2-x^3+x^4-x^5+x^6-x^7},
"8"= f0<-function(x) {1-x+x^2-x^3+x^4-x^5+x^6-x^7+x^8},
"9"= f0<-function(x) {1-x+x^2-x^3+x^4-x^5+x^6-x^7+x^8-x^9}
)

switch(x,
"0"=text<-c("1"),
"1"=text<-c("1-x"),
"2"=text<-c("1-x+x^2"),
"3"=text<-c("1-x+x^2-x^3"),
"4"=text<-c("1-x+x^2-x^3+x^4"),
"5"=text<-c("1-x+x^2-x^3+x^4-x^5"),
"6"=text<-c("1-x+x^2-x^3+x^4-x^5+x^6"),
"7"=text<-c("1-x+x^2-x^3+x^4-x^5+x^6-x^7"),
"8"=text<-c("1-x+x^2-x^3+x^4-x^5+x^6-x^7+x^8"),
"9"=text<-c("1-x+x^2-x^3+x^4-x^5+x^6-x^7+x^8-x^9")
)

f1=function(x){1/(1+x)}

plot(f1,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(0,0,0),main="Macrolin expansion", xlab="X", ylab="Y")
par(new=T)#上書き指定
plot(f0,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(1,0,0),main="", xlab="", ylab="")

legend("topright", legend=c("1/(1+x)",text),lty=c(1,1),col=c(rgb(0,0,0),rgb(1,0,0)))
}

library("animation")
Time_Code=c("0","0","0","1","1","1","2","2","2","3","3","3","4","4","4","5","5","5","6","6","6","7","7","7","8","8","8","9","9","9")
saveGIF({
for (i in Time_Code){
  Macrolin_expansion_Laurent(i)
}
}, interval = 0.1, movie.name = "Macrolin03.gif")

そのアップ。収束遅い!!
image.gif

Macrolin_expansion_Laurent<-function(x){

#グラフのスケール決定
Graph_scale_x<-c(0,2)
Graph_scale_y<-c(0,2)
#関数と凡例の決定
switch(x,
"0"= f0<-function(x) {x/x},
"1"= f0<-function(x) {1-x},
"2"= f0<-function(x) {1-x+x^2},
"3"= f0<-function(x) {1-x+x^2-x^3},
"4"= f0<-function(x) {1-x+x^2-x^3+x^4},
"5"= f0<-function(x) {1-x+x^2-x^3+x^4-x^5},
"6"= f0<-function(x) {1-x+x^2-x^3+x^4-x^5+x^6},
"7"= f0<-function(x) {1-x+x^2-x^3+x^4-x^5+x^6-x^7},
"8"= f0<-function(x) {1-x+x^2-x^3+x^4-x^5+x^6-x^7+x^8},
"9"= f0<-function(x) {1-x+x^2-x^3+x^4-x^5+x^6-x^7+x^8-x^9}
)

switch(x,
"0"=text<-c("1"),
"1"=text<-c("1-x"),
"2"=text<-c("1-x+x^2"),
"3"=text<-c("1-x+x^2-x^3"),
"4"=text<-c("1-x+x^2-x^3+x^4"),
"5"=text<-c("1-x+x^2-x^3+x^4-x^5"),
"6"=text<-c("1-x+x^2-x^3+x^4-x^5+x^6"),
"7"=text<-c("1-x+x^2-x^3+x^4-x^5+x^6-x^7"),
"8"=text<-c("1-x+x^2-x^3+x^4-x^5+x^6-x^7+x^8"),
"9"=text<-c("1-x+x^2-x^3+x^4-x^5+x^6-x^7+x^8-x^9")
)

f1=function(x){1/(1+x)}

plot(f1,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(0,0,0),main="Macrolin expansion", xlab="X", ylab="Y")
par(new=T)#上書き指定
plot(f0,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(1,0,0),main="", xlab="", ylab="")

legend("topright", legend=c("1/(1+x)",text),lty=c(1,1),col=c(rgb(0,0,0),rgb(1,0,0)))
}

library("animation")
Time_Code=c("0","0","0","1","1","1","2","2","2","3","3","3","4","4","4","5","5","5","6","6","6","7","7","7","8","8","8","9","9","9")
saveGIF({
for (i in Time_Code){
  Macrolin_expansion_Laurent(i)
}
}, interval = 0.1, movie.name = "Macrolin04.gif")

ついでに1/(1+x)^2のテイラー展開。
image.gif

Macrolin_expansion_Laurent<-function(x){

#グラフのスケール決定
Graph_scale_x<-c(0,100)
Graph_scale_y<-c(0,2)
#関数と凡例の決定
switch(x,
"0"= f0<-function(x) {x/x},
"1"= f0<-function(x) {1-2*x},
"2"= f0<-function(x) {1-2*x+3*x^2},
"3"= f0<-function(x) {1-2*x+3*x^2-4*x^3},
"4"= f0<-function(x) {1-2*x+3*x^2-4*x^3+5*x^4},
"5"= f0<-function(x) {1-2*x+3*x^2-4*x^3+5*x^4-6*x^5},
"6"= f0<-function(x) {1-2*x+3*x^2-4*x^3+5*x^4-6*x^5+7*x^6},
"7"= f0<-function(x) {1-2*x+3*x^2-4*x^3+5*x^4-6*x^5+7*x^6-8*x^7},
"8"= f0<-function(x) {1-2*x+3*x^2-4*x^3+5*x^4-6*x^5+7*x^6-8*x^7+9*x^8},
"9"= f0<-function(x) {1-2*x+3*x^2-4*x^3+5*x^4-6*x^5+7*x^6-8*x^7+9*x^8-10*x^9}
)

switch(x,
"0"=text<-c("1"),
"1"=text<-c("1-2x"),
"2"=text<-c("1-2x+3x^2"),
"3"=text<-c("1-2x+3x^2-4x^3"),
"4"=text<-c("1-2x+3x^2-4x^3+5x^4"),
"5"=text<-c("1-2x+3x^2-4x^3+5x^4-6x^5"),
"6"=text<-c("1-2x+3x^2-4x^3+5x^4-6x^5+7x^6"),
"7"=text<-c("1-2x+3x^2-4x^3+5x^4-6x^5+7x^6-8x^7"),
"8"=text<-c("1-2x+3x^2-4x^3+5x^4-6x^5+7x^6-8x^7+9x^8"),
"9"=text<-c("1-2x+3x^2-4x^3+5x^4-6x^5+7x^6-8x^7+9x^8-10x^9")
)

f1=function(x){1/(1+x)^2}

plot(f1,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(0,0,0),main="Macrolin expansion", xlab="X", ylab="Y")
par(new=T)#上書き指定
plot(f0,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(1,0,0),main="", xlab="", ylab="")

legend("topright", legend=c("1/(1+x)^2",text),lty=c(1,1),col=c(rgb(0,0,0),rgb(1,0,0)))
}

library("animation")
Time_Code=c("0","0","0","1","1","1","2","2","2","3","3","3","4","4","4","5","5","5","6","6","6","7","7","7","8","8","8","9","9","9")
saveGIF({
for (i in Time_Code){
  Macrolin_expansion_Laurent(i)
}
}, interval = 0.1, movie.name = "Macrolin06.gif")

そのアップ。
image.gif

Macrolin_expansion_Laurent<-function(x){

#グラフのスケール決定
Graph_scale_x<-c(0,2)
Graph_scale_y<-c(0,2)
#関数と凡例の決定
switch(x,
"0"= f0<-function(x) {x/x},
"1"= f0<-function(x) {1-2*x},
"2"= f0<-function(x) {1-2*x+3*x^2},
"3"= f0<-function(x) {1-2*x+3*x^2-4*x^3},
"4"= f0<-function(x) {1-2*x+3*x^2-4*x^3+5*x^4},
"5"= f0<-function(x) {1-2*x+3*x^2-4*x^3+5*x^4-6*x^5},
"6"= f0<-function(x) {1-2*x+3*x^2-4*x^3+5*x^4-6*x^5+7*x^6},
"7"= f0<-function(x) {1-2*x+3*x^2-4*x^3+5*x^4-6*x^5+7*x^6-8*x^7},
"8"= f0<-function(x) {1-2*x+3*x^2-4*x^3+5*x^4-6*x^5+7*x^6-8*x^7+9*x^8},
"9"= f0<-function(x) {1-2*x+3*x^2-4*x^3+5*x^4-6*x^5+7*x^6-8*x^7+9*x^8-10*x^9}
)

switch(x,
"0"=text<-c("1"),
"1"=text<-c("1-2x"),
"2"=text<-c("1-2x+3x^2"),
"3"=text<-c("1-2x+3x^2-4x^3"),
"4"=text<-c("1-2x+3x^2-4x^3+5x^4"),
"5"=text<-c("1-2x+3x^2-4x^3+5x^4-6x^5"),
"6"=text<-c("1-2x+3x^2-4x^3+5x^4-6x^5+7x^6"),
"7"=text<-c("1-2x+3x^2-4x^3+5x^4-6x^5+7x^6-8x^7"),
"8"=text<-c("1-2x+3x^2-4x^3+5x^4-6x^5+7x^6-8x^7+9x^8"),
"9"=text<-c("1-2x+3x^2-4x^3+5x^4-6x^5+7x^6-8x^7+9x^8-10x^9")
)

f1=function(x){1/(1+x)^2}

plot(f1,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(0,0,0),main="Macrolin expansion", xlab="X", ylab="Y")
par(new=T)#上書き指定
plot(f0,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(1,0,0),main="", xlab="", ylab="")

legend("topright", legend=c("1/(1+x)^2",text),lty=c(1,1),col=c(rgb(0,0,0),rgb(1,0,0)))
}

library("animation")
Time_Code=c("0","0","0","1","1","1","2","2","2","3","3","3","4","4","4","5","5","5","6","6","6","7","7","7","8","8","8","9","9","9")
saveGIF({
for (i in Time_Code){
  Macrolin_expansion_Laurent(i)
}
}, interval = 0.1, movie.name = "Macrolin07.gif")

とりあえず「関数に収束半径がある」とはこういうイメージで、それに対してテイラー級数/マクローリン級数はこう展開されるという話ですね。

#最も簡単なローラン級数(Laurent Series)の例

第9回 テイラー展開の計算/ローラン級数

1/(z(1−z))原点z0=0の周りでローラン展開するときは、1/z×1/(1-z)と書き換えてから、1/(1−z)原点z0=0の周りでテイラー展開すればよい。この級数の収束領域は、円形領域|z|<1から**原点**z=0を除いた領域となる。

image.gif

Laurent_expansion<-function(x){

#グラフのスケール決定
Graph_scale_x<-c(0,3)
Graph_scale_y<-c(0,100)
#関数と凡例の決定
switch(x,
"0"= f0<-function(x) {1/x},
"1"= f0<-function(x) {1/x+1},
"2"= f0<-function(x) {1/x+1+x},
"3"= f0<-function(x) {1/x+1+x+x^2},
"4"= f0<-function(x) {1/x+1+x+x^2+x^3},
"5"= f0<-function(x) {1/x+1+x+x^2+x^3+x^4},
"6"= f0<-function(x) {1/x+1+x+x^2+x^3+x^4+x^5},
"7"= f0<-function(x) {1/x+1+x+x^2+x^3+x^4+x^5+x^6},
"8"= f0<-function(x) {1/x+1+x+x^2+x^3+x^4+x^5+x^6+x^7},
"9"= f0<-function(x) {1/x+1+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8}
)

switch(x,
"0"=text<-c("1/x"),
"1"=text<-c("1/x+1"),
"2"=text<-c("1/x+1+x"),
"3"=text<-c("1/x+1+x+x^2"),
"4"=text<-c("1/x+1+x+x^2+x^3"),
"5"=text<-c("1/x+1+x+x^2+x^3+x^4"),
"6"=text<-c("1/x+1+x+x^2+x^3+x^4+x^5"),
"7"=text<-c("1/x+1+x+x^2+x^3+x^4+x^5+x^6"),
"8"=text<-c("1/x+1+x+x^2+x^3+x^4+x^5+x^6+x^7"),
"9"=text<-c("1/x+1+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8")
)

f1=function(x){1/(x*(1-x))}

plot(f1,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(0,0,0),main="Laurent expansion", xlab="X", ylab="Y")
par(new=T)#上書き指定
plot(f0,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(1,0,0),main="", xlab="", ylab="")

legend("topright", legend=c("1/(x*(1-x)",text),lty=c(1,1),col=c(rgb(0,0,0),rgb(1,0,0)))
}

library("animation")
Time_Code=c("0","0","0","1","1","1","2","2","2","3","3","3","4","4","4","5","5","5","6","6","6","7","7","7","8","8","8","9","9","9")
saveGIF({
for (i in Time_Code){
  Laurent_expansion(i)
}
}, interval = 0.1, movie.name = "Laurent02.gif")

同じ関数1/(z(1−z))原点z0=1の周りでローラン展開するときは、1/(1-z)×(-1/z)と書き換えてから、-1/z原点z0=1の周りでテイラー展開すればよい。この級数の収束領域は、円形領域|z|<1から**原点**z=1を除いた領域となる。

image.gif
*何か間違ってる気もするけど、現時点の私には直せません(2021.2.12)

Laurent_expansion<-function(x){

#グラフのスケール決定
Graph_scale_x<-c(0,3)
Graph_scale_y<-c(-100,100)
#関数と凡例の決定
switch(x,
"0"= f0<-function(x) {-1/(1-x)},
"1"= f0<-function(x) {-1/(1-x)+1},
"2"= f0<-function(x) {-1/(1-x)+1-(x-1)},
"3"= f0<-function(x) {-1/(1-x)+1-(x-1)+(x-1)^2},
"4"= f0<-function(x) {-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3},
"5"= f0<-function(x) {-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3+(x-1)^4},
"6"= f0<-function(x) {-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3+(x-1)^4+(x-1)^5},
"7"= f0<-function(x) {-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3+(x-1)^4+(x-1)^5+(x-1)^6},
"8"= f0<-function(x) {-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3+(x-1)^4+(x-1)^5+(x-1)^6+(x-1)^7},
"9"= f0<-function(x) {-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3+(x-1)^4+(x-1)^5+(x-1)^6+(x-1)^7+(x-1)^8}
)

switch(x,
"0"=text<-c("-1/(1-x)"),
"1"=text<-c("-1/(1-x)+1"),
"2"=text<-c("-1/(1-x)+1-(x-1)"),
"3"=text<-c("-1/(1-x)+1-(x-1)+(x-1)^2"),
"4"=text<-c("-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3"),
"5"=text<-c("-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3+(x-1)^4"),
"6"=text<-c("-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3+(x-1)^4+(x-1)^5"),
"7"=text<-c("-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3+(x-1)^4+(x-1)^5+(x-1)^6"),
"8"=text<-c("-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3+(x-1)^4+(x-1)^5+(x-1)^6+(x-1)^7"),
"9"=text<-c("-1/(1-x)+(x-1)-(x-1)^2+(x-1)^3+(x-1)^4+(x-1)^5+(x-1)^6+(x-1)^7+(x-1)^8")
)

f1=function(x){1/(x*(1-x))}

plot(f1,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(0,0,0),main="Laurent expansion", xlab="X", ylab="Y")
par(new=T)#上書き指定
plot(f0,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(1,0,0),main="", xlab="", ylab="")

legend("topright", legend=c("1/(x*(1-x)",text),lty=c(1,1),col=c(rgb(0,0,0),rgb(1,0,0)))
}

library("animation")
Time_Code=c("0","0","0","1","1","1","2","2","2","3","3","3","4","4","4","5","5","5","6","6","6","7","7","7","8","8","8","9","9","9")
saveGIF({
for (i in Time_Code){
  Laurent_expansion(i)
}
}, interval = 0.1, movie.name = "Laurent03.gif")

符号を逆転してみたら混沌が広がりました。チェルノブイリ!!(2021.2.12)。
image.gif

Laurent_expansion<-function(x){

#グラフのスケール決定
Graph_scale_x<-c(0,3)
Graph_scale_y<-c(-100,100)
#関数と凡例の決定
switch(x,
"0"= f0<-function(x) {1/(1+x)},
"1"= f0<-function(x) {1/(1+x)+1},
"2"= f0<-function(x) {1/(1+x)+1-(x+1)},
"3"= f0<-function(x) {1/(1+x)+1-(x+1)+(x+1)^2},
"4"= f0<-function(x) {1/(1+x)+1-(x+1)+(x+1)^2+(x+1)^3},
"5"= f0<-function(x) {1/(1+x)+1-(x+1)+(x+1)^2+(x+1)^3+(x+1)^4},
"6"= f0<-function(x) {1/(1+x)+1-(x+1)+(x+1)^2+(x+1)^3+(x+1)^4+(x+1)^5},
"7"= f0<-function(x) {1/(1+x)+1-(x+1)+(x+1)^2+(x+1)^3+(x+1)^4+(x+1)^5+(x+1)^6},
"8"= f0<-function(x) {1/(1+x)+1-(x+1)+(x+1)^2+(x+1)^3+(x+1)^4+(x+1)^5+(x+1)^6+(x+1)^7},
"9"= f0<-function(x) {1/(1+x)+1-(x+1)+(x+1)^2+(x+1)^3+(x+1)^4+(x+1)^5+(x+1)^6+(x+1)^7+(x+1)^8}
)

switch(x,
"0"=text<-c("-1/(1-x)"),
"1"=text<-c("-1/(1-x)+1"),
"2"=text<-c("-1/(1-x)+1-(x-1)"),
"3"=text<-c("-1/(1-x)+1-(x-1)+(x-1)^2"),
"4"=text<-c("-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3"),
"5"=text<-c("-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3+(x-1)^4"),
"6"=text<-c("-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3+(x-1)^4+(x-1)^5"),
"7"=text<-c("-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3+(x-1)^4+(x-1)^5+(x-1)^6"),
"8"=text<-c("-1/(1-x)+1-(x-1)+(x-1)^2+(x-1)^3+(x-1)^4+(x-1)^5+(x-1)^6+(x-1)^7"),
"9"=text<-c("-1/(1-x)+(x-1)-(x-1)^2+(x-1)^3+(x-1)^4+(x-1)^5+(x-1)^6+(x-1)^7+(x-1)^8")
)

f1=function(x){1/(x*(1-x))}

plot(f1,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(0,0,0),main="Laurent expansion", xlab="X", ylab="Y")
par(new=T)#上書き指定
plot(f0,xlim=Graph_scale_x,ylim=Graph_scale_y,type="l",col=rgb(1,0,0),main="", xlab="", ylab="")

legend("topright", legend=c("1/(x*(1-x)",text),lty=c(1,1),col=c(rgb(0,0,0),rgb(1,0,0)))
}

library("animation")
Time_Code=c("0","0","0","1","1","1","2","2","2","3","3","3","4","4","4","5","5","5","6","6","6","7","7","7","8","8","8","9","9","9")
saveGIF({
for (i in Time_Code){
  Laurent_expansion(i)
}
}, interval = 0.1, movie.name = "Laurent04.gif")

もっと複素解析についての基礎知識を蓄えないとローラン変換の世界(つまりそれを必要とする領域)には進めない様です。それが分かった時点で以下続報…

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?