LoginSignup
0
0

More than 1 year has passed since last update.

極限と積分「静岡大学2022年前期M2第4問」をsympy でやってみた。

Last updated at Posted at 2022-05-31

オリジナル

f=sqrt(log(x))/x

wolframalphaで

X=1で0になっていませんね。微妙なプロットでした。

sympyで

matplotlibは使っていません。sympyのplotです。
増減表が不足していました。sympyで表示できるような気もします。
X=1で0になっていませんね。

Figure_1.png

from sympy import *
var('x M S V')
f=sqrt(log(x))/x
plot(f)
critical_point = solve(diff(f, x))[0]
print("#(1)",critical_point,f.subs({x:critical_point}))
print("#(1)",solve(f,x)[0])
print("#(1)",limit(f,x, oo))
S=integrate(f, (x, 1, M))
print("#(2)",S)
V=pi*integrate(log(x)/x**2, (x, 1, M))
print("#(3)",V)
print("#(4)",limit(S, M, oo),limit(V, M, oo))
#(1) exp(1/2) sqrt(2)*exp(-1/2)/2
#(1) 1
#(1) 0
#(2) 2*log(M)**(3/2)/3
#(3) pi*(1 - log(M)/M - 1/M)
#(4) oo pi
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