Using code

If I use 0.0000002 as DELTA X, then the results are even more precise.

Slope(6): 800.8883605725714
Slope(7): 2402.665081717714

// Section 1 - 16 : Rates of Change
// Using NodeJS

let slope = (time) => {
    let deltaX = 0.2
    let t_before = time - deltaX / 2
    let t_after  = time + deltaX / 2
    let factor = (tf) => Math.pow(3, tf)
    let deltaY = factor(t_after) - factor(t_before)
    console.log(`Slope(${time}): ${deltaY/deltaX}`)
}
slope(6) // 802.5003832340008
slope(7) // 2407.5011497020023
2 Likes

Great work using code to solve math problems! :slight_smile:

Great work. The close deltaX gets to 0 the more accurate your result will be.

Privacy & Terms