\( \newcommand{\br}[1]{\left( #1\right)} \newcommand{\logpar}[1]{\log\left( #1\right)} \newcommand{\cospar}[1]{\cos\left( #1\right)} \newcommand{\sinpar}[1]{\sin\left( #1\right)} \newcommand{\tanpar}[1]{\tan\left( #1\right)} \newcommand{\arcsinpar}[1]{\sin^{-1}\!\left( #1\right)} \newcommand{\arccospar}[1]{\cos^{-1}\!\left( #1\right)} \newcommand{\arctanpar}[1]{\tan^{-1}\!\left( #1\right)} \newcommand{\asin}[1]{\sin^{-1}\! #1} \newcommand{\acos}[1]{\cos^{-1}\! #1} \newcommand{\atan}[1]{\tan^{-1}\! #1} \newcommand{\asinh}[1]{\sinh^{-1}\! #1} \newcommand{\acosh}[1]{\cosh^{-1}\! #1} \newcommand{\atanh}[1]{\tanh^{-1}\! #1} \newcommand{\logten}[1]{\log_{10}\! #1} \definecolor{explaination}{RGB}{0, 166, 226} \newcommand{\ubrace}[2][u]{ { \color{explaination}{\underbrace{ {\color{black}{#2}} }_{#1}} } } \newcommand{\obrace}[2][u]{ { \color{explaination}{\overbrace{ {\color{black}{#2}} }^{#1}} } } \definecolor{highlight}{RGB}{181, 41, 118} \newcommand{\xplain}[1]{{ \textcolor{explaination} { \footnotesize{ #1 \newline}}}} \newcommand{\hilite}[1]{{ \textcolor{highlight} { { #1 }}}} \definecolor{lightergray}{gray}{.675} \newcommand{\hide}[1]{{ \textcolor{lightergray} { \footnotesize{ #1 \newline}}}} \newcommand{\mth}[1]{ { \textcolor{black} { { \small #1 } } } } \)

Übung: Gleichungen mit unbekannten Variablen #2

randRange( 1, 2 ) randRange( 2, 3, NUM_EXPRESSIONS ) [ randRange( 1, 9, 3 ), randRange( 1, 9, 3 ) ] (function() { var variables = [ [ "a", "b", "c" ], [ "x", "y", "z" ] ]; var group = []; for ( var i = 0; i < NUM_EXPRESSIONS; i++ ) { group.push( variables.shift().slice( 0, NUM_TERMS[ i ] ) ); } return group; })() [ randRangeNonZero( -10, 10 ), randRangeNonZero( -10, 10 ) ] [ randRangeNonZero( -10, 10 ), randRangeNonZero( -10, 10 ) ] (function() { var originals = []; $.each( GROUPS, function( index, group ) { var coeffs = COEFFICIENTS[ index ]; var o = []; $.each( group, function( i, variable ) { o.push( expr( [ "*", coeffs[ i ], variable] ) ); }); originals.push( o ); }); return originals; })() (function() { var expression = []; $.each( GROUPS, function( index, group ) { var coeffs = COEFFICIENTS[ index ]; $.each( group, function( i, variable ) { expression.push( expr( [ "*", (coeffs[ i ] * FACTORS[ index ] ), variable ] ) ); }); }); return expression; })() shuffle( MULTIPLIED_EXPRESSIONS ).join( " + " ) (function() { var answer = 0; for ( var i = 0; i < NUM_EXPRESSIONS; i++ ) { answer += ( FACTORS[ i ] * VALUES[ i ] ); } return answer; })()

Wenn ORIGINAL_EXPRESSIONS[ 0 ].join( " + " ) = VALUES[ 0 ] und ORIGINAL_EXPRESSIONS[ 1 ].join( " + " ) = VALUES[ 1 ],

was ist QUESTION?

ANSWER

= MULTIPLIED_EXPRESSIONS.join( " + " )

= (FACTORS[ 0 ]) \cdot (ORIGINAL_EXPRESSIONS[ 0 ].join( " + " )) + (FACTORS[ 1 ] ) \cdot (ORIGINAL_EXPRESSIONS[ 1 ].join( " + " ))

= (FACTORS[ 0 ]) \cdot ( VALUES[ 0 ]) + (FACTORS[ 1 ]) \cdot ( VALUES[ 1 ])

= FACTORS[ 0 ] * VALUES[ 0 ] + FACTORS[ 1 ] * VALUES[ 1 ]

= ANSWER