Maxima’s ‘*solve_rec*‘ solves difference equation:

Fig. 1 Geometric Sequence

It solves initial-value problem as well:

Fig. 2 Fibonacci Sequence

Mathematica has ‘*RSolve*‘:

and ‘*RSolveValue*‘:

See also “Pandora’s Box“.

Maxima’s ‘*solve_rec*‘ solves difference equation:

Fig. 1 Geometric Sequence

It solves initial-value problem as well:

Fig. 2 Fibonacci Sequence

Mathematica has ‘*RSolve*‘:

and ‘*RSolveValue*‘:

See also “Pandora’s Box“.

*Question*:

When a forrest fire occurs, how many fire fighter should be sent to fight the fire so that the total cost is kept minimum?

*Answer*:

Suppose the fire starts at ; at , the fire fighter arrives; the fire is extinguished later at .

Let and denotes the monetary damage per square footage burnt, the hourly wage per fire fighter, the one time cost per fire fighter and the number of fire fighters sent respectively. The total cost consists damage caused by the fire, the wage paid to the fire fighters and the one time cost of the fire fighters:

(total square footage burnt)

Notice , the duration of fire fighting.

Assume the fire ignites at a single point and quickly spreads in all directions with flame velocity , the growing square footage of engulfed circular area is a function of time. Namely,

Its burning rate

However, after the arrival of fire fighters, is reduced by , an amount that is directly proportional to the number of fire fighters on the scene. The reduction of reflects the fire fighting efforts exerted by the crew. As a result, for declines along the line described by

where . Or equivalently,

Moreover, the fire is extinguished at suggests that

i.e.,

Combine (1) and (3),

It is further assumed that

is continuous at

We illustrate in Fig. 1.

Fig. 1

The fact that is continuous at means

That is,

The area of triangle in Fig. 1 represents , the total square footage damaged by the fire. i.e.,

Consequently, the total cost

To minimize the total cost, we seek a value where function attains its minimum value .

From expressing as

we obtain

It follows that

Hence, to minimize is to find the that minimizes

Since , a constant, by the following theorem:

For positive quantities and positive rational quantities , if is a constant, then attains its minimum if

(see “Solving Kepler’s Wine Barrel Problem without Calculus“), we solve equation

for :

Fig. 2

From Fig. 2, we see that , contradicts (2).

However, when is a positive quantity. Therefore, it is

that minimizes the total cost.

Consider function that has first and second derivatives at each point.

There are two finite difference approximations to its derivatives at a particular point :

[1]

Fig. 1

Intuitively (see Fig. 1),

[2]

Let

so that

Substituting

and

into (3) gives

i.e.,

See also “Deriving Finite Difference Approximations of the Derivatives“.