\( \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: Allgemeine Geradengleichung

randRange(-9, 9) randRange(-9, 9) randRange(-9, 9) randRange(-9, 9) (Y1 - Y2) / (X1 - X2) Y1 - M * X1
(function() { var coords = []; coords.push( [ X1, [ Y1, 1 ] ] ); coords.push( [ X2, [ Y2, 1 ] ] ); var xs = randRangeUnique( -10, 10, 5 ); for ( var i = 0; i < 5; i++ ) { var x = xs[ i ]; if( x !== X1 && x !== X2 ) { var denom = X1 - X2, num = x * ( Y1 - Y2 ) + B * denom, negative = ( num * denom < 0 ? -1 : 1 ); num = round( abs( num ) * negative ); denom = round( abs( denom ) ); coords.push( [ x, [ num / getGCD( num, denom ), denom / getGCD( num, denom )] ] ); } } return coords.sort( function(a, b) { return a[ 0 ] - b[ 0 ]; }); })()

Eine Gerade geht durch die folgenden Punkte. Die allgemeine Form der Geradengleichung lautet y = mx + b.

Wie lautet die Geradengleichung?

xy
coord[ 0 ]coord[ 1 ][ 1 ] === 1 ? coord[ 1 ][ 0 ] : coord[ 1 ].join( "/" )
y = {}
M
x + {}
B

Wir können alle Punkte und die Linie, welche sie miteinander verbindet, zeichnen.

graphInit({ range: 10, scale: 20, tickStep: 1, labelStep: 1, unityLabels: false, labelFormat: function( s ) { return "\\small{" + s + "}"; }, axisArrows: "<->" }); style({ stroke: BLUE, fill: BLUE }); line( [X1 - 19, Y1 - 19 * M], [X2 + 19, Y2 + 19 * M], { stroke: BLUE } ); $.each( COORDS, function( i, coord ) { circle( [ coord[ 0 ], coord[ 1 ][ 0 ] / coord[ 1 ][ 1 ] ], 3 / 20 ); });

Wir brauchen nur zwei Punkte (zwei beliebige Punkte) um die Geradengleichung zu bestimmen.

Wir wählen (X1, Y1) und (X2, Y2).

Die Steigung m kann berechnet werden mit m = \dfrac{y_2 - y_1}{x_2 - x_1}.

Wir setzen beide Punkte in die Gleichung ein.

m = \dfrac{Y2 - negParens(Y1)}{X2 - negParens(X1)} = fractionReduce( Y2 - Y1, X2 - X1 )

Durch einsetzen von m in die Geradengleichung erhalten wir y = ( M === -1 ? "-" : ( M === 1 ? "" : fractionReduce( Y2 - Y1, X2 - X1 ))) x + b (m ist gleich M).

Um b zu berechnen, können wir eine der beiden Punkte, die wir ausgewählt haben, in die Gleichung oben einsetzen. Wir berechnen b für beide Punkte als Beispiel:

Aus dem ersten Punkt (X1, Y1) setzen wir in die Gleichung, mit y = Y1 und x = X1, ein:

Y1 = (fractionReduce( Y2 - Y1, X2 - X1 ))(X1) + b

b = Y1 - fractionReduce( X1 * ( Y2 - Y1 ), X2 - X1 ) = fractionReduce( Y1 * (X2 - X1) - X1 * ( Y2 - Y1 ), X2 - X1 )

Aus dem zweiten Punkte (X2, Y2) setzen wir in die Gleichung, mit y = Y2 und x = X2, ein:

Y2 = (fractionReduce( Y2 - Y1, X2 - X1 ))(X2) + b

b = Y2 - fractionReduce( X2 * ( Y2 - Y1 ), X2 - X1 ) = fractionReduce( Y2 * (X2 - X1) - X2 * ( Y2 - Y1 ), X2 - X1 )

In beiden Fällen ist die Geradengleichung y = ( M === -1 ? "-" : ( M === 1 ? "" : fractionReduce( Y2 - Y1, X2 - X1 ))) x + fractionReduce( Y1 * (X2 - X1) - X1 * ( Y2 - Y1 ), X2 - X1 ) (m ist gleich M).

randRange( 0, 1 )

Die allgemeine Geradengleichung, für eine Gerade durch zwei Punkte, (X1, Y1) und (X2, Y2), lautet y = mx + b.

Wie lautet die Geradengleichung, für die Gerade die durch die genannten Punkte verläuft?

graphInit({ range: 10, scale: 20, tickStep: 1, labelStep: 1, unityLabels: false, labelFormat: function( s ) { return "\\small{" + s + "}"; }, axisArrows: "<->" }); style({ stroke: BLUE, fill: BLUE }); line( [X1 - 19, Y1 - 19 * M], [X2 + 19, Y2 + 19 * M] ); circle( [X1, Y1], 3/20 ); circle( [X2, Y2], 3/20 );
y =
M
\enspace\cdot\enspace x +
B
graphInit({ range: 10, scale: 20, tickStep: 1, labelStep: 1, unityLabels: false, labelFormat: function( s ) { return "\\small{" + s + "}"; }, axisArrows: "<->" }); style({ stroke: BLUE, fill: BLUE }); line( [X1 - 19, Y1 - 19 * M], [X2 + 19, Y2 + 19 * M] ); circle( [X1, Y1], 3/20 ); circle( [X2, Y2], 3/20 );

Die Steigung m ist definiert durch m = \dfrac{y_2 - y_1}{x_2 - x_1}.

Wir setzen beide Punkte in die Gleichung ein.

m = \dfrac{Y2 - negParens(Y1)}{X2 - negParens(X1)} = fractionReduce( Y2 - Y1, X2 - X1 )

Durch einsetzen von m in die Geradengleichung erhalten wir y = ( M === -1 ? "-" : ( M === 1 ? "" : fractionReduce( Y2 - Y1, X2 - X1 ))) x + b (m ist gleich M).

Um b zu berechnen, können wir eine der beiden Punkte in die Gleichung oben einsetzen. Wir berechnen b für beide Punkte als Beispiel:

Aus dem ersten Punkt (X1, Y1) setzen wir in die Gleichung, mit y = Y1 und x = X1:

Y1 = (fractionReduce( Y2 - Y1, X2 - X1 ))(X1) + b

b = Y1 - fractionReduce( X1 * ( Y2 - Y1 ), X2 - X1 ) = fractionReduce( Y1 * (X2 - X1) - X1 * ( Y2 - Y1 ), X2 - X1 )

Aus dem zweiten Punkt (X2, Y2) setzen wir in die Gleichung, mit y = Y2 und x = X2:

Y2 = (fractionReduce( Y2 - Y1, X2 - X1 ))(X2) + b

b = Y2 - fractionReduce( X2 * ( Y2 - Y1 ), X2 - X1 ) = fractionReduce( Y2 * (X2 - X1) - X2 * ( Y2 - Y1 ), X2 - X1 )

In beiden Fällen ist die Geradengleichung y = ( M === -1 ? "-" : ( M === 1 ? "" : fractionReduce( Y2 - Y1, X2 - X1 ))) x + fractionReduce( Y1 * (X2 - X1) - X1 * ( Y2 - Y1 ), X2 - X1 ) (m ist gleich M).