reduce( randRangeNonZero( -5, 5 ), randRange( 1, 5 ) ) randRangeNonZero( max( -10, -10 - SLOPE_FRAC[0] ), min( 10, 10 - SLOPE_FRAC[0] ) ) SLOPE_FRAC[0] / SLOPE_FRAC[1] fractionVariable(SLOPE_FRAC[0], SLOPE_FRAC[1], "x") randRangeNonZero( -3, 3 ) SLOPE_FRAC[0] * -MULT SLOPE_FRAC[1] * MULT SLOPE_FRAC[1] * YINT * MULT randFromArray([true, false]) randFromArray(["<", ">", "≤", "≥"]) B < 0 ? { "<": ">", ">": "<", "≤": "≥", "≥": "≤" }[COMP] : COMP COMP === "<" || COMP === "≤" COMP === "≥" || COMP === "≤"

Reprezentați grafic următoarea inecuație:


expr([ "+", [ "*", A, "x" ], [ "*", B, "y" ] ]) STD_FORM_COMP C

y COMP PRETTY_SLOPE + YINT

graphInit({ range: 11, scale: 20, axisArrows: "<->", tickStep: 1, labelStep: 1, gridOpacity: 0.05, axisOpacity: 0.2, tickOpacity: 0.4, labelOpacity: 0.5 }); label( [ 0, -11 ], "y", "below" ); label( [ 11, 0 ], "x", "right" ); addMouseLayer(); graph.pointA = addMovablePoint({ coord: [ -5, 5 ], snapX: 0.5, snapY: 0.5, normalStyle: { stroke: KhanUtil.BLUE, fill: KhanUtil.BLUE } }); graph.pointB = addMovablePoint({ coord: [ 5, 5 ], snapX: 0.5, snapY: 0.5, normalStyle: { stroke: KhanUtil.BLUE, fill: KhanUtil.BLUE } }); graph.line1 = bogusShape; graph.shading = bogusShape; graph.update = function() { graph.line1.remove(); graph.shading.remove(); if ( abs( graph.pointB.coord[0] - graph.pointA.coord[0] ) > 0.001 ) { var slope = ( graph.pointB.coord[1] - graph.pointA.coord[1] ) / ( graph.pointB.coord[0] - graph.pointA.coord[0] ); var yint = slope * ( 0 - graph.pointA.coord[0] ) + graph.pointA.coord[1]; var shadeEdge = ( ( graph.pointA.coord[0] < graph.pointB.coord[0] ) ? graph.shadetop : !graph.shadetop ) ? 11 : -11; style({ stroke: BLUE, strokeWidth: 2, strokeDasharray: graph.dasharray }, function() { graph.line1 = line( [ -11, -11 * slope + yint ], [ 11, 11 * slope + yint ] ).toBack(); }); style({ fill: BLUE, stroke: null, opacity: KhanUtil.FILL_OPACITY }, function() { graph.shading = path([ [ 11, shadeEdge ], [ 11, 11 * slope + yint ], [ -11, -11 * slope + yint ], [ -11, shadeEdge ] ]); }); } else { // vertical line var x = graph.pointA.coord[0]; var shadeEdge = ( ( graph.pointB.coord[1] < graph.pointA.coord[1] ) ? graph.shadetop : !graph.shadetop ) ? 11 : -11; style({ stroke: BLUE, strokeWidth: 2, strokeDasharray: graph.dasharray }, function() { graph.line1 = line( [ x, -11 ], [ x, 11 ] ).toBack(); }); style({ fill: BLUE, stroke: null, opacity: KhanUtil.FILL_OPACITY }, function() { graph.shading = path([ [ x, -11 ], [ x, 11 ], [ shadeEdge, 11 ], [ shadeEdge, -11 ] ]); }); } graph.pointA.toFront(); graph.pointB.toFront(); }; graph.showCorrect = function() { graph.pointA.setCoord([0, YINT]); graph.pointB.setCoord([SLOPE_FRAC[1], YINT + SLOPE_FRAC[0]]); graph.shadetop = graph.pointA.coord[0] > graph.pointB.coord[0] ? LESS_THAN : !LESS_THAN; if (INCLUSIVE) { graph.dasharray = ''; $('input[name=dashradio][value=solid]').attr('checked', true); } else { graph.dasharray = '- '; $('input[name=dashradio][value=dashed]').attr('checked', true); } graph.update(); }; // A and B can't be in the same place graph.pointA.onMove = function( x, y ) { if ( x != graph.pointB.coord[0] || y != graph.pointB.coord[1] ) { graph.pointA.setCoord([ x, y ]); graph.update(); return true; } else { return false; } } graph.pointB.onMove = function( x, y ) { if ( x != graph.pointA.coord[0] || y != graph.pointA.coord[1] ) { graph.pointB.setCoord([ x, y, ]); graph.update(); return true; } else { return false; } } graph.dasharray = ""; graph.shadetop = true; graph.update(); graph.pointA.toFront(); graph.pointB.toFront();
Mișcă cele două puncte pentru a aranja dreapta în poziția corectă.
[ graph.pointA.coord, graph.pointB.coord, graph.pointA.coord[0] > graph.pointB.coord[0] ? graph.shadetop : !graph.shadetop, graph.dasharray === "- " ? false : true ]
var slope = ( guess[1][1] - guess[0][1] ) / ( guess[1][0] - guess[0][0] ); var yint = slope * ( 0 - guess[0][0] ) + guess[0][1]; return abs( SLOPE - slope ) < 0.001 && abs( YINT - yint ) < 0.001 && guess[2] === LESS_THAN && guess[3] === INCLUSIVE;
graph.pointA.setCoord( guess[0] ); graph.pointB.setCoord( guess[1] ); graph.shadetop = graph.pointA.coord[0] > graph.pointB.coord[0] ? guess[2] : !guess[2]; if ( guess[3] ) { graph.dasharray = ""; $( "input[name=dashradio][value=solid]" ).attr( "checked", true ); } else { graph.dasharray = "- "; $( "input[name=dashradio][value=dashed]" ).attr( "checked", true ); } graph.update();

Putem începe schimbând forma inecuației expr([ "+", [ "*", A, "x" ], [ "*", B, "y" ] ]) STD_FORM_COMP C pentru a fi exprimată în funcție de y.

Dacă adăugăm abs( A )x în ambele părți, obținem:

Dacă scădem abs( A )x din ambele părți, obținem:

\qquad expr( [ "*", B, "y" ] ) STD_FORM_COMP expr([ "+", [ "*", -A, "x" ], C ])

Putem apoi împărți prin B. Dar pentru că este un număr negativ, trebuie să inversăm semnul inecuației:

\qquad y COMP expr([ "+", "\\dfrac{" + expr([ "*", -A, "x" ]) + "}{" + B + "}", "\\dfrac{" + C + "}{" + B + "}" ])

\qquad y COMP \purple{PRETTY_SLOPE} \green{+ YINT}

Avem o formă unde putem vedea ca intersecția cu axa y este YINT, iar panta drepteie este decimalFraction( SLOPE, true, true ). Aceastea ne spun că dreapta trece prin punctul de coordonate (0, YINT).

style({ stroke: GREEN, fill: GREEN }, function() { graph.yint = circle( [ 0, YINT ], 0.2 ).toBack(); });

Panta este decimalFraction( SLOPE, true, true ). Pentru fiecare pas pe care îl facem de la un punct la altul, trebuie să ne mutăm cu abs( SLOPE_FRAC[0] ) poziții în jos (pentru că este negativă) în sus. Pentru fiecare pas pe care îl facem de la un punct la altul, trebuie să ne mutăm cu abs( SLOPE_FRAC[0] ) poziție în jos (pentru că este negativă) în sus. Pentru același pas, pe axa x trebuie să ne mutăm cu SLOPE_FRAC[1] poziții la dreapta. Pentru același pas, pe axa x trebuie să ne mutăm cu SLOPE_FRAC[1] poziție la dreapta. Așadar dreapta trebuie să treacă și prin punctul (SLOPE_FRAC[1], YINT + SLOPE_FRAC[0]).

style({ stroke: "purple", strokeWidth: 2, arrows: "->" }, function() { path([ [ 0, YINT ], [ 0, YINT + SLOPE_FRAC[0] ] ]).toBack(); path([ [ 0, YINT + SLOPE_FRAC[0] ], [ SLOPE_FRAC[1], YINT + SLOPE_FRAC[0] ] ]).toBack(); }); label( [ 0, YINT + SLOPE_FRAC[0] / 2 ], abs( SLOPE_FRAC[0] ) + " \\text{ " + ( SLOPE_FRAC[0] < 0 ? "în jos" : "în sus" ) + "} \\quad", "left", { color: "purple" } ); label( [ 0, YINT + SLOPE_FRAC[0] ], SLOPE_FRAC[1] + " \\text{ " + ("la dreapta") + "}", ( SLOPE_FRAC[0] < 0 ? "below right" : "above right" ), { color: "purple" } ); graph.yint.toBack();

Pentru că inecuația are un semn de mai mic sau egal, atunci orice punct de sub linie este o soluție pentru inecuație. Așadar, zona de sub dreaptă ar trebui colorată.

Pentru că inecuația are un semn de mai mare sau egal, atunci orice punct de deasupra linie este o soluție pentru inecuație. Așadar, zona de deasupra dreptei ar trebui colorată.

Dar pentru că semnul este mai mic sau egal, orice punct de pe linie este de asemenea o soluție. Așadar dreapta ar trebui să fie continuă. Dar pentru că semnul este mai mare sau egal, orice punct de pe linie este de asemenea o soluție. Așadar dreapta ar trebui să fie continuă.

Dar pentru că semnul este mai mic (dar nu și egal), orice punct de pe linie nu este o soluție. De aceea linia ar trebui să fie întreruptă. Dar pentru că semnul este mai mare (dar nu și egal), orice punct de pe linie nu este o soluție. De aceea linia ar trebui să fie întreruptă.