There are two main ways to graph a function:

Plotting Points:
This is a good method for getting a general idea of the function's behavior. Here's how to do it:

Pick some input values (xvalues): Choose a few different numbers to plug into the function's equation. These are typically spread out across the function's domain (the set of all valid input values). Common choices include 2, 1, 0, 1, and 2, but you can choose more depending on the complexity of the function.

Evaluate the function for each input value: For each chosen input value (x), solve the function's equation to find the corresponding output value (y).

Plot the points (x, y): On a graph with an xaxis for the input values and a yaxis for the output values, plot each point you obtained in step 2. Mark the xaxis value on the horizontal axis and the yaxis value on the vertical axis.

Connect the points (optional): Once you have multiple plotted points, you can sometimes connect them with a line or curve to visualize the overall trend of the function. However, it's important to remember that this line might not perfectly represent the function's behavior between the plotted points, especially for complex functions.

Using Key Features:
This method focuses on understanding specific features of the function's behavior rather than plotting every detail. Here are some key features to consider:

Domain and Range: Identify the valid input values (domain) and the corresponding output values (range) for the function. This will determine the boundaries of your graph.

Intercepts: Find the xintercepts (where the function crosses the xaxis, y = 0) and the yintercept (where the function crosses the yaxis, x = 0) by setting y = 0 and x = 0 in the function's equation, respectively, and solving for x and y.

End Behavior: Analyze what happens to the function's output values (y) as the input values (x) approach positive or negative infinity. Does the function approach a certain value, increase or decrease without bound, or exhibit some other behavior?

Symmetries: Check if the function is even (symmetrical around the yaxis) or odd (symmetrical around the origin) by looking at its formula. Even functions satisfy f(x) = f(x) and odd functions satisfy f(x) = f(x).
By understanding these key features, you can sketch a general graph of the function that captures its important characteristics.
Here are some additional tips for graphing functions:

Use a graphing calculator (optional): While not always necessary, graphing calculators can be helpful tools to visualize the graph of a function, especially for more complex equations.

Label your axes: Clearly label your xaxis and yaxis with the variable names and units (if applicable).

Scale your axes appropriately: Choose a scale for your axes that allows you to visualize all the important features of the function's graph.
Remember, the best method for graphing a function depends on the complexity of the function and your desired level of detail.