Introducing Power Series 1

The next few posts will discuss a way to introduce Taylor and Maclaurin series to students. We will kind of sneak up on the idea without mentioning where we are going or using any special terms. In this post we will find a way of approximating a function with a polynomial of any degree we choose. In the next post we will look at the graph of these polynomials and finally suggest some questions for further thought.

Making Better Approximations

Students already know and have been working with the tangent line approximation of a function at a point (a, f(a)):

f(x)\approx f\left( a \right)+{f}'\left( a \right)\left( x-a \right)

ln(x):

For the function f\left( x \right)=\ln \left( x \right) at the point (1, 0) ask your students to write the tangent line approximation: y=0+(1)(x-1) .Point out that this line has the same value as  ln(xand its derivative as at (1, 0).

Then suggest that maybe having a polynomial that has the same value, first derivative and second derivative might be a better approximation. Suggest they start with y=a+b\left( x-1 \right)+c{{\left( x-1 \right)}^{2}} and see if they can find values of a, b and c that will make this happen.

Since f\left( 1 \right)=0,{f}'\left( 1 \right)=1\text{ and }{{f}'}'\left( x \right)=-1 we can write

y=a+b\left( x-1 \right)+c{{\left( x-1 \right)}^{2}};\quad y\left( 1 \right)=a+0+0=0;\quad a=0

{y}'=b+2c\left( x-1 \right);\quad {y}'\left( 1 \right)=b+0=\tfrac{1}{1};\quad b=1

