# Section 8: More Tricks with Derivatives

## 8.3 Name That Function

Ever seen that TV game show where a piano player plays just a few notes of a tune and the MC then exhorts a contestant to "Name That Tune." They do give the contestant a few hints -- perhaps a brief description of the show the tune is from or when the tune was popular. But each contestant has to rely mostly on his or her personal store of musical knowledge.

Some calculus teachers will do the same to you. They will give you a little information about a function -- that it is a cubic, say -- and then play a few of its notes. And "notes" for a function will be values at some specified x's of what the function or its first or second derivatives are. Then for the grand prize of full credit, you will have to Name That Function.

It's not as hard as it sounds. The contestants on the TV show had their personal stores of musical knowledge. And you have your personal store of algebra and calculus knowledge to draw on. You will need to use only a small portion of it to solve one of these.

Also, you never are asked to solve for the whole function. They always ask you for just a few coefficients. Those few coefficients tell you what the whole function is. Here's an example:

Find A, B, and C if the function

```   f(x)  =  x3 + Ax2 + Bx + C                                      eq. 8.3-1
```
has an inflection point at x = -17/6, a critical point at x = 1/3, and a y intercept of 3.

Recall that a critical point or stationary point is a property of the first derivative of a function, namely it is an x where the first derivative is zero. Likewise an inflection point is a property of the second derivative of a function, namely it is an x where the second derivative is equal to zero. So it only makes sense that the first thing to do with this problem is to find the first and second derivatives of f(x).

```   f'(x)  =  3x2 + 2Ax + B                                        eq. 8.3-2a

f"(x)  =  6x + 2A                                              eq. 8.3-2b
```
The statement that there is a critical point at x = 1/3 is telling you to take equation 8.3-2a, replace the symbol, f'(x) with zero, and substitute 1/3 in for x:
```   0  =  3(1/9) + 2A(1/3) + B                                     eq. 8.3-3a
```
The statement that there is an inflection point at x = -17/6 is telling you to take equation 8.3-2b, replace the symbol, f"(x) with zero, and substitute -17/6 in for x:
```   0  =  6(-17/6) + 2A                                            eq. 8.3-3b
```
This last equation is a snap to solve for A. You should quickly be able to find that A = 17/2. Once you know A, simply plug it back into equation 8.3-3b:
```   0  =  3(1/9) + 17/3 + B  =  18/3 + B                           eq. 8.3-4
```
You should be able to solve that one quickly to find that B = -6.

So what about C? That's the easiest one. When the problem tells you that the y intercept is 3, it is telling you that f(0) = 3. So go back to equation 8.3-1 and substitute zero in for x and 3 in for f(x):

```   3  =  C
```

In the problem above we were able to find the coefficients one at a time. Sometimes that is not possible. In those cases you have to find them simultaneously. Here's an example:

Find A, B, and C if the function,

```   f(x)  =  x3 + Ax2 + Bx + C                                     eq. 8.3-5
```
if f(x) has critical points at x = -2/3 and at x = 5 and f(1) = 3/2.

Since the problem talks about critical points, and critical points are a property of the first derivative, clearly we need write the expression for f'(x)

```   f'(x)  =  3x2 + 2Ax + B                                        eq. 8.3-6
```

The first clue tells you of a critical point at x = -2/3. So at that x, you have f'(x) = 0. In equation 8.3-6 we replace f'(x) with zero and replace x with -2/3:

