[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1580.0. "convert graphs to equations" by ADO75A::MCSHANE () Wed Mar 11 1992 01:16

    I want to find if I can build a mathematical model of a chemical
    reaction. I have data and graphs of a particular reaction. I would like
    to input the data for a curve and find out if it fits a formula.
    
    Thus I should be able to predict the results of an experiment, using
    the model.
                               
    Many of my plots look logarithmic and if I plot the logarithm of them
    vs time they are almost linear. Then if I change a variable the slope
    of the logarithim changes. 
    
    There are six Variables in the equations that I can see in a reaction
    of ...
    
    
    Chemical A  + chemical B ==> chemical C ==> back to chemical A
    
    Rate is faster if add Chemical E
    Rate is Slower if add chemical C          
    
    So where do I start? How does one turn graphs into formulas, and then
    formulas showing how graphs change shape and slope by changing other 
    variables.
T.RTitleUserPersonal
Name
DateLines
1580.1Interpolating STAR::ABBASIWed Mar 11 1992 01:5820
if i undertand you right, you seem to need an interpolating polynomial.

i.e you need to find F(x) ==> Pn(x) = sum (i=0..n) a(i) x^i

if you find Pn(x), that will be your interpolating polynomial for your
unknown function F(x). to find Pn(x) we need offourse to find the terms
a(i) for i=0..n and we are done.

so your data (graph) gives you the set of values ( Xi, f(Xi) ) i=1..n
(i.e the x,y values) and you want to find a polynomial Pn(x) that fits
closest to the data supplied.

so pick your favorite method of generating interpolating polynomials, such
as minimax polynomial (closely realted to chebyshev polys) or least square 
ploynomial, etc..


/naser

    
1580.2...Any interpolating software available?ADO75A::MCSHANEWed Mar 11 1992 06:236
    OK I'll grab a maths text and key on the areas you suggest.
    
    Is there computer software around that I can plug data into and it will
    offer solutions?
    
    
1580.3Works and is free ... somewhereVMSDEV::HALLYBFish have no concept of fireWed Mar 11 1992 08:495
    There are various pieces of curve fitting software available in NETLIB,
    some in the TOMS section.  Perhaps someone more up-to-date can give you
    the NETLIB access information.
    
      John
1580.4PIANST::JANZENThomas MLO21-4/E10 223-5140Wed Mar 11 1992 10:026
	If the log vs. time plot is linear, the function is exponential,
	not logarithmic.
	I have functions in C to fit exponential functions, least squares.
	Let me know if are interested or even if I can quickly write the
	little program to do it.
	TOm
1580.5For PC Clones...WBC::BAKERJoy and fierceness...Wed Mar 11 1992 11:3010
	There's also a commercial package from Jandel Scientific
	called "TableCurve 3.0" that will do what you want.  It
	has over 3000 equations for fitting input data; it will
	also crank out source code for the resulting equation,
	once you've decided on one you like.

	Neat stuff.

	-Art
1580.6Reference text????ADO75A::MCSHANEWed Mar 11 1992 17:4913
    Excellent, I looked in my Calculas books and its light on
    interpolation, however at the library I found some good Texts on
    Numerical analysis and its all there so thanks. There seems to be no
    definative text on Mathematics applications in chemistry, can anyone
    recomend a good reference text on The mathematics of chemical reactions
    or similar. I guess I'm pushing my luck as most maths texts give some
    applied examples in science, physics etc, however I havent found a book
    that deals or even lends a chapter to the analysis of reactions. Any
    references would be welcome.
    
    
    
    
1580.7one i know ofSTAR::ABBASIWed Mar 11 1992 23:2610
    well, there is a chapter on chemistry computations in book called
    "Very Large Scale computations in the 21st century", edited by
    Jill P.Merirov , thinking machine corp. 1991 , ISBN 0-89871-279-3
    QA75.5.V47, they talk about things like quantum chemistry by random
    walk, and environmental modeling.
    
    Iam sure there out there more down to earth computation chemical
    books, try looking through the chemistry section of the library ?
    
    /nasser
1580.8chemical kineticsCSSE::NEILSENWally Neilsen-SteinhardtTue Oct 27 1992 12:5752
This is a belated reply, but if you are still interested in this problem...

You seem to be looking at a problem in chemical kinetics, not a problem 
in interpolation or curve fitting.

Any good textbook of physical chemistry (mine was Moore) will give you the
standard rate equation :

	rate = k * [A]^na * [B]^nb ...      (from memory, this may be off)

where [x] is a concentration, nx are small positive integers, and k is a
rate constant which contains the (usually large) temperature dependence.

Integrating this over time gives the commonly observed negative exponential 
dependence of concentration on time.

The exponents na, nb ... have a simple physical interpretation: they are the
number of groups combining to make the activated complex, the bottleneck in 
the reaction.  For example, if the measured rate fits na=1 and nb=2, then 
the activated complex is assumed to be formed by 

	A + 2B -> AB[subscript]2*		(where * means activated)

A standard college lab experiment is to measure concentrations over time for 
some reaction, plot the results on semi-log paper, and determine the nx and k.
Since the nx are usually small integers (only a sadist would give students a 
reaction in which they are not), they can be determined by inspection.  
Given the nx, a simple average will usually give the estimate of k.

Usually, experiments are designed so that the reverse reaction can be 
ignored.  If not, and you are looking at a reaction

	A + B = C + D

you will have two rate equations, one for the forward rate and one for the 
reverse rate.  The time dependent concentrations you measure depend on both 
rates, with rate equations like the above, but with C and D appearing in the
reverse rate.

Reactions used in student labs are usually chosen so that there is just one 
activated complex (or reaction path).  Reactions of commercial or research 
importance usually have multiple activated complexes, so the true rate is a sum
of terms, each term having the form given above.  Some reactions of research 
interest also involve fractional nx.

In principle, given the rate equations and initial concentrations, you can 
compute the concentrations over time.  However, for all but the simplest 
cases, these rate equations lead to a "stiff" system of differential 
equations.  The equations are all first order, but the rate constants can vary 
by many orders of magnitude.  Applying a standard method to them will lead to 
calculations which are slow, inaccurate or both.  If you are serious about 
doing the prediction, you should find an algorithm designed for stiff systems.