Good Question 9

This is a good question that leads to other good questions, both mathematical and philosophical. A few days ago this question was posted on a private Facebook page for AP Calculus Readers. The problem and illustration were photographed from an un-cited textbook.

Player 1 runs to first base [from home plate] at a speed of 20 ft/s while player 2 runs from second base to third base a speed of 15 ft/s. Let s be the distance between the two players. How fast is s changing when player 1 is 30 feet from home plate and Player 2 is 60 feet from second base. [A figure was given showing that the distance between the bases is 90 feet.]

baserunners 2-8-16

Some commenters indicated some possible inconsistencies in the question, such as assuming the Player 2 is on second base when Player 1 leaves home plate. In this case the numbers don’t make sense. So, someone suggested this must be a hit-and-run situation. To which someone else replied that with a lead of that much it’s really a stolen base situation. So, the first thing to be learned here is that even writing a simple problem like this you need to take some of the real aspects into consideration. But this doesn’t change the mathematical aspects of the problem.

One of the things I noticed before I attempted to work out the solution was that Player 2 is the same distance from third base as Player 1 is from home plate. I verbalized this as “players are directly across the field from each other.” I filed this away since it didn’t seem to matter much. Wrong!

Then I worked on the problem two ways. These are shown in the appendix at the end of this post. I discovered (twice) that s’ = 0; at the moment suggested in the question the distance is not changing.

Then it hit me. Doh! – I didn’t have to do all that. So, I posted this solution (which I now notice someone beat me to):

At the time described, the players are directly across the field from each other (90 feet apart). This is the closest they come. The distance between them has been decreasing and now starts to increase. So, at this instant s is not changing (s‘ = 0).

The Philosophical Question

Then the original poster asked for someone “to post [actual] work done in calculus” and “to see some related rates.” So, I posted some “calculus” and got to thinking – the philosophical question – isn’t my first answer calculus?

I think it is. It makes use of an important calculus concept, namely that as things change, at the minimum place, the derivative is zero. Furthermore, the justification (that the distance changes from decreasing to increasing at the minimum implies the derivative is zero) is included. * Why do you need variables?

Also, this solution is approached as an extreme value (max/min) problem rather than a related rate problem. This shows a nice connection between the two types of problems.

The Related (but not related rate) Good Question

So here is another calculus question with none of the numbers we’ve grown to expect:

Two cars travel on parallel roads. The roads are w feet apart. At what rate does the distance between the cars change when the cars are w feet apart?

Notice:

  • That the cars could be travelling in the same or opposite directions.
  • Their speeds are not given.
  • You don’t know when or where they started; only that at some time they are opposite each other (w feet apart).
  • In fact, they could start opposite each other and travel in the same direction at the same speed, remaining always w feet apart.
  • One car could be standing still and the other just passes it.

But you can still answer the question.

(*Continuity and differentiability are given (or at least implied) in the original statement of the problem.)

 Appendix

My first attempt was to set up a coordinate system with the origin at third base as shown below.

Blog 2-8-16

Then, taking the time indicated in the problem as t = 0, the position of Player 1 is (90, 30 + 20t) and the position of player 2 is (0, 30 – 15t). Then the distance between them is

s=\sqrt{{{90}^{2}}+{{\left( 30-15t-\left( 30+20t \right) \right)}^{2}}}=\sqrt{{{90}^{2}}+{{\left( -35t \right)}^{2}}}

and then

\displaystyle {s}'\left( t \right)=\frac{2\left( -35t \right)\left( -35 \right)}{2s}\text{ and }{s}'\left( 0 \right)=0

This is correct, but for some reason I was suspicious probably because zeros can hide things. So I re-stated this time taking t = 0 to be one second before the situation described in the problem. Now player 1’s position is (90, 10+20t) and player 2’s position is (0, 45-15t).

s\left( t \right)=\sqrt{{{90}^{2}}+{{\left( 45-15t-\left( 10+20t \right) \right)}^{2}}}=\sqrt{{{90}^{2}}+{{\left( 30-35t \right)}^{2}}}

\displaystyle {s}'\left( t \right)=\frac{2\left( 35-35t \right)\left( -35 \right)}{2s}\text{ and }{s}'\left( 1 \right)=0

.

____________________________________________

The Lagrange Highway

Recently, there was an interesting discussion on the AP Calculus Community discussion boards about the Lagrange error bound. You may link to it by clicking here. The replies by James L. Hartman and Daniel J. Teague were particularly enlightening and included files that you may download with the proof of Taylor’s Theorem (Hartman) and its geometric interpretation (Teague).

There are also two good Kahn Academy videos on Taylor’s theorem and the error bound on YouTube. The first part is here (11:26 minutes) and the second part is here (15:08 minutes).

I wrotean earlier blog post on the topic of error bounds on February 22, 2013, that you can find here.

Taylor’s Theorem says that

If f is a function with derivatives through order n + 1 on an interval I containing a, then, for each x in I , there exists a number c between x and a such that

\displaystyle f\left( x \right)=\sum\limits_{k=1}^{n}{\frac{{{f}^{\left( k \right)}}\left( a \right)}{k!}{{\left( x-a \right)}^{k}}}+\frac{{{f}^{\left( n+1 \right)}}\left( c \right)}{\left( n+1 \right)!}{{\left( x-a \right)}^{n+1}}

The number \displaystyle R=\frac{{{f}^{\left( n+1 \right)}}\left( c \right)}{\left( n+1 \right)!}{{\left( x-a \right)}^{n+1}} is called the remainder.

The equation above says that if you can find the correct c the function is exactly equal to Tn(x) + R.

Tn(x) is called the n th  Taylor Approximating Polynomial. (TAP). Notice the form of the remainder is the same as the other terms, except it is evaluated at the mysterious c that we don’t know and usually are not able to find without knowing the value we are trying to approximate.

Lagrange Error Bound. (LEB)

\displaystyle \left| \frac{{{f}^{\left( n+1 \right)}}\left( c \right)}{\left( n+1 \right)!}{{\left( x-a \right)}^{n-1}} \right|\le \left( \text{max}\left| {{f}^{\left( n+1 \right)}}\left( x \right) \right| \right)\frac{{{\left| x-a \right|}^{n+1}}}{\left( n+1 \right)!}

The number \displaystyle \left( \text{max}\left| {{f}^{\left( n+1 \right)}}\left( x \right) \right| \right)\frac{{{\left| x-c \right|}^{n+1}}}{\left( n+1 \right)!}\ge \left| R \right| is called the Lagrange Error Bound. The expression \left( \text{max}\left| {{f}^{\left( n+1 \right)}}\left( x \right) \right| \right) means the maximum absolute value of the (n + 1) derivative on the interval between the value of x and c.

The LEB is then a positive number greater than the error in using the TAP to approximate the function f(x). In symbols \left| {{T}_{n}}\left( x \right)-f\left( x \right) \right|<LEB.

Here is a little story that I hope will help your students understand what all this means.

Building A Road

Suppose you were tasked with building a road through the interval of convergence of a Taylor Series that the function could safely travel on. Here is how you could go about it.

Build the road so that the graph of the TAP is its center line. The edges of the road are built LEB units above and below the center line. (The width of the road is about twice the LEB.) Now when the function comes through the interval of convergence it will travel safely on the road. I will not necessarily go down the center but will not go over the edges. It may wander back and forth over the center line but will always stay on the road. Thus, you know where the function is; it is less than LEB units (vertically) from the center line, the TAP.

Building a Wider Road

As shown in the example at the end of my previous post, it is often necessary to use a number larger than the minimum we could get away with for the LEB. This is because the maximum value of the derivative may be difficult to find. This amounts to building a road that is wider than necessary. The function will still remain within LEB units of the center line but will not come as close to the edges of our wider road as it may on the original road.  As long as the width of the wider road is less than the accuracy we need, this will not be a problem: the TAP will give an accurate enough approximation of the function.

Amortization

This is an example of how sequences and series are used in “real life.”  It could be used in a calculus class or an advanced math class.

When you borrow money to buy a house or a car you are making a kind of loan called a mortgage. Paying off the loan is called amortizing the loan.amortization

The amount you borrow is called the principal. You agree to pay a fixed payment at regular intervals, usually monthly. The payment includes interest on the amount owed during the previous month plus a bit more to decrease the principal. Each month your payment decreases the remaining principal, so in the next month a little less goes to interest and a little more goes to paying off the principal. Let’s say you borrow A dollars (the principal) and agree to pay a monthly interest rate of r%, for a period of n months.

How much is the fixed (constant) monthly payment, P, so that after n months the loan and interest will be paid off?

After one month you make a payment and you now owe {{A}_{1}} = the original amount plus the interest on this amount minus the payment, P.

{{A}_{1}}=A+Ar-P=A\left( 1+r \right)-P

After the second payment is made you owe {{A}_{2}} =  {{A}_{1}}, plus the interest {{A}_{1}r}, minus the payment, P.

{{A}_{2}}=\left( A\left( 1+r \right)-P \right)+\left( A\left( 1+r \right)-P \right)r-P=A{{\left( 1+r \right)}^{2}}-P\left( 1+r \right)-P

And likewise after the third month:

{{A}_{3}}=\left( A{{\left( 1+r \right)}^{2}}-P\left( 1+r \right)-P \right)+\left( A{{\left( 1+r \right)}^{2}}-P\left( 1+r \right)-P \right)r-P

{{A}_{3}}=A{{\left( 1+r \right)}^{3}}-P{{\left( 1+r \right)}^{2}}-P\left( 1+r \right)-P

And after the fourth month a pattern emerges:

{{A}_{4}}=A{{\left( 1+r \right)}^{4}}-P{{\left( 1+r \right)}^{3}}-P{{\left( 1+r \right)}^{2}}-P\left( 1+r \right)-P

{{A}_{4}}=A{{\left( 1+r \right)}^{4}}-P\sum\limits_{k=0}^{3}{{{\left( 1+r \right)}^{k}}}

And so on so that after n months the amount you owe is:

{{A}_{n}}=A{{\left( 1+r \right)}^{n}}-P\sum\limits_{k=0}^{n-1}{{{\left( 1+r \right)}^{k}}}

The sigma expression represents a finite geometric series. The sum of such a series with a first term of 1 and a common ratio of R sum is given by

\displaystyle {{S}_{n}}=\frac{1-{{R}^{n}}}{1-R}.

Therefore

\displaystyle {{A}_{n}}=A{{\left( 1+r \right)}^{n}}-P\left( \frac{1-{{\left( 1+r \right)}^{n}}}{1-\left( 1+r \right)} \right)=A{{\left( 1+r \right)}^{n}}-P\left( \frac{{{\left( 1+r \right)}^{n}}-1}{r} \right)

But after n months you have paid off the loan and you owe An = 0

\displaystyle 0=A{{\left( 1+r \right)}^{n}}-P\left( \frac{{{\left( 1+r \right)}^{n}}-1}{r} \right)

This equation may be solved for P the monthly payment:

\displaystyle P=\frac{Ar{{\left( 1+r \right)}^{n}}}{{{\left( 1+r \right)}^{n}}-1}.

The equation above is a formula for finding the payment on a mortgage. For example, to borrow $25,000 for a car at 3% per year (r = 0.0025 per month) for 5 years (n = 60) the monthly payment is

\displaystyle \frac{25,000\left( 0.0025 \right){{\left( 1+0.0025 \right)}^{60}}}{{{\left( 1+0.0025 \right)}^{60}}-1}=\$449.22.

Of course, in “real life” someone looks up the amount on the internet and we all believe them. But now you can do it yourself and have some math fun at the same time.

Parametric and Vector Equations

AP Type Questions 8

Particle moving on a plane for BC – the parametric/vector question.

I have always had the impression that the AP exam assumed that parametric equations and vectors were first studied and developed in a pre-calculus course. In fact many schools do just that. It would be nice if students knew all about these topics when they started BC calculus. Because of time considerations, this very rich topic probably cannot be fully developed in BC calculus. I will try to address here the minimum that students need to know to be successful on the BC exam. Certainly if you can do more and include a unit in a pre-calculus course do so.

Another concern is that most textbooks jump right to vectors in 3-space while the exam only test motion in a plane and 2-dimensional vectors.

In the plane, the position of a moving object as a function of time, t, can be specified by a pair of parametric equations x=x\left( t \right)\text{ and }y=y\left( t \right) or the equivalent vector \left\langle x\left( t \right),y\left( t \right) \right\rangle . The path is the curve traced by the parametric equations.

