
Matthew V. answered 09/12/14
Tutor
0
(0)
Electrical Engineer for Circuits, Programming, Math, Science, and Surf
It may help for you to draw this out on graph paper to visualize what we're doing.
First, the ball's path is going to be described by a piecewise function, which means that we will define a different linear equation depending on the domain (or X values, given to the function). So the first part of the ball's path will be from (2.5,2) to (6,8) because the golfer is bouncing it off a wall at (6,8). We use these two points to find the slope and the y-intercept of the line. To find the slope, use the equation m = (y2 - y1)/(x2 - x1), where (x1,y1)=(2.5,2) and (x2,y2)=(6,8). Plug these points into the previous equation to get the slope, and we'll call this m1 (slope of the 1st equation).
Now, using the equation for a line, y = mx + b, 1 point, say (2.5, 2) and your value for m1, to solve for the y-intercept, b (for the first equation, we can call it b1). Once you solve for b1, you now have enough information to write the equation of the first part of the ball's path: y = (m1)x + (b1), for x1≤x<x2. You can notice we added the qualifier after the equation, that this part of the equation is only valid for values of x between x1 and x2.
Now for the second equation, from the point on the wall and towards the hole, we may infer something about this equation based on our first equation. Since the ball is hitting the wall and bouncing off, we know that the angle between the wall and the ball's path towards the wall is equal to the angle between the wall and the ball's path away from the wall. This basically means in this case, that the slope of the 2nd line will be equal to the slope of the 1st line, but negated. Therefore, the slope of 2nd line is m2 = -m1. Using this slope, and the only point we know that lies on this line, (6,8), solve for the y-intercept in the same way you did for the first line (call it b2). y = mx + b. Now that you have the slope of the 2nd line and the y-intercept, you can write the equation for the line y = (m2)x + (b2), for x>x2. This is how you define the equation for the path of the ball, in two parts, as a piecewise function.
Now, for part b, to determine if the player makes the shot, all you need to do is check whether the point of the hole (9.5,2) lies on the line of the 2nd part of the ball's path. Plug the point of the hole into your equation for the 2nd path (y = (m2)x + (b2)), and see if it evaluates true, if so, then the ball will pass over the hole (or basically, the player makes the shot).