On of the very best examples of a plot with many, many line segments is the Stock Market prices.
This line has two segments and is not a straight line.
In math, we write multiple equations and then specify when they should be used. For example:
For phone calls:
10 cents/min (midnight to 8 a.m.)
15 cents/min (8 a.m. to midnight)
For this problem:
Stock price is:
$10 + ((12-10)/31)*day (for January days)
$12 - ((-9-12)/28)*day (for February days)
1) This equation will be in the form y=mx+b , where m is slope and b is y-intercept.
First, we need to find the slope between the two points.
m = (y2 - y1) / (x2 - x1)
m = (-1 - 2) / (3 - 1)
m = -3 / 2
The equation of the line so far is
y = (-3/2)x + b
Now we plug in the values of the coordinate point (1, 2) into the equation to find b.
2 = (-3 / 2)(1) + b
2 = (-3 / 2) + b
7 / 2 = b
The equation you want is
y = (-3/2)x + (7/2)
2) To find the vertex, we put f(x) into vertex form. Any quadratic function in vertex form is
f(x) = a(x - h)2 + k
a is the coefficient of the x2 term
The coordinate of the vertex is (h, k)
f(x) = (x2 - 6x + 9) - 6
f(x) = (x - 3)(x - 3) - 6
f(x) = (x - 3)2 - 6
h = 3
k = -6
Therefore, the vertex is (3, -6).
3) When drawing a smiling face, we know the feature it has is a mouth and two eyes. The mouth represents a parabola that opens upward or the negative half of a circle. The eyes represents a single point, or a small line. Knowing this fact, we can create a piecewise function for each type of curve to represent different facial features of a smiling face.
We can use the origin as our reference point to start off.
For the mouth, lets use the parabola f(x) = (1/5)x2 - 3. One point of the parabola will be (0, -3). Now we want to pick the endpoints of this parabola. To do this, we can find the x-intercepts. Set f(x) equal to zero and solve for x.
(1 / 5)x2 - 3 = 0
(1 / 5)x2 = 3
x2 = 15
x = -√15 and x = √15
So the domain of this parabolic function is -√15 ≤ x ≤ √15.
Now to draw the eyes, we will draw two short horizontal lines that are symmetrical to each other with reference to the y-axis.
f(x) = 2
The domain of this function on the left of the y-axis is -2 ≤ x ≤ -1. The domain on the right side is 1 ≤ x ≤ 2.
Here is your piecewise function:
f(x) = (1/5)x2 - 3 for -√15 ≤ x ≤ √15
2 for -2 ≤ x ≤ -1 and 1 ≤ x ≤ 2