Total Pageviews

Search This Blog

Tuesday, October 3, 2023

Derivation of the Power Rule: Introduction to Calculus

If you've ever driven through mountains, you've probably seen a sign like this:

This sign means that for every 100 feet you go forward on the road, you will descend 18 feet (18/100 = 18%). This road would be said to have an 18% grade. Since this continues for 5 miles, if you drove here, you would descend 4,752 feet. 

(0.18)*(5 miles)*(5,280 feet)/(1 mile) = 4,572 feet

That makes sense. 0.18 is about the same as 1/5, so if you go down a 1 foot for each foot you go ahead, you'll go down about a mile after 5 miles of going ahead. 

In math, the slope of a line is equal to the change in y divided by the change in x. Another way of thinking about it is "rise over run". Finding the slope of the line is easy because the slope between any two points on a line will always be the same. If we have two points with coordinates (1,1) and (6,4), the slope is (4 - 1)/(6- 1) = 2/3.

But what about curves? If we look at a graph of y = x^2, we see that the slope between any two points changes. 


What if we could find the slope of a line that touched the curve at just one point? We can approximate that by picking two points on the curve that are very close together. We will call the horizontal distance between them dx. For the curve y = x^2, we pick two points: (x, x^2) and (x + dx, (x + dx)^2). The slope, m, between these points is:

m = ((x + dx)^2 - x^2))/(x + dx - x)

We can simplify the denominator to get:

m = ((x + dx)^2 - x^2))/(dx)

Then we expand the binomial in the numerator to get:

m = (x^2 + 2x*dx + (dx)^2 - x^2)/(dx)

The x^2 terms cancel out to give:

m = (2x*dx + (dx)^2)/(dx)

Then we can divide through by dx.

m = 2x + dx

Now, we've already said that dx is very small, so using the idea of limits (we learned about them in the lesson about why we can't divide by zero), we can say that the limit of the slope of a line tangent to the curve y = x^2 approaches 2 as dx approaches 0. Calculus means "pebble" or "a little bit" in Latin, and the ancient Romans used them for counting, which is how we got the word "calculator". In this case, dx is our pebble because it's so small. 

We can generalize this finding to similar equations. Using the same approach as above, try to find the slope of a tangent line for the equation y = ax^n + c, where a, n, and c are all constant. It's easier than you think. You've probably already noticed the c term doesn't matter for calculating the slope. Here we go:

m = (a*(x + dx)^n + c- ax^n +c)/(x + dx - x)

We can simplify this to:

m = (a*(x + dx)^n - ax^n)/(dx)

We can also pull a to the outside.

m = a*(x + dx)^n - x^n)/(dx)

Whatever we allow n to be, the x^n terms will cancel. If we look at the first few terms of (x + dx)^n expanded, we see a dx in every term on top, sort of like this:


In the above, b is equivalent to dx, and the exponent of its first term in the expansion is always 1. 

m = a*(n*x^(n - 1)*(dx )) + .... + (dx)^n )/(dx)

That means we can divide through by the dx on the bottom. 

m = a*(n*x^(n - 1)) + ...  + (dx)^(n - 1)

Since dx is very small, all the terms after (dx)^(n - 2) are even smaller, so small that we can round them down to zero. That leaves us with:

m = a*(n*x^(n - 1))

This is called the power rule. If we have an equation in the form y = ax^n + c, the equation for the slope of the line tangent to that curve is y' = a*(n*x^(n - 1)). Note that y' is read as "y prime".

The equation for the slope of a line tangent to a curve is called a derivative or differential, which is where the term "differential calculus" comes from. All the other rules for finding derivatives follow the same process as shown above, finding the equation of the slope between two points as they the distance between them goes to zero. 

In function notation with y = f(x), y' = f'(x), which is read "f prime of x". Derivatives are also sometimes written as dy/dx, meaning a small change in y divided by a small change in x. 

Everything is easy when you know what to do. Give yourself a pat on the back if you read through this. 


No comments: