gsl_blas_dgemm do?
struct gsl_odeiv2_system ?
#include<gsl/gsl_odeiv2.h> and gcc -E;
gsl-config --cflags and view.
Solve, using GSL, the linear system
| [ | 6 | -5 | -9 | ] | [x0] | [-9] | |
| [ | 2 | -2 | -4 | ] | [x1] | = | [0] |
| [ | 0 | -5 | 4 | ] | [x2] | [-8] |
gsl_linalg_HH_solve
gsl_linalg_LU_decomp
gsl_linalg_LU_solve
gsl_linalg_QR_decomp
gsl_linalg_QR_solve
Check that you've got the correct solution.
Consider the equation of equatorial motion of a planet around a star in General Relativity,
u(φ)'' + u(φ) = 1 + εu(φ)2 ,where
u(φ) ≡ 1/r(φ), r is the
(reduced-circumference) radial coordinate, φ is the azimuthal angle,
ε is the relativistic correction (on the order of the star's Schwarzschild radius divided by the radius of the
planet's orbit), and primes denote the
derivative with respect to φ.
Integrate this equation with ε=0 and initial conditions u(0)=1, u'(0)=0 :
this should give a Newtonian circular motion.
Integrate this equation with ε=0 and initial conditions u(0)=1, u'(0)≈-0.5 :
this should give a Newtonian elliptical motion. Hint: u'(0)
shouldn't bee too large or you will lose your planet.
Integrate this equation with
ε≈0.01 and initial conditions
u(0)=1, u'(0)≈-0.5 :
this should illustrate the relativistic precession of a planetary orbit.
Hints:
y0=u and
y1=u', which gives the following ODE,
y0' = y1 y1' = 1-y0+ε*y0*y0
φ and u, you can plot the
orbit with the following gnuplot/pyxplot command,
plot "data" using (1/$2)*sin($1):(1/$2)*cos($1) with lines notitle