Math Problem Statement

Buatlah grafik dari y=−2x+3 dan y=−2(x−4)^2 pada satu bidang kartesius, kemudian tentukan titik potong antar kedua fungsi tersebut.

Solution

import numpy as np import matplotlib.pyplot as plt

Define the functions

def linear_func(x): return -2 * x + 3

def quadratic_func(x): return -2 * (x - 4)**2

Generate x values

x_values = np.linspace(-2, 8, 400)

Calculate y values for both functions

y_linear = linear_func(x_values) y_quadratic = quadratic_func(x_values)

Plot the functions

plt.figure(figsize=(8, 6)) plt.plot(x_values, y_linear, label=r'$y=-2x+3$', color='blue') plt.plot(x_values, y_quadratic, label=r'$y=-2(x-4)^2$', color='red')

Find intersection points

from sympy import symbols

Ask a new question for Free

By Image

Drop file here or Click Here to upload

Math Problem Analysis

Mathematical Concepts

Algebra
Linear Equations
Quadratic Equations
Graphing Functions
Intersection Points

Formulas

Linear function formula: y = mx + b
Quadratic function formula: y = a(x - h)^2 + k

Theorems

Concept of Intersection of Two Graphs
Quadratic Formula

Suitable Grade Level

Grades 9-11