Lade Daten...
randVar() [ BLUE, ORANGE, GREEN ] 4 tabulate( function() { return randRangeUniqueNonZero( 0, MAX_DEGREE, randRange(1, 3) ).sort().reverse(); }, 2 ) tabulate( function(n) { var coefs = []; for ( var i = 0; i <= MAX_DEGREE; i++ ) { var value = 0; for ( var j = 0; j < NON_ZERO_INDICES[ n ].length; j++ ) { if ( i === NON_ZERO_INDICES[ n ][ j ] ) { value = randRangeNonZero( -7, 7 ); break; } } coefs[ i ] = value; } return new Polynomial( 0, MAX_DEGREE, coefs, X ); }, 2 ) function() { var likeTerms = []; var counter = 0; var areLikeTerms = false; for ( var i = POL_1.minDegree; i <= POL_1.maxDegree; i++ ) { if ( POL_1.coefs[ i ] === 0 ) { continue; } for ( var j = POL_2.minDegree; j <= POL_2.maxDegree; j++ ) { if ( POL_2.coefs[ j ] === 0 ) { continue; } if ( likeTerms[ i + j ] === undefined ) { likeTerms[ i + j ] = ""; } else if ( likeTerms[ i + j ] === "" ) { likeTerms[ i + j ] = COLORS[ counter++ ]; areLikeTerms = true; } } } return areLikeTerms ? likeTerms : false; }() POL_1.multiply( POL_2 ) tabulate( function(n) { var counter = 0; var coefs = []; for ( var i = 0; i < SOLUTION.coefs.length; i++ ) { if ( SOLUTION.coefs[ i ] === 0 ) { continue; } coefs[ i ] = SOLUTION.coefs[ i ] * ( rand(2) ? 1 : -1 ); } return new Polynomial( SOLUTION.minDegree, SOLUTION.maxDegree, coefs, SOLUTION.variable ); }, 2 )

Polynom vereinfachen

(POL)

SOLUTION

  • SOLUTION.multiply( -1 )
  • FAKE_SOLUTION_1
  • FAKE_SOLUTION_2

Benutze das Distributivgesetz.

( POL_1.coefs[ index1 ] < 0 ) ? "-" : ( n1 === 0 && n2 === 0 ) ? "" : "+"abs( POL_1.coefs[ index1 ] ) === 1 ? "" : abs( POL_1.coefs[ index1 ] )X^index1(( POL_2.coefs[ index2 ] === 1 ) ? "" : ( POL_2.coefs[ index2 ] === -1 ) ? "-" : POL_2.coefs[ index2 ]X^index2)

Vereinfachen.

( POL_1.coefs[ index1 ] * POL_2.coefs[ index2 ] < 0 ) ? "-" : ( n1 === 0 && n2 === 0 ) ? "" : "+"abs( POL_1.coefs[ index1 ] * POL_2.coefs[ index2 ] )X^{index1 + index2}
SOLUTION

Fertig!

Schaue nach Termen mit derselben Variable und Potenz.

\color{LIKE_TERMS[ index1 + index2 ]}{( POL_1.coefs[ index1 ] * POL_2.coefs[ index2 ] < 0 ) ? "-" : ( n1 === 0 && n2 === 0 ) ? "" : "+"abs( POL_1.coefs[ index1 ] * POL_2.coefs[ index2 ] )X^{index1 + index2}}

Addiere die Koeffizienten.

\color{LIKE_TERMS[ SOLUTION.getCoefAndDegreeForTerm( n ).degree ]}{( SOLUTION.getCoefAndDegreeForTerm( n ).coef < 0 || n === 0 ) ? "" : "+"expr( SOLUTION.expr()[ n + 1 ] )}

Fertig!