Entries from July 2008

July 31, 2008

Example to show how numerical ODE solutions can be used to find integrals

In a previous post, I enumerated how we can use numerical ODE techniques like Euler and Runge-Kutta methods to find approximate value of definite integrals. Here is an example. Be sure to do the exercises at the end of the post to appreciate the procedure.

_____________________________________________________
This post is brought to you by Holistic Numerical [...]

July 28, 2008

Comparing Runge-Kutta 2nd order methods

Many a times, students ask me
Which of the Runge-Kutta 2nd order methods gives the most accurate answer to solving a first order ODE?
dy/dx=f(x,y), y(0)=y0
There is no direct answer, although Ralston’s method gives a minimum bound for the truncation error (Ralston, A., Runge-Kutta Methods with Minimum Error Bounds, Match. Compu., Vol 16, page 431, 1962).
They also [...]

July 25, 2008

Can I use numerical solution of ODE techniques to do numerical integration?

Yes.
If you are finding the value of the , then we can solve the integral as an ordinary differential equation as
dy/dx=f(x), y(a)=0
We can now use any of the numerical techniques such as Euler’s methods and Runge-Kutta methods to find the value of y(b) which would be the approximate value of the integral. Use [...]

July 21, 2008

Time of death – a classic ODE problem

One of the classical applied problems in ordinary differential equations is that of finding the time of death of a homicide victim.
The estimation of time of death is generally based on the temperature of the body at two times – 1) when the victim is found and 2) then a few hours later. Assuming [...]

July 18, 2008

Is it just a coincidence – true error in multiple segment Trapezoidal rule gets approximately quartered as the number of segments is doubled?

Look at the table below. This is a table that shows the approximate value of the integral

as a function of the number of segments used in the Trapezoidal rule and the corresponding true error.

n

Value

Et

1

11868

-807

2

11266

-205

3

11153

-91.4

4

11113

-51.5

5

11094

-33.0

6

11084

-22.9

7

11078

-16.8

8

11074

-12.9

The true error for n=1 is -807 and for n=2 is -205. As you can see the quarter of -807 is [...]

July 16, 2008

Can I use Trapezoidal rule to calculate an improper integral?

For example, is an improper integral which can be calculated exactly as .
Can we solve this integral by multiple segment Trapezoidal rule when we already know that the upper limit is infinity?
Yes, we can solve it in spite of the upper limit being infinity. We first need to make a change of variables such [...]

July 14, 2008

A metric for measuring wildness of a college football season

A Metric to Quantify the Topsy-Turvyness (Wildness) of a College Football Season
The 2008 college football season is almost here, and news media, sports commentators, and bloggers will hope for something to hype about. Luckily for them, the 2007 season did give them something to talk about; you would be hard pressed to recall a more [...]

July 11, 2008

Experiment for spline interpolation and integration

Background:
The motivation behind the experiment is to understand spline interpolation and numerical integration by finding the volume of water that can be held by a champagne glass.
What does the student do in the lab:
The student chooses one of the odd-shaped champagne glasses (Figure 1). The student measures the outer radius of the champagne glass [...]

July 9, 2008

Abuses of regression

There are three common abuses of regression analysis.
1. Extrapolation,
2. Generalization and
3. Causation.

Extrapolation
If you were dealing in the stock market or even interested in it, we remember the stock market crash of March 2000. During 1997-1999, investors thought they would double their money every year, started buying fancy cars and houses [...]

July 7, 2008

How do you know that the least squares regression line is unique and corresponds to a minimum

We already know that using the criterion of either

minimizing sum of residuals OR
minimizing sum of the absolute value of residuals

is BAD as either of the criteria do not give a unique line. Visit these notes for an example where these criteria are shown to be inadequate.
So we use minimizing the sum of the squares [...]