The velocity of the movement in the x- and y-direction is given by the vector \left\langle {x}'\left( t \right),{y}'\left( t \right) \right\rangle . The vector sum of the components gives the direction of motion. Attached to the tip of the position vector this vector is tangent to the path pointing in the direction of motion. The length of this vector is the speed of the moving object. \text{Speed }=\sqrt{{{\left( {x}'\left( t \right) \right)}^{2}}+{{\left( {y}'\left( t \right) \right)}^{2}}}

The acceleration is given by the vector \left\langle {{x}'}'\left( t \right),{{y}'}'\left( t \right) \right\rangle .

What students should know how to do

  • Vectors may be written using parentheses, ( ), or pointed brackets, \left\langle {} \right\rangle , or even \vec{i},\vec{j} form. The pointed brackets seem to be the most popular right now, but any notation is allowed.
  • Find the speed at time t\text{Speed }=\sqrt{{{\left( {x}'\left( t \right) \right)}^{2}}+{{\left( {y}'\left( t \right) \right)}^{2}}}
  • Use the definite integral for arc length to find the distance traveled \displaystyle \int_{a}^{b}{\sqrt{{{\left( {x}'\left( t \right) \right)}^{2}}+{{\left( {y}'\left( t \right) \right)}^{2}}}}dt. Notice that this is the integral of the speed (rate times time = distance).
  • The slope of the path is \displaystyle \frac{dy}{dx}=\frac{{y}'\left( t \right)}{{x}'\left( t \right)}.
  • Determine when the particle is moving left or right,
  • Determine when the particle is moving up or down,
  • Find the extreme position (farthest left, right, up or down).
  • Given the position find the velocity by differentiating; given the velocity find the acceleration by differentiating.
  • Given the acceleration and the velocity at some point find the velocity by integrating; given the velocity and the position at some point find the position by integrating. These are really just initial value differential equation problems (IVP).
  • Dot product and cross product are not tested on  the BC exam.

Shorter questions on these ideas appear in the multiple-choice sections. As always, look over as many questions of this kind from past exams as you can find.

Error Bounds

How Good is Your Approximation?

Whenever you approximate something, you should be concerned about how good your approximation is. The error, E, of any approximation is defined to be the absolute value of the difference between the actual value and the approximation. If Tn(x) is the Taylor/Maclaurin approximation of degree n for a function f(x) then the error is E=\left| f\left( x \right)-{{T}_{n}}\left( x \right) \right|.  This post will discuss the two most common ways of getting a handle on the size of the error: the Alternating Series error bound, and the Lagrange error bound.

Both methods give you a number B that will assure you that the approximation of the function at x={{x}_{0}} in the interval of convergence is within B units of the exact value. That is,

\left( f\left( {{x}_{0}} \right)-B \right)<{{T}_{n}}\left( {{x}_{0}} \right)<\left( f\left( {{x}_{0}} \right)+B \right)

or

{{T}_{n}}\left( {{x}_{0}} \right)\in \left( f\left( {{x}_{0}} \right)-B,\ f\left( {{x}_{0}} \right)+B \right).

Stop for a moment and consider what that means: f\left( {{x}_{0}} \right)-B and f\left( {{x}_{0}} \right)+B   are the endpoints of an interval around the actual value and the approximation will lie in this interval. Ideally, B is a small (positive) number.

Alternating Series

If a series \sum\limits_{n=1}^{\infty }{{{a}_{n}}} alternates signs, decreases in absolute value and \underset{n\to \infty }{\mathop{\lim }}\,\left| {{a}_{n}} \right|=0 then the series will converge. The terms of the partial sums of the series will jump back and forth around the value to which the series converges. That is, if one partial sum is larger than the value, the next will be smaller, and the next larger, etc. The error is the difference between any partial sum and the limiting value, but by adding an additional term the next partial sum will go past the actual value. Thus, for a series that meets the conditions of the alternating series test the error is less than the absolute value of the first omitted term:

\displaystyle E=\left| \sum\limits_{k=1}^{\infty }{{{a}_{k}}}-\sum\limits_{k=1}^{n}{{{a}_{k}}} \right|<\left| {{a}_{n+1}} \right|.

Example: \sin (0.2)\approx (0.2)-\frac{{{(0.2)}^{3}}}{3!}=0.1986666667 The absolute value of the first omitted term is \left| \frac{{{(0.2)}^{5}}}{5!} \right|=0.26666\bar{6}\times {{10}^{-6}}. So our estimate should be between \sin (0.2)\pm 0.266666\times {{10}^{-6}} (that is, between 0.1986666641 and 0.1986719975), which it is. Of course, working with more complicated series, we usually do not know what the actual value is (or we wouldn’t be approximating). So an error bound like 0.26666\bar{6}\times {{10}^{-6}} assures us that our estimate is correct to at least 5 decimal places.

The Lagrange Error Bound

Taylor’s Theorem: If f is a function with derivatives through order n + 1 on an interval I containing a, then, for each x in I , there exists a number c between x and a such that

\displaystyle f\left( x \right)=\sum\limits_{k=1}^{n}{\frac{{{f}^{\left( k \right)}}\left( a \right)}{k!}{{\left( x-a \right)}^{k}}}+\frac{{{f}^{\left( n+1 \right)}}\left( c \right)}{\left( n+1 \right)!}{{\left( x-a \right)}^{n+1}}

The number \displaystyle R=\frac{{{f}^{\left( n+1 \right)}}\left( c \right)}{\left( n+1 \right)!}{{\left( x-a \right)}^{n+1}} is called the remainder.

The equation above says that if you can find the correct c the function is exactly equal to Tn(x) + R. Notice the form of the remainder is the same as the other terms, except it is evaluated at the mysterious c. The trouble is we almost never can find the c without knowing the exact value of f(x), but; if we knew that, there would be no need to approximate. However, often without knowing the exact values of c, we can still approximate the value of the remainder and thereby, know how close the polynomial Tn(x) approximates the value of f(x) for values in x in the interval, i.

Corollary – Lagrange Error Bound. 

\displaystyle \left| \frac{{{f}^{\left( n+1 \right)}}\left( c \right)}{\left( n+1 \right)!}{{\left( x-a \right)}^{n+1}} \right|\le \left( \text{max}\left| {{f}^{\left( n+1 \right)}}\left( x \right) \right| \right)\frac{{{\left| x-a \right|}^{n+1}}}{\left( n+1 \right)!}

The number \displaystyle \left( \text{max}\left| {{f}^{\left( n+1 \right)}}\left( x \right) \right| \right)\frac{{{\left| x-c \right|}^{n+1}}}{\left( n+1 \right)!}\ge \left| R \right| is called the Lagrange Error Bound. The expression \left( \text{max}\left| {{f}^{\left( n+1 \right)}}\left( x \right) \right| \right) means the maximum absolute value of the (n + 1) derivative on the interval between the value of x and c. The corollary says that this number is larger than the amount we need to add (or subtract) from our estimate to make it exact. This is the bound on the error. It requires us to, in effect, substitute the maximum value of the n + 1 derivative on the interval from a to x for {{f}^{(n+1)}}\left( x \right). This will give us a number equal to or larger than the remainder and hence a bound on the error.

Example: Using the same example sin(0.2) with 2 terms. The fifth derivative of \sin (x) is -\cos (x) so the Lagrange error bound is \displaystyle \left| -\cos (0.2) \right|\frac{\left| {{\left( 0.2-0 \right)}^{5}} \right|}{5!}, but if we know the cos(0.2) there are a lot easier ways to find the sine. This is a common problem, so we will pretend we don’t know cos(0.2), but whatever it is its absolute value is no more than 1. So the number \left( 1 \right)\frac{\left| {{\left( 0.2-0 \right)}^{5}} \right|}{5!}=2.6666\bar{6}\times {{10}^{-6}} will be larger than the Lagrange error bound, and our estimate will be correct to at least 5 decimal places.

This “trick” is fairly common. If we cannot find the number we need, we can use a value that gives us a larger number and still get a good handle on the error in our approximation.

FYI: \displaystyle \left| -\cos (0.2) \right|\frac{\left| {{\left( 0.2-0 \right)}^{5}} \right|}{5!}\approx 2.61351\times {{10}^{-6}}

Corrected: February 3, 2015, June 17, 2022

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.