LoginSignup
1

More than 5 years have passed since last update.

posted at

updated at

sympyで部分分数展開の複素根は計算できない?

何かいい方法は、ありますか?よろしくお願いします。

from sympy import *
var("x")
f=1/(1+x^2)
g=factor(f,extension=I)
print(g)
print(aprt(g))
# 1/((x - I)*(x + I))

(参考)【 Python で 部分分数展開 】>複素根は計算できない?(部分分数展開が途中で止まっている)
http://qiita.com/HirofumiYashima/items/5c4f31c14a748d5b0b0b
(参考)あらきけいすけの雑記帳>複素関数を知っている人は
http://d.hatena.ne.jp/arakik10/20050326/1111842127
(参考)Wolfram|Alpha: Computational Knowledge Engineで
https://www.wolframalpha.com/input/?i=1%2F(1%2Bx%5E2)
(参考)Integral of 1/(x^2+1) - Proof using complex numbers
https://youtu.be/NqI8_ieh2UA

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
What you can do with signing up
1