# Visual Calculus for Programmers
Canonical public overview for programmer-friendly calculus.
## One picture
A function is an input-output machine.
```text
x → f(x) → y
```
Calculus studies how the output changes when the input changes.
## Slope
```text
slope = change_in_output / change_in_input
```
In code language:
```python
slope = delta_y / delta_x
```
## Derivative
A derivative is the slope when `delta_x` becomes tiny.
```python
def approximate_derivative(f, x):
dx = 0.0001
return (f(x + dx) - f(x)) / dx
```
## Integral
An integral adds many tiny pieces.
```python
total += height * width
```
## Optimization
Optimization asks: where is the best value?
At many maxima and minima, the slope becomes zero.
Source task: `ad7a5950-4f18-40ef-bb4e-a699169c053d`