```   0  =  3(4/9) + 2A(-2/3) + B  =  4/3 - (4/3)A + B               eq. 8.3-7a
```
The second clue tells you of a critical point at x = 5. So you take equation 8.3-6 and replace f'(x) with zero again and replace x with 5.
```   0  =  3(25) + 2A(5) + B  =  75 + 10A + B                       eq. 8.3-7b
```
The last clue tells you to take
equation 8.3-5, replace f(x) with 3/2 and replace x with 1
```   3/2  =  1 + A + B + C                                          eq. 8.3-7c
```
You can solve for A and B simultaneously using methods you learned in algebra. The easiest is to subtract equation 8.3-7a from equation 8.3-7b (the B's will cancel). You find
```    0  =  225/3 + (30/3)A + B
- 0  =    4/3 - ( 4/3)A + B

0  =  221/3 + (34/3)A

A  =  -13/2
```
Now plug this value for A back into equation 8.3-7b
```   0  =  75 - 65 + B

B  =  -10
```
Finally plug the values for both A and B into equation 8.3-7c
```   3/2  =  1 - 13/2 - 10 + C

C  =  17
```

It's not just polynomials that you can play this game with. It works for lots of other kinds of functions as well:

Find A and k if the function

```   f(x)  =  Ax e-kx                                                eq. 8.3-8
```
has a critical point at x = 10, and at the critical point f(x) = 12.

Once again the problem asks about a critical point, so once again you must find the first derivative. Since f(x) is a product, you have to employ the product rule.

```   f'(x)  =  Ae-kx - Akx e-kx  =  A(1 - kx)e-kx                     eq. 8.3-9
```

The clue tells of a critical point at x = 10, so you take equation 8.3-9, put in zero for f'(x), and put in 10 for x:

```   0  =  A(1 - 10k)e-10k                                           eq. 8.3-10
```
When you divide Ae-10k out of equation 8.3-10, you find that k = 0.1.

Once you know what k is, it's easy to substitute it back into f(x) and determine A.

```   f(x)  =  Ax e-0.1x                                              eq. 8.3-11
```
The second clue says that at the critical point, which is at x = 10, you have f(x) = 12. Substituting those values for x and f(x):
```   12  =  10Ae-1  =  10A/e                                        eq. 8.3-12a

A  =  1.2e  =  3.261938194...                                  eq. 8.3-12b
```

What if you had to do the last problem again but this time, instead of the clue telling you about a critical point, it told you about an inflection point of the same function:

Find A and k if the function

```   f(x)  =  Ax e-kx                                               eq. 8.3-8
```
has an inflection point at x = 10 and the function is equal to 12 at the inflection point.

So now, instead of the first derivative, you have to examine the second derivative. You already know from equation 8.3-9 that

```   f'(x)  =  Ae-kx - Akx e-kx  =  A(1 - kx)e-kx                     eq. 8.3-9
```
You apply the product rule to A(1 - kx)e-kx and you should get the second derivative:
```   f"(x)  =  -Ake-kx - Ak(1 - kx)e-kx  =  A(k2x - 2k)e-kx           eq. 8.3-13
```
The clue tells of an inflection point at x = 10, so you substitue 10 in for x and zero in for f"(x).
```   0  =  A(10k2 - 2k)e-10k                                         eq. 8.3-14
```
When you divide out the Ae-10k, you have
```   0  =  10k2 - 2k                                                eq. 8.3-15a

0  =  10k - 2                                                  eq. 8.3-15b
```
So this time you get
k = 0.2. Note that k = 0 will work too, but it leads to an uninteresting function, since Ax e0x = Ax. That function is a straight line, whose second derivative is zero everywhere. Which is why we say that straight lines have no inflection points (their concavity is nonexistent everywhere so they can't go from concave up to concave down or vice versa). Hence the only meaningful solution is k = 0.2.

Again, solving for A is a piece of cake once you know k. The second clue says that at the inflection point the function is equal to 12. So take the original function, put in 0.2 for k, 10 for x, and 12 for f(x):

```   12  =  10Ae-2                                                  eq. 8.3-16a

A  =  1.2e2  =  8.866867319...                                 eq. 8.3-16b
```

### Exercises

These two problems might look, at first, to be completely different (and much harder) than the worked examples above, but they're not. Simply use the same steps of setting the function and its derivative to zero at the values named in the problem, and then solve for the coefficients.

1) Find l and w if the function,

```   f(t)  =  elt cos(wt)
```
has a zero crossing at  t = p/4  and has a critical point at  t = p/6. There is more than one solution to this problem, so pick the one that gives w its smallest possible positive value. You will need to use the

2) Find l and A if the function,

```   f(t)  =  elt (sin(t) + A cos(t))
```
has a zero crossing at  t = p/8  and a critical point at  t = p/12. Again you will need to use the
product rule to solve this problem. You will also need to use a scientific calculator to solve this one. Click here for solution.

Suppose they tell you it's a polynomial and just give you a handful of points that it must pass through. This does not require calculus to solve, just some algebra. So you can consider this problem to be optional material, but it is useful to be able to solve this type of problem. Here's a sample:

Find the cubic (3rd degree) polynomial, f(x), such that

```   f(1)   =   -1
f(-1)  =  -17
f(2)   =   19
f(-2)  =  -49

Table 8.3-1
```
One way to do this one is to say that
```   f(x)  =  Ax3 + Bx2 + Cx + D                                    eq. 8.3-17
```
Now you try to solve for A, B, C, and D. You do this by putting the numbers given in the problem into equation 8.3-17. We start by putting in  x = 1:
```   f(1)   =   -1  =  A + B + C + D                                eq. 8.3-18a
```
Now put in  x = -1:
```   f(-1)  =  -17  =  -A + B - C + D                               eq. 8.3-18b
```
Now you do the same with  x = 2  and  x = -2:
```   f(2)   =   19  =  8A + 4B + 2C + D                             eq. 8.3-18c

f(-2)  =  -49  =  -8A + 4B - 2C + D                            eq. 8.3-18d
```
You would then have to solve these four equations simultaneously for A, B, C, and D. You probably know how to do that, and you are probably also aware that it involves a bit of work in which mistakes are likely. Wouldn't it be nice if there were a way of finding the four coefficients without having to solve four equations in four unknowns.

Well there is a way. Table 8.3-1 shows that we are considering x's at 1, -1, 2, and -2. So you form the following expression:

```   (x - 1)(x + 1)(x - 2)(x + 2)                                   eq. 8.3-19
```
Each factor is x minus one of the x values listed in the problem. Observe that at each of the x values listed in the problem, this expression evaluates to zero. At first this doesn't seem very useful. But now think about what happens if you drop just one factor from it.
```   (x + 1)(x - 2)(x + 2)                                          eq. 8.3-20a
```
This expression is zero at  x = -1, at  x = 2, and at  x = -2, but it is nonzero at  x = 1. Likewise
```   (x - 1)(x - 2)(x + 2)                                          eq. 8.3-20b
```
is zero at  x = 1, at  x = 2, and at  x = -2  and nonzero at  x = -1. And you can see what happens with the other two possible products of three terms:
```   (x + 1)(x - 1)(x + 2)                                          eq. 8.3-20c

(x + 1)(x - 1)(x - 2)                                          eq. 8.3-20d
```
Each of those four expressions is a 3rd degree polynomial. If you multiply them out you get
```   P1(x)  =  (x + 1)(x - 2)(x + 2)  =  x3 + x2 - 4x - 4           eq. 8.3-21a

P2(x)  =  (x - 1)(x - 2)(x + 2)  =  x3 - x2 - 4x + 4           eq. 8.3-21b

P3(x)  =  (x + 1)(x - 1)(x + 2)  =  x3 + 2x2 - x - 2           eq. 8.3-21c

P4(x)  =  (x + 1)(x - 1)(x - 2)  =  x3 - 2x2 - x + 2           eq. 8.3-21d
```
Suppose that you imagine f(x) to be a weighted sum of those four polynomials.
```   f(x)  =  kP1(x) + lP2(x) + mP3(x) + nP4(x)                     eq. 8.3-22
```
If you solve for k, l, m, and n, you will be able easily to find A, B, C, and D.

Here you can solve for each of k, l, m, and n individually. You already know that at  x = 1,

```   P2(1) = P3(1) = P4(1) = 0
```
Only P1(1) is nonzero. Since you already have from
table 8.3-1 that  f(1) = -1, equation 8.3-22 becomes:
```   f(1)  =  kP1(1)  =  -1                                         eq. 8.3-23a
```
You can easily find that  P1(1) = -6. So, solving eq. 8.3-23a for k, you have
```        1      2
k  =     =
6     12
```

By using the other x values in table 8.3-1 and precisely the same reasoning you also have

```   P1(-1) = P3(-1) = P4(-1) = 0

P1(2) = P2(2) = P4(2) = 0

P1(-2) = P2(-2) = P3(-2) = 0
```
You find that  P2(-1) = 6,  P3(2) = 12, and  P4(-2) = -12. So you can solve:
```   f(-1)  =  lP2(-1)  =  -17                                      eq. 8.3-23b

f(2)  =  mP3(2)  =  19                                         eq. 8.3-23c

f(-2)  =  nP4(-2)  =  -49                                      eq. 8.3-23d
```
From those equations you can find that
```           17       34
l  =  -     =  -
6       12

19
m  =
12

49
n  =
12
```
Now to find the coefficients of the polynomial for f(x), we just add up the weighted sums according to equation 8.3-22.
```   f(x)  =  (2/12)P1(x) + (-34/12)P2(x) + (19/12)P3(x) + (49/12)P4(x)  =

(2/12)  (   x3  +   x2  -   4x  -   4)  +
(-34/12)(   x3  -   x2  -   4x  -   4)  +
(19/12) (   x3  +  2x2  -    x  -   2)  +
(49/12) (   x3  -  2x2  -    x  +   2)  =

(1/12)  (  2x3  +  2x2  -   8x  -   8)  +
(1/12)  (-34x3  + 34x2  + 136x  - 136)  +
(1/12)  ( 19x3  + 38x2  -  19x  -  38)  +
(1/12)  ( 49x3  - 98x2  -  49x  +  98)  =

(1/12)  ( 36x3  - 24x2  +  60x  -  84)  =

3x3  -   2x2  +   5x  -   7                          eq. 8.3-24
```
If you plug all the x's from the original problem into that bottom-line polynomial, you will find that it indeed passes through all the points asked for.

One final note. If you have an nth degree polynomial, it can be made to pass exactly through only n+1 specified points. In this problem we had 4 points, so the polynomial had to be a minimum of 3rd degree, that is a cubic. A polynomial that is made to pass exactly through 3 points would have to be a quadratic, and one and only one quadratic will pass through any 3 given points. A polynomial that is made to pass through exactly 2 points, well you already knew that it had to be a straight line, which is a first degree polynomial.