<?
include("polynomials.php");
$polynomials=new polynomials;
//Use lowercase!
//For powers use (base^expponent)
//instead of fractions 1/x use (x^-1)
//Removing brackets
$polynomials->remove_brackets('-1(2(b^2)+2x-1a(-2+3x)+3x+4(2))');
echo($polynomials->output);
//Multiply polynomials
$output=$polynomials->multiply_polynomials('4abc','5(a^2)');
echo("<br>".$output);
//Divide polynomials
$polynomials=new polynomials;
$output=$polynomials->divide_polynomials('2(a^3)b','ab');
echo("<br>".$output);
//Show html code
echo("<br>".$polynomials->polynom2html($output));
?>
|