Giter Club home page Giter Club logo

nquadratic's Introduction

NQuadratic

A translation service to convert from standard form, ax²+bx+c, to the factored, d(ex+h)(fx+g), and vertex, a(x-x₀)²+y₀, forms.

Console Usage

dotnet run a=... b=... c=...

Math

Factored to Standard

d(ex+h)(fx+g)
  = d(efx² + (eg+fh)x + gh)

a = d * ef
b = d * (eg + fh)
c = d * gh

d = gcd(a, b, c)
a' = a / d = ef
b' = b / d = eg + fh
c' = c / d = gh 

To perform the translation from a, b, & c requires factoring to get to necessary values of e, f, g, & h.

Standard to Factored with c = 0

ax²+bx

d = gcd(a, b)
a' = a / d
b' = b / d

d(a'x² + b'x)
  = dx(a'x + b')
  = d(x + 0)(a'x + b')

e = 1
h = 0
f = a'
g = b'

Vertex to/from Standard

a(x-x₀)²+y₀
  = a(x² - 2x₀x + x₀²) + y₀
  = ax² - 2ax₀x + ax₀² + y₀

a = a
b = -2ax₀
c = ax₀² + y₀

x₀ = -b / 2a
y₀ = c - ax₀²
   = c - a(-b / 2a)²
   = c - b² / 4a

nquadratic's People

Contributors

david-beckman avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.