[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Working on bvp4c
From: |
c. |
Subject: |
Re: Working on bvp4c |
Date: |
Wed, 31 Aug 2016 02:59:32 +0200 |
On 23 Aug 2016, at 11:29, lakerluke <address@hidden> wrote:
> Maybe I've misunderstood this but from page 6, f_{i - 1/2} is given by odefun
> evaluated at the point (*):
>
> [ (x_{i - 1} + h/2) , 0.5*(y_{i - 1} + y_{i}) - (h / 8) * (f_{ i } - f_{ i -
> 1}) ]
>
> However,in order to evalue f at this point requires us to know how to
> evaluate the components of f at x = (x_{i - 1} + h/2), which we do not know.
>
> Take for example demo 1 given here:
>
> http://octave.sourceforge.net/odepkg/function/bvp4c.html
>
> f = @(t,u) [ u(2); -abs(u(1)) ];
>
> Seeing as u is a function of t, in order to evaluate f at (*) do we not need
> to know u as a function of t (e.g. the solution) in order to evaluate it?
> Or, seeing as in this example, f does not explicitly depend on t, do we just
> evaluate the u components of f at the second component of the point (*) -
> effectively treating f = f(u)?
If I understand correctly what formula you refer to, it is the one on line 5 at
page 306 of the article.
In that formula, f is a function of two inputs, both of which are computable at
the current step in the algorithm so I really don't understand what your
question is about.
Maybe it helps if you consider the formula programmatically, i.e. divide the
evaluation of f_{i - 1/2} into 5 steps:
1) f_{i} = f (x_{i}, y_{i}, p)
2) f_{i - 1} = f (x_{i - 1}, y_{i - 1}, p)
3) arg1 = (x_{i - 1} + h_{i - 1} / 2)
4) arg2 = 0.5 * (y_{i - 1} + y_{i}) - ...
(h_{i - 1} / 8) * (f_{i} - f_{i - 1});
5) f_{i - 1/2} = f (arg1, arg2, p)
at each of the 5 steps all of the quantities appearing on the RHS are known so
the quantitities on the LHS are computable.
Which of the above steps is unclear to you?
c.
- Re: Working on bvp4c, (continued)
- Re: Working on bvp4c, Bill Greene, 2016/08/15
- Re: Working on bvp4c, lakerluke, 2016/08/20
- Re: Working on bvp4c, Bill Greene, 2016/08/20
- Re: Working on bvp4c, lakerluke, 2016/08/22
- Re: Working on bvp4c, Bill Greene, 2016/08/22
- Re: Working on bvp4c, lakerluke, 2016/08/22
- Re: Working on bvp4c, Bill Greene, 2016/08/22
- Re: Working on bvp4c, lakerluke, 2016/08/23
- Re: Working on bvp4c, Bill Greene, 2016/08/27
- Re: Working on bvp4c, Nicholas Jankowski, 2016/08/27
- Re: Working on bvp4c,
c. <=