0
1

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

sympyで置換積分

Last updated at Posted at 2017-03-17

①もっと短くなるような気もします。
②KのIntegral(1, t)の第1引数1の拾い方を教えて下さい。

#sympyで置換積分
from sympy import *
var("x a b t c d")
f=1/(1+x**2)
print(integrate(f, (x, a, b)))
#--------------------------------------------
a=0
b=1
print(integrate(f, (x, a, b)))
#--------------------------------------------
J=Integral(f, x)
g=tan(t)
#K=J.transform(x, g)
#print(K)
L=J.transform(x, g).doit()
print(L)
print(L.subs(t, atan(b))-L.subs(t, atan(a)))
#-atan(a) + atan(b)
#pi/4
#t
#pi/4

(参考)Pythonで積分
http://qiita.com/ykchat/items/5fc04bf80d24928a241c
(参考)車輪を再発明不定積分する> 不定積分する。定積分する。symbolを用いて定積分する。
http://taromaru-kun.hatenablog.com/entry/2015/03/14/214822
(参考)高校数学の美しい物語>置換積分の公式の証明と例題>例題2
http://mathtrain.jp/substitutionint

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?