Monte Carlo python simulation

A simple Monte Carlo simulation using Python and matplotlib library.

Install linux dependencies

sudo apt update
sudo apt install build-essential \
                 software-properties-common \
                 python3-pip \
                 python3-distutils

Create environment and install python dependencies

pip3 install virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt

Preview

  • f(x) = x

Figure_1

  • f(x) = x^2

Figure_2

  • f(x) = x^3

Figure_3

  • f(x) = x^6

Figure_4

  • f(x) = sin(x)

Figure_5

  • f(x) = x^2/log(x)

Figure_6

  • f(x) = tg(x)

Figure_7

  • f(x) = log(x)

Figure_8

GitHub

https://github.com/samuelterra22/Monte-Carlo-Python-Simulation