{{y}'}'=2c;\quad {{y}'}'\left( 1 \right)=c=-\tfrac{1}{{{1}^{2}}}=-1;\quad c=-\tfrac{1}{2}

y=0+\left( x-1 \right)-\tfrac{1}{2}{{\left( x-1 \right)}^{2}}

Then suggest they try a third degree polynomial starting with y=a+b\left( x-1 \right)+c{{\left( x-1 \right)}^{2}}+d{{\left( x-1 \right)}^{3}}. Proceeding as above, all the numbers come out the same and we find that

\ln \left( x \right)\approx 0+\left( x-1 \right)+\left( -\tfrac{1}{2} \right){{\left( x-1 \right)}^{2}}+\left( \tfrac{1}{3} \right){{\left( x-1 \right)}^{3}}

Then go for a fourth- and fifth-degree polynomial until they discover the patterns. (The signs alternate, and the denominators are the factorial of the exponent.)

See if the class can write a general polynomial of degree N :

 \displaystyle \ln \left( x \right)\approx \sum\limits_{k=1}^{N}{\frac{{{\left( -1 \right)}^{k+1}}}{k}{{\left( x-1 \right)}^{k}}}

sin(x):

Then have the class repeat all this for a new function such as f\left( x \right)=\sin \left( x \right) at the point (0, 0). This could be assigned as homework or group work. Ask them to do enough terms until they see the pattern. There will be patterns similar to ln(x ) and every other term (the even powers) will have a coefficient of zero.

\sin \left( x \right)\approx x-\tfrac{1}{3!}{{x}^{3}}+\tfrac{1}{5!}{{x}^{5}}-\tfrac{1}{7!}{{x}^{7}}+\tfrac{1}{9!}{{x}^{9}}

or in general the polynomial of degree N is

\displaystyle \sin \left( x \right)\approx \sum\limits_{k=1}^{N}{\frac{{{\left( -1 \right)}^{k+1}}}{\left( 2k-1 \right)!}{{x}^{2k-1}}}

How good is this approximation? Using only the first three terms of the polynomial above you will tell you that. Pretty close: correct to 5 decimal places.  Using four terms gives correct to 7 decimal places when rounded.

Finally, see if they can generalize this idea to any function f at any point on the function \left( {{x}_{0}},f\left( {{x}_{0}} \right) \right). This time you will not have the various derivatives as numbers, rather they will be expressions like . Work through the powers one at a time to go from y=a+b\left( x-{{x}_{0}} \right)+c{{\left( x-{{x}_{0}} \right)}^{2}}+d{{\left( x-{{x}_{0}} \right)}^{3}}+e{{\left( x-{{x}_{0}} \right)}^{4}}

and so on, until you get to

f\left( x \right)\approx f\left( {{x}_{0}} \right)+\frac{{f}'\left( {{x}_{0}} \right)}{1!}\left( x-{{x}_{0}} \right)+\frac{{{f}'}'\left( {{x}_{0}} \right)}{2!}{{\left( x-{{x}_{0}} \right)}^{2}}

\quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad +\cdots +\frac{{{f}^{\left( N \right)}}\left( {{x}_{0}} \right)}{N!}{{\left( x-{{x}_{0}} \right)}^{N}}

For example the third derivative computation would look like this:

{{{y}'}'}'=3\cdot 2\cdot 1d+4\cdot 3\cdot 2e\left( x-{{x}_{0}} \right)

{{{y}'}'}'\left( {{x}_{0}} \right)=3\cdot 2\cdot 1d+4\cdot 3\cdot 2e(0)={{{f}'}'}'\left( {{x}_{0}} \right)

d=\frac{{{{f}'}'}'\left( {{x}_{0}} \right)}{3!}

The computations here are perhaps a little different than what students have seen, so take your time doing this. Two or even three class days may be necessary.

Notice these things:

  • The first two terms are the tangent line approximation.
  • The various derivatives are numbers that must be calculated.
  • All the terms of any degree are the same as the terms of the previous degree with one additional term.

Next post in this series: Looking at all this graphically.

(Typos in an earlier version of this post have been corrected – LMc)

Logarithms

Students first encounter logarithms in Algebra 2 or their last pre-calculus course. They are usually defined as exponents and their properties “proven” by reference to the corresponding properties of exponents. This is good enough at the time, but in calculus we are ready to define logarithms properly. The result is the definition in terms of a function defined by an integral.

In fact, the definition flows naturally from the properties of inverse functions (no pun intended, because the flow is quite natural). But is this a definition? Or a proof? The solution of certain differential equations discussed in my last post may be used to derive the logarithm function.

Let’s begin by pretending we know nothing about logarithms, and investigate the inverse of ex.  (See The Derivative of Exponential Functions)

This function ex contains points of the form \left( X,{{e}^{X}} \right) so its inverse will contain points of the form \left( {{e}^{X}},X \right), which, since we like the first coordinate of functions to be x, we may also call \left( x,\ln \left( x \right) \right), where ln(x) will be the name of the inverse of ex. Remember, at the moment ln(x) is just a notation for the inverse of ex, we do not know anything about logarithms (yet).

So \left( {{e}^{X}},X \right) =\left( x,\ln \left( x \right) \right) and X\ne x. For example, (0, 1) is a point on eX, so (1, 0) is a point on the ln(x) function, and so ln(1) = 0.

In a previous post  we defined the number e and the function ex in such a way that \displaystyle \frac{d}{dx}{{e}^{x}}={{e}^{x}}. Now, at \left( X,{{e}^{X}} \right) the derivative is eX, so at the corresponding point on its inverse, \left( {{e}^{X}},X \right), the derivative is the reciprocal of the derivative of eX which is \frac{1}{{{e}^{X}}}=\frac{1}{x}. That is

\displaystyle \frac{d}{dx}\ln \left( x \right)=\frac{1}{x}

We can use this idea to define ln(x) as a function defined by an integral. Solving the differential equation by the method suggested in a recent post we get:

\displaystyle \ln \left( x \right)=\ln \left( a \right)+\int_{a}^{x}{\frac{1}{t}dx}

We can pick any positive number for a and a convenient one is the one we already found a = 1 where  ln(1) = 0, so

\displaystyle \ln \left( x \right)=\int_{1}^{x}{\frac{1}{t}dx},\quad x>0

This then is the “official definition” of the natural logarithm function. The domain is x > 0 (the range of ex) and the range is all real numbers (the domain of ex).

Graphically, ln(x) is the area between the graph of \displaystyle \frac{1}{t} and the t-axis between 1 and x. If 0<x<1, then \ln \left( x \right)<0 and if x>1, \ln \left( x \right)>0.

logarithm

From this definition we can prove all the familiar properties of logarithms \left( \ln \left( ab \right)=\ln \left( a \right)+\ln \left( b \right)\text{ etc}\text{.} \right) and show that this is a function of the kind we called “logarithm” all along. This is in all the textbooks so I will not go into this here.

One of these properties tells us that for a>0\text{ and }a\ne 1, \displaystyle {{\log }_{a}}\left( x \right)=\frac{\ln \left( x \right)}{\ln \left( a \right)} and since ln(a) is a constant

\displaystyle {{\log }_{a}}\left( x \right)=\frac{1}{\ln \left( a \right)}\int_{1}^{x}{\frac{1}{t}dt}

Finally, you will see this antiderivative formula: \displaystyle \int_{{}}^{{}}{\frac{1}{x}dx=\ln \left| x \right|+C}. The absolute value sign is to remind you that the argument of the logarithm function must be positive, since in some situations x itself may be negative.


Revised slightly 8-28-2018

Painting a Point

Accumulation 7: An application (of paint)

Suppose you started with a point, the origin to be specific, and painted it. You put on layers and layers of paint until your point grows to a sphere with radius r. Let’s stop and admire your work part way through the job; at this point the radius is {{x}_{i}} and 0\le {{x}_{i}}\le r.

How much paint will you need for the next layer?

Easy: you need an amount equal to the surface area of the sphere, 4\pi {{x}_{i}}^{2}, times the thickness of the paint. As everyone knows paint is thin, specifically \Delta x thin. So we add an amount of paint to the sphere equal to 4\pi {{x}^{2}}\left( \Delta x \right).

The volume of the final sphere must be the same as the total amount of paint. The total amount of paint must be the (Riemann) sum of all the layers or \displaystyle \sum\limits_{i=1}^{n}{4\pi {{x}_{i}}^{2}\left( \Delta x \right)}. As usual \Delta x is very thin, tending to zero as a matter of fact, so the amount of paint must be

\displaystyle \underset{\Delta x\to 0}{\mathop{\lim }}\,\sum\limits_{i=1}^{n}{4\pi {{x}_{i}}^{2}\left( \Delta x \right)=\int_{0}^{r}{4\pi {{x}^{2}}}dx=\left. \tfrac{4}{3}\pi {{x}^{3}} \right|_{0}^{r}=\tfrac{4}{3}\pi {{r}^{3}}}.

A standard related rate problem is to show that the rate of change of the volume of a sphere is proportional to its surface area – the constant of proportionality is dr/dt. So it should not be a surprise that the integral of this rate of change of the surface area is the volume. The integral of a rate of change is the amount of change.

Interestingly this approach works other places as long as you properly define “radius:”

  • A circle centered at the origin with radius x and perimeter of 2\pi x, gains area at a rate equal to its perimeter times the “thickness of the edge” \Delta x: \displaystyle A=\underset{n\to \infty }{\mathop{\lim }}\,\sum\limits_{k=1}^{n}{2\pi x\Delta x}=\int_{0}^{r}{2\pi x\,dx=\pi {{r}^{2}}}
  • A square centered at the origin with “radius” x with sides whose length are s =2 x, gains area at a rate equal to its perimeter (8x) times the “thickness of the edge” \Delta x:  \displaystyle A=\underset{n\to \infty }{\mathop{\text{lim}}}\,\sum\limits_{k=1}^{n}{8x\Delta x=\int_{0}^{x}{8x\,dx}}=4{{x}^{2}}={{(2x)}^{2}}={{s}^{2}}
  • A cube centered at the origin with “radius” x and edges of length 2x, gains volume at a rate equal to its surface area, 6(4{{x}^{2}}), times the “thickness of the face” \Delta x – think paint again: V=\underset{n\to \infty }{\mathop{\text{lim}}}\,\sum\limits_{k=1}^{n}{\text{6(4}{{\text{x}}^{2}})\Delta x}=\int_{0}^{x}{24{{x}^{2}}dx}=8{{x}^{3}}={{(2x)}^{3}}={{s}^{3}}

Accumulation and Differential Equations

Accumulation 6: Differential equations

When students first learn about antiderivatives, they are given simple initial value problems to solve such as \frac{dy}{dx}=3-2x,\quad y\left( 1 \right)=-5. They are instructed to find the antiderivative, then tack on a +C , then substitute in the initial condition, then solve for C and finally write the particular solution. So we hope to see:

 \frac{dy}{dx}=3-2x

y=3x-{{x}^{2}}+C

-5=3(1)-{{1}^{2}}+C

-7=C

y=3x-{{x}^{2}}-7

But thinking of it as an accumulation problem you can write

\displaystyle y=-5+\int_{1}^{x}{3-2t\,dt}

y=-5+\left. \left( 3t-{{t}^{2}} \right) \right|_{1}^{x}

 y=-5+\left( 3x-{{x}^{2}} \right)-\left( 3(1)-{{1}^{2}} \right)

y=3x-{{x}^{2}}-7

Now I’ll admit there is not too much difference in the amount of work involved there, but once the first line is on the paper there is not much to remember in what to do from there on. Common student mistakes in the first method include entirely forgetting the +C and not using the initial condition correctly.

A differential equation in which dy/dx can be written as a function of x only, \frac{dy}{dx}={f}'\left( x \right), with an initial condition \left( a,f\left( a \right) \right) has the solution

\displaystyle f\left( x \right)=f\left( a \right)+\int_{a}^{x}{{f}'\left( t \right)dt}

Look familiar? Yes, that’s my favorite accumulation equation.

Furthermore, if all you need is some function values, this expression can be entered into a graphing calculator and the values calculated without finding an antiderivative.

In my first post on accumulation, I discussed the AP exam question 2000 AB 4. The solution to part (a) looks like this

\displaystyle \int_{0}^{3}{\sqrt{t+1}dt}=\left. \tfrac{2}{3}{{\left( t+1 \right)}^{3/2}} \right|_{0}^{3}=\tfrac{2}{3}\left( {{4}^{3/2}}-{{0}^{3/2}} \right)=\tfrac{14}{3}\text{ gallons}

The scoring standard included a second method that went this way:

L(t)=\text{ gallons leaked in first }t\text{ minutes}

\frac{dL}{dt}=\sqrt{t+1};\quad L\left( t \right)=\tfrac{2}{3}{{\left( t+1 \right)}^{3/2}}+C

L(0)=0;\quad C=-\tfrac{2}{3}

L(t)=\tfrac{2}{3}{{\left( t+1 \right)}^{3/2}}-\tfrac{2}{3};\quad L(3)=\tfrac{14}{3}

You decide which is easier. If you’re still not sure compare the two methods shown for part (c) on the scoring standard.                                               

Stamp Out Slope-intercept Form!

Accumulation 5: Lines

Ban Slope Intercept

If you have a function y(x), that has a constant derivative, m, and contains the point \left( {{x}_{0}},{{y}_{0}} \right) then, using the accumulation idea I’ve been discussing in my last few posts, its equation is

\displaystyle y={{y}_{0}}+\int_{{{x}_{0}}}^{x}{m\,dt}

\displaystyle y={{y}_{0}}+\left. mt \right|_{{{x}_{0}}}^{x}

\displaystyle y={{y}_{0}}+m\left( x-{{x}_{0}} \right)

This is why I need your help!

I want to ban all use of the slope-intercept form, y = mx + b, as a method for writing the equation of a line!

The reason is that using the point-slope form to write the equation of a line is much more efficient and quicker. Given a point \left( {{x}_{0}},{{y}_{0}} \right) and the slope, m, it is much easier to substitute into  y={{y}_{0}}+m\left( x-{{x}_{0}} \right) at which point you are done; you have an equation of the line.

Algebra 1 books, for some reason that is beyond my understanding, insist using the slope-intercept method. You begin by substituting the slope into y=mx+b and then substituting the coordinates of the point into the resulting equation, and then solving for b, and then writing the equation all over again, this time with only m and b substituted. It’s an algorithm. Okay, it’s short and easy enough to do, but why bother when you can have the equation in one step?

Where else do you learn the special case (slope-intercept) before, long before, you learn the general case (point-slope)?

Even if you are given the slope and y-intercept, you can write y=b+m\left( x-0 \right).

If for some reason you need the equation in slope-intercept form, you can always “simplify” the point-slope form.

But don’t you need slope-intercept to graph? No, you don’t. Given the point-slope form you can easily identify a point on the line,\left( {{x}_{0}},{{y}_{0}} \right), start there and use the slope to move to another point. That is the same thing you do using the slope-intercept form except you don’t have to keep reminding your kids that the y-intercept, b, is really the point (0, b) and that’s where you start. Then there is the little problem of what do you do if zero is not in the domain of your problem.

Help me. Please talk to your colleagues who teach pre-algebra, Algebra 1, Geometry, Algebra 2 and pre-calculus. Help them get the kids off on the right foot.

Whenever I mention this to AP Calculus teachers they all agree with me. Whenever you grade the AP Calculus exams you see kids starting with y = mx + b and making algebra mistakes finding b.

Graphing with Accumulation 2

Accumulation 4: Graphing Ideas in Accumulation – Concavity

In the last post we saw how thinking about Riemann sum rectangles, RΣR, moving across the graph of the derivative made it easy to see when the function whose derivative was given increased and decreased and had its local extreme values. Today we will consider concavity.

Suppose a derivative is constant, its graph a horizontal line. In this case each successive RΣR is exactly the same size and adds exactly the same amount to the accumulated function. The function’s graph increases (or decreases) by exactly the same amount – it is linear.

For derivatives that are not constant, the change in the resulting function is not constant and the function’s graph bends up or down. This bending of the function is referred to as its concavity. If it bends up, the function increases faster and its graph is concave up; if it bends down, it is increasing slower (or decreasing faster) and concave down.

RSR 2

The graph above shows pairs of RΣR in different intervals as they move along the graph of a derivative. Consider the dark blue rectangle to be the previous position of the red rectangle.

As the RΣR moves from a to b each red rectangle is larger than the dark blue one. Each move adds more to the accumulated sum than the previous one. The graph of the function increases more with each move – it is concave up.

As the RΣR moves from b to d (there are two pairs drawn) each red RΣR has a smaller value than the previous one. (Remember when they are below the x-axis the longer (red) RΣR has a smaller value.) In the interval [b, d] less is added to the accumulated sum (or more is subtracted) with each move to the right. Therefore, the graph of the function bends down – the function is concave down.

In the last section, from d to f the red rectangle now has a larger value than the dark blue one. (Again, remember that when the function has negative values, the shorter rectangle, has the larger value.) The graph of the function again bends up – is concave up.

Putting these ideas together with those in the last post we can see how the moving RΣR idea can distinguish the four shapes of the graph of the accumulating function:

  • On [a, b] the function’s graph is increasing and concave up; the RΣR are positive and getting more positive (longer).
  • On [b, c] the function’s graph is increasing and concave down; the RΣR are positive and getting less positive (shorter).
  • On [c, d] the function’s graph is decreasing and concave down; the RΣR are negative and getting more negative (longer).
  • On [d, e] the function’s graph is decreasing and concave up; the RΣR are negative and getting less negative (shorter).
  • At the extreme values of the derivative, the concavity of the function changes from up to down or down to up. These are called points of inflection.

Questions in which students are asked about the properties of a function given the graph, but not the equation, of the derivative are very common. Many students (including me) find this approach easier and more intuitive than working strictly with derivative ideas.

Graphing with Accumulation 1

Accumulation 3: Graphing Ideas in Accumulation – Increasing and decreasing

Previously, we discussed how to determine features of the graph of a function from the graph of its derivative. This required knowing (memorizing) and understanding facts about the derivative (such as the derivative is negative) and how they related to the graph of the function (the function was decreasing). There is another method that I prefer. I find that using the accumulation idea it is easy to “see” what the function is doing.

Consider the graph of the derivative of a function and picture one Riemann sum rectangle (RΣR) as it moves from left to right across the graph. If the derivative is positive the RΣR will have a positive value and if the derivative is negative the RΣR will have a negative value. Each RΣR adds to or subtracts from the accumulated value that is represented by the function.

RSR 1

In the drawing above we see the graph of a derivative with a RΣR drawn at three places. At a the function has some initial value which may be 0. As the RΣR moves from a to c the RΣR have a positive value and each one adds a little to the function’s value. The function accumulates value and increases.

As the RΣR moves from c to e the value of the RΣR is negative and thus subtracts from the accumulating value, so the function decreases.

In the interval e to g the RΣR once again is positive so the accumulating value increases.

At c the RΣR changes from a positive value to a negative value, the function changes from increasing to decreasing: a local maximum. A similar thing happens at e, the RΣR changes from negative to positive, the function changes from decreasing to increasing: a local minimum.

To see and determine where the function is increasing and decreasing from the graph of its derivative, just picture the RΣR sliding left to right across the graph, each one adding to or subtracting from the accumulated value which is the function.

Often there are AP Calculus exam questions that show a derivative made up of segments or parts of circles. It is possible to find the area of the regions between the derivative and the x-axis. Starting on the extreme left side add or subtract the areas of the region to find the exact function values. If the left side value is not given (that is, some other place is the initial condition), treat the left-end value as a variable and add or subtract until you get to the initial value, and solve for the variable.

Next: Accumulation and concavity