I tried to solve the first question of the University of Tokyo 2019 math entrance exam with python sympy

I tried to solve the first question of the University of Tokyo 2019 Mathematics Entrance Examination with python sympy. I also measured the time to measure how many seconds it took to solve.

See here for problems. https://sokuho.yozemi.ac.jp/sokuho/k_mondaitokaitou/1/kaitou/kaitou/1306831_5342.html

On my PC, I was able to calculate in 23 seconds.

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,"It took a second")

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

Recommended Posts

I tried to solve the first question of the University of Tokyo 2019 math entrance exam with python sympy
Tohoku University 2020 First semester math exam (science) I tried to solve major questions 1 to 3 with Python
I tried to solve the soma cube with python
I tried to solve the problem with Python Vol.1
I tried to find the entropy of the image with python
2016 University of Tokyo Entrance Examination Problem Solving the first question of mathematics (humanities) using Python
The 15th offline real-time I tried to solve the problem of how to write with python
I tried to solve the ant book beginner's edition with python
I tried to improve the efficiency of daily work with Python
How to write offline real time I tried to solve the problem of F02 with Python
2016 The University of Tokyo Mathematics Solved with Python
I tried to get the authentication code of Qiita API with Python.
I tried to get the movie information of TMDb API with Python
I tried to get and analyze the statistical data of the new corona with Python: Data of Johns Hopkins University
I tried to easily visualize the tweets of JAWS DAYS 2017 with Python + ELK
I tried to automatically send the literature of the new coronavirus to LINE with Python
I tried to touch the CSV file with Python
I tried to summarize the string operations of Python
I tried to solve AOJ's number theory with Python
I tried to put out the frequent word ranking of LINE talk with Python
I tried to automate the article update of Livedoor blog with Python and selenium.
[First data science ⑥] I tried to visualize the market price of restaurants in Tokyo
I tried to compare the processing speed with dplyr of R and pandas of Python
I tried "gamma correction" of the image with Python + OpenCV
I tried to simulate how the infection spreads with Python
I tried to find the average of the sequence with TensorFlow
[Python] I tried to visualize the follow relationship of Twitter
I tried to divide the file into folders with Python
I tried to move ROS (Melodic) with the first Raspberry Pi (Stretch) at the beginning of 2021
I tried to get the number of days of the month holidays (Saturdays, Sundays, and holidays) with python
I wrote a doctest in "I tried to simulate the probability of a bingo game with Python"
I tried scraping the ranking of Qiita Advent Calendar with Python
I tried to automate the watering of the planter with Raspberry Pi
I want to output the beginning of the next month with Python
I tried to create a list of prime numbers with python
I wanted to solve the ABC164 A ~ D problem with Python
I tried to expand the size of the logical volume with LVM
I tried to automatically collect images of Kanna Hashimoto with Python! !!
PhytoMine-I tried to get the genetic information of plants with Python
I tried to unlock the entrance 2 lock sesame with a single push of the AWS IoT button
I tried to verify the speaker identification by the Speaker Recognition API of Azure Cognitive Services with Python. # 1
I tried to verify the speaker identification by the Speaker Recognition API of Azure Cognitive Services with Python. # 2
I wanted to solve ABC160 with Python
I tried to solve TSP with QAOA
I wanted to solve ABC172 with Python
I tried to estimate the similarity of the question intent using gensim's Doc2Vec
How to write offline real time I tried to solve E11 with python
(Python) I tried to analyze 1 million hands ~ I tried to estimate the number of AA ~
I tried with the top 100 PyPI packages> I tried to graph the packages installed on Python
I tried to verify and analyze the acceleration of Python by Cython
I tried to analyze the negativeness of Nono Morikubo. [Compare with Posipa]
I tried to visualize the text of the novel "Weathering with You" with WordCloud
I tried to solve the E qualification problem collection [Chapter 1, 5th question]
Try to solve a set problem of high school math with Python
I tried to predict the behavior of the new coronavirus with the SEIR model.
How to write offline real time I tried to solve E12 with python
I tried to open the latest data of the Excel file managed by date in the folder with Python
I tried to output the rpm list of SSH login destination to an Excel sheet with Python + openpyxl.
I tried "smoothing" the image with Python + OpenCV
I tried hundreds of millions of SQLite with python
I wanted to solve NOMURA Contest 2020 with Python