# Applications of Derivatives

Computer Science I · Calculus · https://tryals.app/learn/computer-science-i/applications-of-derivatives

## Finding the Best

One of the most useful things derivatives do is **optimisation**: finding where a quantity is largest or smallest. Because the tangent is horizontal at a peak or a valley, the derivative is **zero** at these interior extreme points.

To find these, we locate **critical points**: values where $f'(x) = 0$ or where the derivative does not exist. On a closed interval, you must also check the **endpoints**, since the extreme value can occur there even when the derivative is not zero.

| Test Type | Condition | Conclusion |
| --- | --- | --- |
| **First Derivative** | $f'$ changes $+$ to $-$ | **Local maximum** |
| **First Derivative** | $f'$ changes $-$ to $+$ | **Local minimum** |
| **Second Derivative** | $f'' > 0$ ($f''$ measures concavity) | **Concave up** (minimum) |
| **Second Derivative** | $f'' < 0$ | **Concave down** (maximum) |

## Tests & Real-World Use

A zero derivative only marks a **critical point**, not automatically a peak or valley. For instance, $x^3$ at $0$ has $f'(x)=0$ but is an **inflection point** (where $f''$ changes sign), which is neither a maximum nor a minimum.

| Common Pitfall | The Reality |
| --- | --- |
| **Assuming $f'=0$ means max/min** | It could be an **inflection point**; you must classify it. |
| **Ignoring endpoints** | On closed intervals, extremes often sit at the edges where $f' \neq 0$. |

This mathematics drives real-world computing: training a machine-learning model **minimises** a loss function, and resource allocation **maximises** utility. Gradient descent follows the derivative downhill to find that minimum.

## Practice questions

6 of this lesson's 11 practice questions, with answers. The full set is in the app.

### 1. Select every statement that is TRUE of the second derivative.

A. A sign change in it marks an inflection point
B. Where it is positive the curve is concave up
C. It is zero wherever the function is zero
D. It measures how the slope itself is changing
E. A negative value at a critical point signals a local maximum

**Answer:** A. A sign change in it marks an inflection point; B. Where it is positive the curve is concave up; D. It measures how the slope itself is changing; E. A negative value at a critical point signals a local maximum

**Why:** The second derivative is the rate of change of the slope, and its sign gives concavity, hence the classification test and the location of inflection points. It has no relationship at all to where f itself is zero, a curve can cross the axis with any curvature you like.

Page: https://tryals.app/practice/computer-science-i/applications-of-derivatives/select-every-statement-that-is-true-of-the-second-derivative

### 2. Complete the definition of an inflection point.

**Answer:** An inflection point is a point where **the second derivative changes sign**.

**Why:** An inflection point is where the concavity flips, which is exactly a sign change in f''. The first derivative may or may not be zero there, for x^3 it is, but for many curves an inflection occurs on a perfectly steep stretch.

Page: https://tryals.app/practice/computer-science-i/applications-of-derivatives/complete-the-definition-of-an-inflection-point

### 3. Each item reports how the sign of f' behaves as x passes through a critical point. Sort them.

**Answer:**

- Local maximum: f' goes from positive to negative
- Local minimum: f' goes from negative to positive
- Neither: f' is positive on both sides, f' is negative on both sides

**Why:** Rising then falling gives a peak; falling then rising gives a valley. If the sign never changes the function simply pauses and continues in the same direction, that is an inflection with a horizontal tangent, and it is neither a maximum nor a minimum.

Page: https://tryals.app/practice/computer-science-i/applications-of-derivatives/each-item-reports-how-the-sign-of-f-behaves-as-x-passes-through-a

### 4. A point where $f'(x) = 0$ is always a maximum or a minimum.

**Answer:** False

**Why:** False. $f(x) = x^{3}$ has $f'(0) = 0$ yet is increasing on both sides, an inflection, neither max nor min. The first derivative locates candidates; deciding which requires the sign change around the point, or the second derivative, and $f''= 0$ leaves even that test inconclusive.

Page: https://tryals.app/practice/computer-science-i/applications-of-derivatives/a-point-where-f-x-0-is-always-a-maximum-or-a-minimum

### 5. Order the steps of finding the extreme values of a function on a closed interval.

**Answer:**

1. Differentiate the function
2. Solve f'(x) = 0 to locate the critical points
3. Add the two endpoints of the interval to the list of candidates
4. Evaluate the function at every candidate point
5. Compare the values and pick the largest and the smallest

**Why:** Differentiate, solve, add the endpoints, evaluate, compare. Comparing before the endpoints are on the list is exactly the error that hides an extreme value sitting at a boundary.

Page: https://tryals.app/practice/computer-science-i/applications-of-derivatives/order-the-steps-of-finding-the-extreme-values-of-a-function-on-a

### 6. A physics engine integrating with a smaller timestep is more accurate and eventually gets worse below a certain step size. Why does refinement stop helping?

A. Because very small timesteps cannot be represented in floating point
B. Because the simulation becomes too slow to complete, which counts as error
C. Because truncation error stops decreasing below a threshold
D. Because truncation error falls with the step while round-off grows

**Answer:** D. Because truncation error falls with the step while round-off grows

**Why:** Two errors move oppositely, so their sum has a minimum, and pushing past it makes the answer worse while costing more. 'More refinement is better' holds only until the arithmetic becomes the limiting factor, which is one of the least intuitive facts in numerical work.

Page: https://tryals.app/practice/computer-science-i/applications-of-derivatives/a-physics-engine-integrating-with-a-smaller-timestep-is-more-accurate
