Skip to content

jery04/Polynomial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Polynomial Root Finder ๐Ÿงฎโš™๏ธ

An interactive Windows Forms app to compute polynomial roots and critical points using numeric methods.
Designed for fast experimentation with cubic polynomials in a custom interval. ๐Ÿ”ฌ๐Ÿ“ˆ

Table of Contents ๐Ÿ—‚๏ธ

Overview ๐Ÿš€

This project solves polynomial-related tasks through a desktop UI:

  • Finds zeros of a polynomial in a given interval using a Bisection-based search ๐Ÿ”
  • Finds critical points by analyzing the first derivative ๐Ÿ“
  • Classifies critical points as Max / Min / Const ๐Ÿงญ

The app currently works with 4 coefficients, which corresponds to a cubic polynomial:

$$ P(x) = ax^3 + bx^2 + cx + d $$

Key Features ๐Ÿงฉ

  • Numeric polynomial evaluation engine (Evaluate) ๐Ÿง 
  • Root detection with interval validation (Bolzano) โœ…
  • Recursive bisection search (Bisection) โ™ป๏ธ
  • Input validation and visual error feedback in the UI ๐ŸŽ›๏ธ
  • Automatic derivative generation for first-order analysis (GetFirstOrder) ๐Ÿงช

Tech Stack ๐Ÿ› ๏ธ

  • Language: C# ๐Ÿ’ป
  • Framework: .NET 8 (net8.0-windows) ๐Ÿงฑ
  • UI: Windows Forms ๐ŸชŸ
  • Solution Type: Desktop app (WinExe) ๐Ÿ“ฆ

Project Structure ๐Ÿ—ƒ๏ธ

.
โ”œโ”€โ”€ Ceros Polinomios.sln
โ”œโ”€โ”€ Ceros Polinomios/
โ”‚   โ”œโ”€โ”€ Ceros Polinomios.csproj
โ”‚   โ”œโ”€โ”€ Program.cs
โ”‚   โ”œโ”€โ”€ Form1.cs
โ”‚   โ”œโ”€โ”€ Form1.Designer.cs
โ”‚   โ”œโ”€โ”€ Form1.resx
โ”‚   โ”œโ”€โ”€ Properties/
โ”‚   โ”‚   โ”œโ”€โ”€ Resources.Designer.cs
โ”‚   โ”‚   โ””โ”€โ”€ Resources.resx
โ”‚   โ”œโ”€โ”€ Resources/
โ”‚   โ”œโ”€โ”€ bin/
โ”‚   โ””โ”€โ”€ obj/
โ””โ”€โ”€ .vs/ (ignored)

Main Files ๐Ÿ”ง

  • Program.cs: Application entry point and form bootstrap (Application.Run(new Form1())).
  • Form1.cs: Core logic for polynomial evaluation, bisection, validation, and UI event handling.
  • Form1.Designer.cs: Auto-generated layout and control definitions.
  • Ceros Polinomios.csproj: Project configuration, target framework, WinForms activation.

How It Works โšก

  1. User enters polynomial coefficients and an interval. ๐Ÿงพ
  2. App validates all fields before running calculations. ๐Ÿ›ก๏ธ
  3. Bisection process searches for sign changes to detect roots. ๐Ÿ“‰
  4. First derivative is computed and analyzed to get critical points. ๐Ÿ“Š
  5. Results are printed in the interface labels. ๐Ÿ–ฅ๏ธ

Run the Project โ–ถ๏ธ

Requirements ๐Ÿ“Œ

  • Windows 10/11
  • .NET 8 SDK
  • Optional: Visual Studio 2022 (for GUI development)

Option 1: Run with Visual Studio ๐Ÿงฐ

  1. Open the solution file: Ceros Polinomios.sln
  2. Set startup project to Ceros Polinomios
  3. Press F5 (or click Start) to run

Option 2: Run from Terminal ๐Ÿ–ฅ๏ธ

From the repository root:

dotnet restore "Ceros Polinomios.sln"
dotnet build "Ceros Polinomios.sln" -c Debug
dotnet run --project "Ceros Polinomios/Ceros Polinomios.csproj"

Usage Guide ๐Ÿงญ

  1. Enter the 4 polynomial coefficients.
  2. Enter interval start and end values.
  3. Click the calculate button.
  4. Check:
    • Polynomial roots
    • Derivative critical points
    • Max/Min classification

Notes ๐Ÿ“

  • This is a numerical approach, so precision depends on interval width and tolerance. ๐ŸŽฏ
  • Inputs are integer-like in current validation logic (digits and optional -).
  • Auto-generated folders (bin, obj) are build artifacts. ๐Ÿงช

Built with C#, numerical methods, and a lot of math energy. โš™๏ธ๐Ÿ“๐Ÿ”ฅ

About

๐Ÿ“ The computational project aims to analyze polynomials of degree less than or equal to 3 in the form ๐‘(๐‘ฅ) = ๐‘Žโ‚€ + ๐‘Žโ‚๐‘ฅ + ๐‘Žโ‚‚๐‘ฅยฒ + ๐‘Žโ‚ƒ๐‘ฅยณ and extract their real roots, as well as their critical points. To achieve this, a total of 11 main methods were developed, based on Bolzano's theorem

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages