Skip to content

Latest commit

 

History

History
84 lines (63 loc) · 2.37 KB

README.md

File metadata and controls

84 lines (63 loc) · 2.37 KB

Equation Solver 📈

Python 3.10 License: MIT

A graphical program to solve mathematical equations and visualize their intersections through plotting. Takes as input two equations of x, solves them, and plots the equations with their solutions.

Features ✨

  • Graphical user interface (GUI) with input validation
  • Supports equation solving and intersection point detection
  • Interactive matplotlib plots embedded in the GUI
  • Error handling with user-friendly messages
  • Cross-platform compatibility (Windows/Linux)

Supported Operations 🔢

Operation Symbol/Function Example
Addition + x + 3
Subtraction - 5 - x
Multiplication * 2 * x
Division / x / 4
Exponentiation ^ x^2
Square root sqrt() sqrt(x + 1)
Logarithm base10 log10() log10(2*x)

Requirements 📋

  • Python 3.10+ (recommended)
  • PySide2 (GUI framework)
  • Matplotlib (Plotting)
  • NumPy (Numerical operations)
  • SciPy (Equation solving)
  • SymPy (Symbolic mathematics)

Installation

  1. Clone the repository
git clone https://github.com/Apolo151/equation-solver
cd equation-solver
  1. Setup the virtual environment
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
  1. Install the required packages
pip install -r requirements.txt
  1. Run the program
python3 app.py # or python app.py

Usage

  1. Enter the two equations in the input fields
  2. Click on the "Solve and Plot" button to solve the equations
  3. The solutions will be displayed in the output plot

Testing

To run the tests, use the following command:

pytest tests/* --cov=solver --cov=parser --cov=plotter --cov-report=term-missing

Examples

Correct

correct-1

correct-2

Incorrect

incorrect-1

incorrect-2