INSTRUCTOR: All right, here's my second video on periodic function word problems. And in this particular video, we're going to focus when they don't give us the equation. We have to actually write the equation from what's given. So the first thing we're looking at is this one. It says, the tide goes in and out according to a periodic function. When the tide is out, which is low, a boat docked in the harbor is 8 feet above the ocean floor. But six hours later, at peak high tide, the boat is 44 above the ocean floor. Write a function that gives the height of the boat above the floor as a function of the time. So from here, we're looking to write our function in this form right here. We want that form. I'll explain why, later, I'm using a cosine function instead of a sine function. But our midline, to find our midline, they're basically telling us that the minimum is 8, and the maximum is 44. So the midline is going to be the average of those, right? If we have 44 above and then 8 below, we know that 26 is going to be perfectly in the middle. So we just find the average to find our midline. And this will be the D value in our equation. Then we're going to find our amplitude, which is A. And that's our vertical stretch. That's our amplitude. And so I could do 26 minus 8, which is this minimum. Or I could do 44 negative 26 because it should be the same distance from the midline up to the maximum as it is from the midline down to the minimum. And that's going to be 18 in this case. So as we already knew, 18 units above 26 is 44, that maximum. And 18 units below 26 is 8, that minimum. And so then we've got to find the B value. And this is the most complicated value to find. It's not the same thing as the period, but we need the period to calculate it. And our way that we calculate the period is we do-- or the B value-- is, we do 2 pi divided by the period. And so what I got to think about here is this. We're starting at low tide. And then it says that six hours later we'd be at high tide. That means another six hours, we'd be back at low tide, and we've completed the full period. So what we need to recognize is that's a 12-hour period. So to calculate our B value, we do 2 pi divided by 12. And that simplifies to pi over 6. And this is the B value that will go in our equation right there. Now, we're starting at low tide. So I don't think we're really going to need any horizontal shifts. So let's go ahead and graph this. And then, from the graph, I think it will be pretty easy to actually write the equation. So we know that six hours later, it's at a maximum. And then, 12 hours later, it's back down to a minimum. So I kind of like to put my points. And our graph's going to look like this. It's going to go up, hit a maximum, and then come down and back to a minimum. So our function is going to be this, y equals 18 because 18 is the amplitude. And then we're going to use cosine because we're starting at a minimum. If our graph started on the midline, it would be best to use sine. But since it starts at a minimum, we're going to use cosine. And because of that, I'm going to throw a negative in front of that 18. And the reason why is that our cosine function typically starts at a maximum and would do this. And so since ours is starting at a minimum, we need to create a vertical reflection. That's what the negative does. So negative 18 cosine-- and then our B value, as we've established, is pi over 6x. And then we have our D value, our midline of 26. I'm not including that minus C because as we established we didn't have any horizontal shift. So this is going to be your equation for this problem. Let's do one more example. In our next one, it says astronomers have noticed that the number of visible sunspots varies-- it varies from a minimum of about 20 to a maximum of about 100 per year. Further, this variation repeats over an eight-year period. If the last maximum occurred at 2014, write a cosine function which models the phenomenon in terms of the time x which is the years since 2014. So we're starting with our same structure. They actually told us to do a cosine function, so we don't even have to think about that this time. But our first step is to calculate that midline. And just like the last one, they gave us that maximum of 100 and that minimum of 20. So we know that our midline is going to be perfectly between those at 60. That's 40 units away from 100 units above 20, which is how we calculate our amplitude. For amplitude, I could do 100, that maximum, minus 60. Or I could do 60 minus that minimum of 20. But either way, we're going to get that amplitude of 40. Meaning we're going to go 40 units above 60 and 40 units below 60, as I've shown in my graph there. Next, let's calculate that B value. The B value is calculated from the period. But remember, it's not the same thing as the period. So we have to do 2 pi divided by the period to get our B value. And so here, that's going to be 2 pi divided by 8 because they gave us that this phenomenon repeats over an eight-year period. So 2 pi over 8 is equal to pi over 4. And then we have no horizontal shift. So now I think we're ready to graph our equation. And then once we graph our equation we'll be able to write the equation. So we know that 8 is our period. So period, so I'm going to put a little 4 as a marker. Now what it says, is, "the last maximum was in 2014." The last maximum occurred in 2014. So in 2014, I'm going to put that maximum of 100. That means it must hit the minimum four years later and then the maximum again eight years later. So our function is going to look something like this. And so we're ready to write our equation. y equals-- our amplitude is 40. We said a cosine function. This one we don't need a negative 40 because we're starting at the peak. So 40 cosine, and then we're going to put the B value of pi over 4x. And then we're going to add our midline of 60 for our vertical shift. So this one also didn't have any horizontal shift. But yeah, that's basically the gist of it. I would start by finding the midline amplitude B value and horizontal shift from the problem. And then it helps me to get a look at it on the graph before I try to bounce over here and write the equation.