Skip to content

siddharth-shringarpure/Simultaneous-Equations-Solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

👉 Simultaneous Equations Solver

Made with Python

Simple tool to solve systems of equations

ℹ️ Requirements

  • Numpy (for solving using matrices)
  • String (native Python module)

💡 How it works

  • Systems of equations can be modelled as matrices in order to solve them
  • The concept and example illustrated below explain the calculations that occur:

$$ A \begin{bmatrix} x \\ y \\ z \end{bmatrix} = C $$

$$ \begin{bmatrix} x \\ y \\ z \end{bmatrix} = A^{-1} C $$

Example

$$ 3x+2y-z=11 $$

$$ 2x-3y+z=7 $$

$$ 5x+y-2z=12 \ $$

$$ \therefore \begin{bmatrix} 3 & 2 & -1 \\ 2 & -3 & 1\\ 5 & 1 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} 11 \\ 7 \\ 12 \end{bmatrix} \\ $$

$$ \therefore \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} 3 & 2 & -1 \\ 2 & -3 & 1\\ 5 & 1 & -2 \end{bmatrix}^{-1} \begin{bmatrix} 11 \\ 7 \\ 12 \end{bmatrix} = \begin{bmatrix} 4 \\ 2 \\ 5 \end{bmatrix} \\ $$

Solutions

$$ x=4 \ $$

$$ y=2 \ $$

$$ z=5 $$

👎 Limitations

  • Only supports three variables at the moment
  • Doesn't currently support float inputs

About

Simple tool to solve simultaneous equations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages