Lecture 6
Lecture 6
Lecture 6
Example 1: Write a code script which enables a user to input the coefficients of a
quadratic 𝑞(𝑥) = 𝑎𝑥 2 + 𝑏𝑥 + 𝑐 , where 𝑎 = 2, 𝑏 = 3, 𝑐 = 7, and 𝑥 = 1.
Solution:
Example 3: Write a code script which enables a user to calculate the time related
function 𝑓(𝑡) = 4 − 𝑡 2 𝑒 −3𝑡 with time range 0 ≤ 𝑡 ≤ 3 seconds.
Solution: