Help us understand the problem. What is going on with this article?

東京大学2019年数学入試第1問をpython sympyに解かせてみた

東京大学2019年数学入試第1問をpython sympyに解かせてみた。
何秒で解けるかを測定するために、時間も測ってみました。

問題は、こちらを参照ください。
https://sokuho.yozemi.ac.jp/sokuho/k_mondaitokaitou/1/kaitou/kaitou/1306831_5342.html

私のPCでは、23秒で計算できました。

import sympy as sym
import datetime
(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) = sym.symbols('a b c d e f g h i j k l m n o p q r s t u v w x y z')

f = (x**2 + x/sqrt(1+x**2))*(1+ x/((1+x**2)*sqrt(1+x**2)))

#start time
start_t = datetime.datetime.now()

#calc
answer=sym.integrate(f,(x,0,1))

#end time
end_t = datetime.datetime.now()

#elapse time
elapse_t = end_t - start_t

print(answer)
print(elapse_t,"秒かかりました")

SnapCrab_NoName_2019-12-3_21-15-30_No-00.png

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした