home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
509.lha
/
ATS_v2.0
/
ode.doc
< prev
next >
Wrap
Text File
|
1991-05-06
|
2KB
|
68 lines
Version 1.6
4/3/91
The following is a sample ode input file.
exact=1
max_terms=10
n_eq=1
x=complex(1.0,0.0)
y1_ts=complex(0.0625,0.0)
h=complex(0.0001,0.0)
diff_y1_ts=constant(y1_ts,complex(1.0,0.0))/
(expt(x(y1_ts)*x(y1_ts)+constant(y1_ts,complex(1.0,0.0)),
constant(y1_ts,complex(4.0,0.0))))-
constant(y1_ts,complex(8.0,0.0))*
x(y1_ts)/(expt(x(y1_ts)*x(y1_ts)+
constant(y1_ts,complex(1.0,0.0)),
constant(y1_ts,complex(5.0,0.0))))
//end
1.0/((ex_x*ex_x+1.0)*(ex_x*ex_x+1.0)*(ex_x*ex_x+1.0)*(ex_x*ex_x+1.0))
//end
iterations=1000
plot=1
The explaiations follow (NOTE the keywords must appear in this order!)
exact=1
an exact solution is provided for comparison
max_terms=10
number of terms of the taylor series to compute (usually 30 max 60)
n_eq=1
number of sumultaneous equations
x=complex(1.0,0.0)
intitial value of independant variable
y1_ts=complex(0.0625,0.0)
intitial value of dependant variable #1
h=complex(0.0001,0.0)
increment
diff_y1_ts=constant(y1_ts,complex(1.0,0.0))/
(expt(x(y1_ts)*x(y1_ts)+constant(y1_ts,complex(1.0,0.0)),
constant(y1_ts,complex(4.0,0.0))))-
constant(y1_ts,complex(8.0,0.0))*
x(y1_ts)/(expt(x(y1_ts)*x(y1_ts)+
constant(y1_ts,complex(1.0,0.0)),
constant(y1_ts,complex(5.0,0.0))))
the equation dy/dx = 1/(x^2+1)^4-8x/(x^2+1)^5
note constant taylor series are functions of a sample taylor series as is x
//end
end of equation
1.0/((ex_x*ex_x+1.0)*(ex_x*ex_x+1.0)*(ex_x*ex_x+1.0)*(ex_x*ex_x+1.0))
exact solution
//end
end of exact solution
iterations=1000
number of times to iterate
plot=0
set = 0 for no Maple plots
= 1 for final plot
= 2 for each iteration (a modified logorithmic format)
HOW TO USE
you must have icon
enter iconx ode
(i have recompiled my iconx as iconz to avoid a conflict)
enter name of ode input file
enter name of c++ output file (stest.cp to use makefile provided)
make stest