Writing a quadratic function from a graph | Algebra 1 (TX TEKS) | Khan Academy
We're told here's the graph of a quadratic function f. All right, write the equation that defines f in standard form. So pause this video, have a go at this before we do this together.
All right, now let's work on this together. So before we even get to standard form, I'm going to think about what would the equation that defines f look like in factored form—in general, factored form.
So we would have f of x is equal to some constant or some factor, I guess we could say a times (x - M)(x - N), where M and N are each the X values that would make this function zero. Because if x is equal to M, well, then this is going to become 0. 0 * everything else is zero, or if x is equal to N, N minus N is zero, so everything else is going to be equal to zero.
We know what those values are by looking at this graph and looking at the X intercepts—the X values that make the function equal zero. We can see that right over here when X is equal to four, the value of our function is zero; we have an X intercept there. We also see when X is equal to 8, that's the other X intercept, and the function f of 8 is also equal to zero.
So now we could say that f of x is equal to a times (x - 8)(x - 4). Now, the next thing we have to worry about is how do we figure out a? Well, one way to do this is to just multiply everything out over here—at least multiply—we'll start off by multiplying this part out.
Then we could say, well, what value of a would get us the right Y intercept so that f of 0 is equal to 8? So let's just multiply this all out. So this is going to be equal to—I'll leave the a here—now x * x is x², x * -4 is -4x, and then let's see, we're subtracting a negative eight, so let's just make this the same thing as adding a positive 8.
So then we have 8 * x is 8x, and then posi 8 * -4 is -32. And so this is equal to a * (x² - 4x + 8x - 32). So if we combine these two terms, we're going to have plus 4x; 8x - 4x is pos 4x, and then we have -32.
Now we can multiply everything by a; this is going to be equal to a(x² + 4ax - 32). This is what f of x is going to be equal to. Now, what would f of 0 be equal to? Well, if I take f of 0, all of these terms with an x in it— a * 0² is 0, 4a * 0 is 0—so we would just be left with this - 32a.
All I did is say, all right, when x is zero, these first two terms right over here are going to be equal to zero, so you're just going to be left with -32a. But we also know when f is—or when x is equal to zero, f of 0 is 8. We see that from the graph, so this is equal to eight.
So we could use this to solve for a. Divide both sides by -32. Let's do that. -32 / 32, and we get a is equal to 8 over -32, which is the same thing as 1 over 4. So this is 1/4.
So now we can substitute that back into this expression, or this equation I guess we could say, and we get f of x is equal to a x². We now know that a is -1/4, so (1/4)x². Then we have + 4 * a * x—well, 4 * -4 is -1, so this is all going to become -1 * x.
So this is going to be -x. Last but not least, -32 * -4 is going to be equal to positive 8. And we can verify again that when x equals 0, our function is indeed equal to 8.
But we are done! We have written this equation now in standard form. We started with general factored form, we used the X intercepts to figure out what M and N are, then we used the Y intercept to figure out what a is, and when we multiplied everything out, we got it in standard form.