Вопрос:

300. Постройте график прямой пропорциональности, заданной формулой: a) y = 3x; б) у = -1,5x; в) у = x; г) у = -x; д) у = 2,5x; e) y = -4,5x.

Смотреть решения всех заданий с листа

Ответ:

Для построения графиков прямой пропорциональности достаточно двух точек: (0; 0) и еще одна точка, отличная от нуля.

  • a) y = 3x

Пусть x = 1, тогда y = 3 × 1 = 3. Точка (1; 3). <canvas id="myChart0" width="400" height="400"></canvas> <script> const ctx0 = document.getElementById('myChart0').getContext('2d'); const myChart0 = new Chart(ctx0, { type: 'line', data: { labels: [0,1], datasets: [{ label: 'y = 3x', data: [0,3], backgroundColor: 'rgba(255, 99, 132, 0.2)', borderColor: 'rgba(255, 99, 132, 1)', borderWidth: 1, pointRadius: 5 }] }, options: { scales: { x: { type: 'linear', position: 'bottom' }, y: { type: 'linear', position: 'left' } } } }); </script>

  • б) у = -1,5x

Пусть x = 1, тогда y = -1,5 × 1 = -1,5. Точка (1; -1,5). <canvas id="myChart1" width="400" height="400"></canvas> <script> const ctx1 = document.getElementById('myChart1').getContext('2d'); const myChart1 = new Chart(ctx1, { type: 'line', data: { labels: [0,1], datasets: [{ label: 'y = -1.5x', data: [0,-1.5], backgroundColor: 'rgba(54, 162, 235, 0.2)', borderColor: 'rgba(54, 162, 235, 1)', borderWidth: 1, pointRadius: 5 }] }, options: { scales: { x: { type: 'linear', position: 'bottom' }, y: { type: 'linear', position: 'left' } } } }); </script>

  • в) у = x

Пусть x = 1, тогда y = 1. Точка (1; 1). <canvas id="myChart2" width="400" height="400"></canvas> <script> const ctx2 = document.getElementById('myChart2').getContext('2d'); const myChart2 = new Chart(ctx2, { type: 'line', data: { labels: [0,1], datasets: [{ label: 'y = x', data: [0,1], backgroundColor: 'rgba(255, 206, 86, 0.2)', borderColor: 'rgba(255, 206, 86, 1)', borderWidth: 1, pointRadius: 5 }] }, options: { scales: { x: { type: 'linear', position: 'bottom' }, y: { type: 'linear', position: 'left' } } } }); </script>

  • г) у = -x

Пусть x = 1, тогда y = -1. Точка (1; -1). <canvas id="myChart3" width="400" height="400"></canvas> <script> const ctx3 = document.getElementById('myChart3').getContext('2d'); const myChart3 = new Chart(ctx3, { type: 'line', data: { labels: [0,1], datasets: [{ label: 'y = -x', data: [0,-1], backgroundColor: 'rgba(75, 192, 192, 0.2)', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1, pointRadius: 5 }] }, options: { scales: { x: { type: 'linear', position: 'bottom' }, y: { type: 'linear', position: 'left' } } } }); </script>

  • д) у = 2,5x

Пусть x = 1, тогда y = 2,5 × 1 = 2,5. Точка (1; 2,5). <canvas id="myChart4" width="400" height="400"></canvas> <script> const ctx4 = document.getElementById('myChart4').getContext('2d'); const myChart4 = new Chart(ctx4, { type: 'line', data: { labels: [0,1], datasets: [{ label: 'y = 2.5x', data: [0,2.5], backgroundColor: 'rgba(153, 102, 255, 0.2)', borderColor: 'rgba(153, 102, 255, 1)', borderWidth: 1, pointRadius: 5 }] }, options: { scales: { x: { type: 'linear', position: 'bottom' }, y: { type: 'linear', position: 'left' } } } }); </script>

  • e) y = -4,5x

Пусть x = 1, тогда y = -4,5 × 1 = -4,5. Точка (1; -4,5). <canvas id="myChart5" width="400" height="400"></canvas> <script> const ctx5 = document.getElementById('myChart5').getContext('2d'); const myChart5 = new Chart(ctx5, { type: 'line', data: { labels: [0,1], datasets: [{ label: 'y = -4.5x', data: [0,-4.5], backgroundColor: 'rgba(255, 159, 64, 0.2)', borderColor: 'rgba(255, 159, 64, 1)', borderWidth: 1, pointRadius: 5 }] }, options: { scales: { x: { type: 'linear', position: 'bottom' }, y: { type: 'linear', position: 'left' } } } }); </script>

Ответ: (графики выше)

ГДЗ по фото 📸
Подать жалобу Правообладателю

Похожие