Write a program to solve the following problems related to quadratic functions. To do these you are expected to be familiar with quadratics.
For testing, use the equation: $$ y = x^2 - 2x - 3 \tag{1}$$
Notes and Code | Outcome |
---|---|
I. Find the ZerosFind the zeros of a given quadratic. The zeros are the x values when the curve crosses the x-axis (i.e. when y = 0) Test Case: |
Answer ▼
x
HintsHint ▼
The quadratic formula is:
$$ x = \frac{-b \pm \sqrt{b^2-4ac}}{2a} $$
|
II. Coordinates of the VertexFind the coordinates (x, y) of the vertex of the quadratic (it's maximum or minimum.)
|
Answer ▼
x
|
III. Type of Critical Value (Max or Min)Determine if the critical value is a maximum or minimum.
|
Answer ▼
x
|
IV. Slope of the line.Find the slope of a line tangent to the quadratic when: $$ x = 2 $$ If you have not taken calculus, see the hint to the right.
|
Answer ▼
x
HintsHint ▼
The slope of a quadratic can be found by differentiating the function, so:
$$ y = a x^2 + bx+c $$
gives the slope equation (m)
$$ \frac{dy}{dx} = 2ax + b $$
|
V. Chord LengthGiven two x values (-2 and 2), find the length of a chord between the two points on the curve.
|
Answer ▼
x
Hints |
VI. Line LengthEstimate the length of the curve between x = -2 and x = 2 by using a series of chords along the line.
|
|
VII. Line Length: Taking it to the LimitYou can get a better/more accurate estimate of the distance along the curve by breaking the curve into smaller segments. Estimate the length of the curve between x = -2 and x = 2 by using more than just four line segments (use as many as you can).
We describe the process of adding up the sum of smaller and smaller cords as taking the limit as the change in x (dx) approaches zero; after all, if you made the step zero, you'd have infinite steps. Mathematically, the limit as dx goes to zero is written as: $$ \lim_{\Delta x \to 0} $$ |
|
VIII. Finding the Slope using the chordYou can also use the limit method to estimate the slope of the line. Say, you want to find the slope when x = 2 (as in section IV). You could just take two points--when x = 1 and x = 2, and find the slope of the chord between those two points.
If we instead take the second point to be when x = 1.5 with the first point still x = 2, the difference in x (dx) is 0.5, and the slope becomes closer to the actual slope:
Mathematically, the slope at a point can be found by making dx as small as possible: i.e. taking the limit as dx goes to zero. Find the slope at x = 2 by finding the slope of a very small chord. |
Answer ▼
x
As we know from section IV, the slope should be 2.
HintsHint ▼
Test your program by making sure it works with the two examples to the left (when dx = 1 and when dx = 0.5).
|