# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
import pandas as pd
import numpy as np

# import seaborn as sns
# import matplotlib.pyplot as plt

# import matplotlib
# matplotlib.pyplot.style.use('seaborn')
# matplotlib.rcParams['figure.figsize'] = (15, 5)

# # %matplotlib inline
# # %pylab inline
# -

from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"

from IPython.core.display import SVG

import math



# # Why we substract ?
#
# Because it is same as variable substitution, see:
#
# $\left\{
#     \begin{array}{ll}
#        3x + 8y = 15 \\
#        x + 4y = 5
#     \end{array}
# \right.$
#
# $\left\{
#     \begin{array}{ll}
#        8y = 15 - 3x \\
#        2x + 8y = 10
#     \end{array}
# \right.$
#
# $\left\{
#     \begin{array}{ll}
#        8y = 15 - 3x \\
#        2x + (15 - 3x) = 10
#     \end{array}
# \right.$
#
# $\left\{
#     \begin{array}{ll}
#        8y = 15 - 3x \\
#        -x = -5
#     \end{array}
# \right.$
#
# ### $-x = -5$ same as we just substract:
#
# $2x + 8y = 10$
#
# $-$
#
# $3x + 8y = 15$
#
# =
#
# $-x = -5$



# # * * *



# $\left\{
#     \begin{array}{ll}
#        3x + 8y = 15 \\
#        2x - 8y = 10
#     \end{array}
# \right.$
#
# $\left\{
#     \begin{array}{ll}
#        3x + 8y = 15 \\
#        + \\
#        2x - 8y = 10
#     \end{array}
# \right.$
#
# $5x = 25$
#
# $x = 25 / 5 = 5$
#
# $\left\{
#     \begin{array}{ll}
#        x = 5 \\
#        3x + 8y = 15
#     \end{array}
# \right.$
#
# $(3)(5) + 8y = 15$
#
# $15 + 8y = 15$
#
# $y = \frac{15 - 15}{8}$
#
# $y = 0$



# $\left\{
#     \begin{array}{ll}
#        2y - 3x = -27 \\
#        5y + 3x = 6
#     \end{array}
# \right.$
#
# $\left\{
#     \begin{array}{ll}
#        2y - 3x = -27 \\
#        + \\
#        5y + 3x = 6
#     \end{array}
# \right.$
#
# $7y = -21$
#
# $y = -21 / 7 = -3$
#
# $\left\{
#     \begin{array}{ll}
#        y = -3 \\
#        5y + 3x = 6
#     \end{array}
# \right.$
#
# $(5)(-3) + 3x = 6$
#
# $-15 + 3x = 6$
#
# $x = \frac{6 + 15}{3} = 7$



# $\left\{
#     \begin{array}{ll}
#        -8y + 9x = -5 \\
#        8y + 7x = -75
#     \end{array}
# \right.$
#
# $\left\{
#     \begin{array}{ll}
#        -8y + 9x = -5 \\
#        + \\
#        8y + 7x = -75
#     \end{array}
# \right.$
#
# $16x = -80$
#
# $x = -5$
#
# $8y + (7)(-5) = -75$
#
# $8y - 35 = -75$
#
# $8y = -40$
#
# $y = -5$



StarcoderdataJupyterScriptsDedupFiltered