Lesson 1 · Unit 02
Slopes
A derivative is rise over run on a tiny step
What you practise
- The derivative as rise over run on a tiny step, estimating it numerically, power rule and a few friends, where the slope is zero
Try a question from this lesson
Pick one
At 2:00 a car has covered 100 km. At 2:30 it has covered 150 km. What was its average speed over that half hour?
Hint
Speed is distance gained divided by time taken. The time is half an hour, not one.
Correct answer
100 km/h
Why
50 km in half an hour is 100 km/h: change in output divided by change in input. That ratio, rise over run, is all a derivative is. 50 forgets to divide by the 0.5 hours.
The ideas
Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.
Concept
A derivative is a slope
Pick a spot x on a function. Nudge it by a tiny amount h and see how far the output moves. The ratio is the slope at that spot:
(f(x + h) - f(x)) / h
It answers: if I turn this knob a little, how much does the result change, and in which direction? Training a model is asking that question about every weight.
def f(x):
return x ** 2
h = 0.001
slope = (f(3 + h) - f(3)) / h
print(round(slope, 2)) # 6.0Concept
The power rule
You rarely need the nudge. For powers of x there is a shortcut: bring the power down in front and lower it by one.
The slope function is written f'(x), read "f prime". When the output is called y it is also written dy/dx: change in y per change in x.
A constant has slope 0, a number in front stays in front, and a sum is done term by term.
f(x) = x² f'(x) = 2x
f(x) = x³ f'(x) = 3x²
f(x) = 5x f'(x) = 5
f(x) = 7 f'(x) = 0
f(x) = x² + 5x f'(x) = 2x + 510 more exercises in the app
- 4× type the answer
- 3× multiple choice
- 1× fill the blanks
- 1× true or false
- 1× match the pairs
Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.