# trinomial-r

This package is used to solve, factorize and find the canonical form of a trinome (polynomial equation)

## Usage no npm install needed!

``````<script type="module">
import trinomialR from 'https://cdn.skypack.dev/trinomial-r';
</script>``````

## trinomial-r

This package is used to solve, factorize and find the canonical form of a trinome (polynomial equation)

## Contact me

If you have any questions do not hesitate to join me on my [`discord server`] (https://discord.gg/ES52WDg)

## Install and exemple

npm i trinomial-r

• The library can give an example of the returns of the functions allowing to solve, factorize and find the canonical form of a trinome.

# CMD

npm run exemple

## Some explications about the library

The library has a resolution and factorization algorithm that works on minimum values ​​for "a" and "b". Remember: a trinomial looks like this: "ax² + bx + c". If the values ​​for "a", "b" and "c" are not given, the algorithm will solve this trinome by giving as default value for "a" and "b": "1" and "c": 0.

• For the polinomial roots the algorithm gives approximate default values
• Due to the approximation of the roots of the trinomial, the method for factoring may be obsolete

## Find the roots of a trinomial

``````const
{
solutions
} = require ('./trinomial-r');

const csl = console.log;

csl (solutions.OfThis ({
a: -3,
b: 5,
c: 2
}));	/* S = {0 ; 2} */
``````

## Factoring the equation

``````const
{
factoring
} = require ('./trinomial-r');

const csl = console.log;

csl (factoring.this ({
a: -3,
b: 5,
c: 2
}));	/* -3x(x - 2) */
``````

## Find the canonical form

``````const
{
canonicalForm
} = require ('./trinomial-r');

const csl = console.log;

csl (canonicalForm.OfThis ({
a: -3,
b: 5,
c: 2
}));	/* -3(x - 1) + 4 */

/*
* You can choose to display alpha and beta using the optional parameters
* showAlpha: true *** default value => false
* showBeta: true *** default value => false
*/

csl (canonicalForm.OfThis ({
a: -3,
b: 5,
c: 2,
showAlpha: true,
showBeta: true
}));

/* show ***
* alpha = 1
* beta = 4
* -3(x - 1) + 4
*/
``````

# solutions.OfThis

showEquation: true => default value: false

• Shows the equation

showDelta: true => default value: false

• Shows the discriminant of the equation

# factoring.this

showEquation: true => default value: false

• Shows the equation

showDelta: true => default value: false

• Shows the discriminant of the equation

showRoots: true => default value: false

• Shows roots of the equation

# canonicalForm.OfThis

showEquation: true => default value: false

• Shows the equation

showDelta: true => default value: false

• Shows the discriminant of the equation

showAlpha: true => default value: false

• Shows alpha

showBeta: true => default value: false

• Shows beta