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“.
It is a good idea to enjoy a cup of coffee before starting a busy day.
Suppose the coffee fresh out of the pot with temperature is too hot, we can immediately add cream to reduce the temperature by
instantly, then wait for the coffee to cool down naturally to
before sipping it comfortably. We can also wait until the temperature of the coffee drops to
first, then add the cream to further reduce it instantly to
.
Typically, , and
.
If we are in a hurry and want to wait the shortest possible time, should the cream be added right after the coffee is made, or should we wait for a while before adding the cream?
The heat flow from the hot water to the surrounding air obeys Newton’s cooling and heating law, described by the following ordinary differential equation:
where , a function of time
, is the temperature of the water,
is the temperature of its surroundings, and
is a constant depends on the heat transfer mechanism, the contact are with the surroundings, and the thermal properties of the water.
Fig. 1 a place where Newton’s law breaks down
Under normal circumstances, we have
Based on Newton’s law, the mathematical model of coffee cooling is:
Fig. 2
Solving (2), an initial-value problem (see Fig. 2) gives
Therefore,
If cream is added immediately (see Fig. 3),
Fig. 3 : cream first
by (3),
Otherwise (see Fig. 4),
Fig. 4: cream last
And so,
Fig. 5
Since
implies
from (4) , we see that
i.e.,
Hence,
If we are in a hurry and want to wait the shortest possible time, we should wait for a while before adding the cream!
Exercise-1 Solve (2) without using a CAS.
Exercise-2 Show that
A turkey is taken from the refrigerator at and placed in an oven preheated to
and kept at that temperature; after
minutes the internal temperature of the turkey has risen to
. The fowl is ready to be taken out when its internal temperature reaches
.
Typically, .
Determine the cooking time required.
According to Newton’s law of heating and cooling (see “Convective heat transfer“), the rate of heat gain or loss of an object is directly proportional to the difference in the temperatures between the object and its surroundings. This law is best described by the following ODE (Ordinary Differential Equation):
where are the temperatures of the object and its surroundings respectively.
is the constant of proportionality.
Fig. 1
We see that (1) has a critical point . Fig. 1 illustrates the fact that depending on its initial temperature, an object either heats up or cools down, trending towards
in both cases.
We formulate the problem as a system of differential-algebraic equations:
To find the required cooking time, we solve (2) for (see Fig. 2).
Fig. 2
Using Omega CAS Explorer, the typical cooking time is found to be approximately hours (
)
Luise Lange of Woodrow Wilson Junior College once wrote (see ” A Century of Calculus, Part I”, p. 50):
“In many calculus texts problems are formulated too one-sidedly in terms of particular, numerical data rather than in general terms. While pedagogically it may be wise to begin a new type of problem with some numerical examples, it is only the general formulation, and the interpretation of the answer in general terms, which can give insight into the functional relation between the given and the derived data.”
I agree with her wholeheartedly! On encountering a mathematical modeling problem stated with numerical values, I prefer to re-state it using symbols first. Then solve the problem symbolically. The numerical values are substituted for the symbols at the very end.
This post is a case in point, as the problem is re-formulated from page 1005 of Jan Gullberg’s “Mathematics From the Birth of Numbers”:
Exercise-1 Solving (2) without using a CAS.
Exercise-2 Given , show that
Exercise-3 Given , verify that
from
Exercise-4 A slice is cut from a loaf of bread fresh from the oven at and placed in a room with a constant temperature of
. After 1 minute, the temperature of the slice is
. When has the slice of bread cooled to
?
Evaluate
is an exercise accompanied my previous post “Integration by Parts Done Right“. It is a special case of
.
For various , Omega CAS Explorer gives
Integration by parts is a technique for evaluating indefinite integral whose integrand is a product of two functions. It is based on the fact that
If two functions are differentiable on an interval
and
exists, then
It is not difficult to see that (1) is true:
Provide exist, let
and
.
By the rules of differentiation (see “Some rules of differentiation”),
.
i.e.,
or,
The key to apply this technique successfully is to choose proper so that the integrand in the original integral can be expressed as
and,
is easier to evaluate than
.
To evaluate , we let
to get
In fact, for ,
.
The following example of integrating a rather ordinary-looking expression offers unexpected difficulties and surprises:
Notice the original integral (boxed) appears on the right of the “=” sign. However, this is not an indication that we have reached a dead end. To the contrary, after it is combined with the left side, we have
and so,
Sometimes, successive integration by parts is required to complete the integration. For example,
.
Hence,
i.e.,
Exercise-1 Evaluate
1)
2)
3)
While Maxima choked:
Mathematica came through:
4)
5)
6)
7)
Both Maxima and Mathematica came though:
Shown in Fig. 1 is a pile of cylinders that approximates one half of a sphere.
Fig. 1
From Fig. 1, we see .
If denotes the volume of
cylinder in the pile, then
.
Let
,
we have
see “Little Bird and a Recursive Generator“
.
As
Therefore, gives
Similarly, we approximate a cone
by a stack of cylinders:
Fig. 2
Since
and
,
we have
If denotes the
cylinder, then
.
Let
we have
.
Since as ,
, we have
We now derive the formula for a sphere’s surface area.
Let us approximate a sphere by many cones:
Fig. 3
From Fig. 3, we see that as ,
.
Consequently,
and,
.
It follows that
Hence,