[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Boundary value problem for system of ODEs

From: Foivos Diakogiannis
Subject: Re: [Help-gsl] Boundary value problem for system of ODEs
Date: Thu, 23 Apr 2015 09:56:52 +0800

Hi Ruben,

I don't know the exact form of your system of diff. eq. but with regards to
BVP I attack these with either using b-splines of Finite Element Methods
(the latter is much more powerful approach). Alternatively you can try
finite differences for something simpler.

If your BVP is linear in the function that is being differentiated, i.e.
a_n(x) y^{(n)}(x)+...+a_1(x) y(x) = f(x) then the b-spline solution goes
like this:  you substitute as a solution y(x) = Sum C_i * B_i(x) where
B_i(x) is a set of known B-spline basis and solve for the unknowns C_i
(constants) with linear Algebra (you can incorporate the boundary
conditions as well as additional linear equations). GSL has an excellent
support for b-splines. You can get an idea on how this is done from here:

With regards to finite element methods (you may be able to avoid this and
use finite differences as simpler), this library has many good worked
examples on ODEs and systems of ODEs:

I am afraid I can't help with the GSL related question, it would be good if
you could write something more about the functional form of your
equations.  I hope the above helps,


On Thu, Apr 23, 2015 at 6:30 AM, Ruben Farinelli <address@hidden>

> Hi,
> I have been working for a long time on a complicate physical problem.
> I have a set of ODEs, three of which are first-order, and the fourth
> is of second order.
> In the latter case unfortunately, I have conditons for its derivative
> R'[0]=0,
> while the second is actually an asymptotic boundary condition, namely
> the function must tend to zero for large value of the variable.
> Of course with a change of variable the system becomes N+1
> first order ODEs.
> Actually I have implemented some kind of shooting method, the main
> issue is that the function has an exponential-decay behavior and
> the result seems to be rather dependent on the adopted integrator.
> Finally I decided to compute the complicate Jacobian to test
> the gsl_odeiv_bsimp which I read should be the most powerful.
> A-part from any welcome suggestion in approaching BVPs, I have
> a doubt. Namely, the right-hand side of the system contains not only
> the functions y_i but also their first derivatives, labeled F_i, or y'_i.
> I mean something like
> F[0]=f_0{y[0]...y[n], F[1].....F[n]}
> F[1]=f_1{y[0]...y[n], F[0].....F[n]}
> etc etc
> The GSL jacobian function arguments are
> (double t, const double y[], double *dfdy, double dtdy[], void *params)
> but I don't see where the functions derivative y'_i are stored.
> They are still present when computing the Jacobian, but apparently
> they are not read.
> Is there something wrong ?
> Thank you for your help !
> Ruben

reply via email to

[Prev in Thread] Current Thread [Next in Thread]