Introduction - University of Mary Hardin–Baylor

Download Report

Transcript Introduction - University of Mary Hardin–Baylor

INTRODUCTION
 Polynomials: frequently used expressions in modeling
 Projectile motion
 𝑥 𝑡 = 𝑣𝑥 0 𝑡,
1
2
𝑦(𝑡) = 𝑣𝑦 𝑡 − 𝑔𝑡 2
0
 Solutions are often the zeros of these equations
 When does the projectile hit the ground?
 This section outlines how MATLAB handles polynomials and
some useful functions
WARM-UP PROBLEM
The vertical height of a rock shot from a
sling-shot is given by 𝑦(𝑡) = 𝑣𝑦 𝑡 −
1
𝑔𝑡 2 .
2
0
With an initial vertical velocity of
15 m/s, what is the height after 2
seconds? When does it hit the ground?
POLYNOMIALS IN MATLAB
 MATLAB has several intrinsic functions that handle
polynomials




Root finding
Calculating values at a given location
Multiplication of polynomials
Derivatives
 Each relies on converting a polynomial into a vector of
coef ficients
 10𝑥 3 + 3𝑥 2 + 8𝑥 + 9 becomes 10 3 8 9
 A longer vector means the polynomial has more terms
POLYNOMIALS IN MATLAB
 polyval(p,x): evaluates the polynomial p at x
 Example: what is 6𝑥 2 − 150 when 𝑥 = 3?
 roots(p): evaluates the roots of p (how many are there?)
 Example: where does 5𝑥 5 + 6𝑥 2 − 7𝑥 = 0?
 poly(r): given roots of a polynomial, returns the
coef ficients
 Example: r = (1 2 3 4 5), what is the polynomial?
 conv(p,q): multiplies the polynomials p,q
 Example: (5𝑥 5 + 6𝑥 2 − 7𝑥)(2𝑥 2 + 𝑥 − 7)
 polyder(p): takes the derivative of the polynomial
 Example:
𝑑
𝑑𝑥
(5𝑥 5 + 6𝑥 2 − 7𝑥)
CONCEPT QUESTIONS
 How many roots would you expect the following polynomial to
have?
 5𝑥 5 − 𝑥 2 + 1
 What do the zeros of that polynomial represent?
 How might you find the maximum value of the above
polynomial?
GROUP PROBLEM
 Phoebe Small is out Sunday driving in her spaceship. As she
approaches Mar s, she changes her mind, decides that she does not
wish to visit that planet, and fires her retro-rocket. The spaceship slows
down, and if all goes well, stops for an instant then star ts pulling away.
While the rocket motor is firing, Phoebe’s distance , d, from the sur face
of Mar s depends by a quadratic function on the number of minutes, t,
since she star ted firing the rocket.
 Phoebe finds that at times t = 1, 2, and 3 minutes, her distances are d = 425,
356, and 293 kilometers, respectively. Find the particular equation expressing d
in terms of t.
 Find the d – intercept and tell what this number represents in the real world.
 According to the equation, where will Phoebe be when t = 15? When t = 16?
 Does this tell you she is pulling away from Mars when t = 16, or still approaching?
 Does your model tell you that Phoebe crashed into the surface of Mars, just
touches the surface, or pulls away before reaching the surface? Explain.
FOR NEXT TIME
 Chapter 8, #2,3,7,9,18,22,25 Due Wednesday