Application of Differentiation

DinS          Written on 2018/4/24

Several typical application of differentiation

1. Powerful derivative – linear approximation

Idea: study complicated curved lines by zooming in and imagining they are straight lines.

In real world problems functions can be quite complicated. We have the motivation to make things simpler. Linear approximation will play the role here.

This formula is deducted directly from the definition of derivative.

If we ignore the lim notation and multiply h on both sides we get f(x+h) – f(x) = f’(x)*h.

That’s f(x+h) = f(x) + f’(x)*h. This equation is true only if h = 0. Now that h->0, we can write it as

f(x+h) ≈ f(x) + f’(x)*h, provided h is small enough.

How can we make use of the formula? The answer is repeated linear approximation.

Given f(x) = f’(x), and f(0) = 1, f(1) = ?

In fact f(x) = ex, but we can solve it with linear approximation only.

f(1) ≈ f(0) + 1 * f’(0) = 2. Bad!

That’s better. If we repeat 10 times we can have 2.5937424601, pretty close.

This method is called Euler Method.

2. Powerful derivative – extreme values

The most common usage of derivative is to find the extreme values.

Question: given a function f(x) and certain domain [a, b], find the local minimum and local maximum.

This question is asked in every field. Thus it is important to have a general solution. Derivative can help. The key is the sign of derivative. Conclusion: if f’(x) > 0, f(x) is increasing. If f’(x) < 0, f(x) is decreasing. This seems pretty clear because f’(x) is the slope. However, we can prove it.

By linear approximation we have f(x+h) ≈ f(x) + h*f’(x).

If f’(x) > 0 and h > 0, we have h*f’(x) > 0.

If we add both sides by f(x), we have f(x) + h*f’(x) > f(x), i.e. f(x+h) > f(x)

When h < 0 this stands the same.

So we can say that if f’(x) > 0, f(x) is increasing.

By the same way we can prove that If f’(x) < 0, f(x) is decreasing.

Now think about what will happen if f’(x) = 0. That point must be either top of hill or bottom of valley. That is what we’re looking for.

Fermat’s theorem: if f is differentiable at c, and f’(c) = 0, then f(c) is extreme value. If either f’(c) does not exist or f’(c) = 0, call c a critical point of f.

 

Back to the original question, here is the extreme value algorithm.

First differentiate the function.

Second list critical points and end points.

Third check those critical points.

Fourth check limiting behavior for open interval.

Let’s try something hard this time. Given a function f(x) = x – |x2 – 2x|on [0, 3], what’s the local minimum and local maximum?

First step: differentiate the function. Well, how to differentiate an absolute function? We have to get rid of the ||, which means we need to separate different cases.

Notice that there’s no x2 -2x = 0 in the domain of f’(x). It’s not differentiable there.

Let f’(x) = 0, and we get x = 0.5 and x = 1.5 for both functions.

As a result, there are four critical points: 0, 0.5, 1.5, 3. Check each.

F(0) = 0.

F(0.5) = -0.25.

F(1.5) = 0.75

F(3) = 0.

And don’t forget to check f(2), because that point is not differentiable.

F(2) = 2.

In conclusion, f(0.5) is local minimum and f(2) is local maximum.

3. Powerful derivative – optimization

This is often used in real world problems. It’s based on extreme value techniques. Normally the steps should be this:

First draw a picture according to the problem.

Second determine the goal.

Third find constraints.

Fourth solve for one variable.

Fifth apply calculus.

 

Let’s see an example. You have 52m fence and want to build a sheep yard next to a barn. What’s the best plan to make the yard largest?

Draw a picture first.

Then decide the goal: to make the area of the yard largest. In math we have S = xy. Make S biggest.

Then about constraints. We have 2x + y = 52.

Now solve for single variable. We have S = x * (52 – 2x) = -2x2 + 52x.

Finally apply calculus. S’ = -4x + 52. Let S’ = 0 and we get x = 13. Don’t forget to check end points when x = 0 and 26. This is an application of extreme value algorithm.

Conclusion: when x = 13, y = 26, S = 338. Max area covered!