This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
ODE's again (sorry)
- From: "Sam Halliday" <plendily at hotmail dot com>
- To: gsl-discuss at sources dot redhat dot com
- Date: Sat, 02 Mar 2002 16:26:36 +0000
- Subject: ODE's again (sorry)
- Bcc:
hello all,
i have been having problems with the ODE's of gsl 1.1. i thought i had it
mastered when i solved lane-emden (which is not disimilar to the
thomas-fermi equation), but now i have moved onto solving 3 simple newtonian
motion equations, which need to have solutions from the other in order to
calculate the next value...
so i tried making 3 calls to the runge-kutta (4th order), which worked for
me before, and if i solve for one of these 3 equations by itself, it seems
to work, however if i change the step range in my solution to only solve for
1 value (instead of a whole range), i get a slight error in the 2nd
calculated values with respect to the solution over a range, here is some
sample data
--solution by one call to my function (similar to the fixed-step example in
the docs), solving for the whole range:
index x dx/dt
0 1.000000e+01 0.000000e+00
1 9.998821e+00 -2.946330e-01
2 9.994009e+00 -6.482472e-01 ...and on and on..
--solution by inserting results of a single step call as the initial values
of next call:
index x dx/dt
0 1.000000e+01 0.000000e+00
1 9.998821e+00 -2.946330e-01
2 9.995188e+00 -5.893008e-01
as you can see, the problem lies with the second call, the dx/dt value is
lower by making single calls, (which results in a higher x value) than by
solving for a range.
maybe this is because i am not starting at t=0, can the gsl algorithms
handle calls not started at t=0?
i realise this is quite a large request to expect somebody to help me solve
it, but i am really at a loss and posting was my last resort. and i dont
want to plague the list with my source code... unless you ask ;)
please help!
Sam
---
If you wish to be happy for one hour, get drunk.
If you wish to be happy for three days, get married.
If you wish to be happy for a month, kill your pig and eat it.
If you wish to be happy forever, learn to fish.
-- Chinese Proverb
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx