[SciPy-User] scipy.integrate.solve_bvp with explicit dependence on independent variable?
boyan.penkov at gmail.com
Wed Oct 25 18:57:38 EDT 2017
> On Oct 25, 2017, at 18:51, Pauli Virtanen <pav at iki.fi> wrote:
> ke, 2017-10-25 kello 16:01 -0400, Boyan Penkov kirjoitti:
>> So, can scipy.integrate.solve_bvp be used in problems where there's
>> explicit dependence on $r$, for functions where the right-hand side
>> F(dq/dx, q, r)?
> Does "dq/dx" mean "dq/dr" and equation of type
> d^2 q/dr^2 = F(dq/dr, q, r)
Whoops, yeah…. you are correct, I do indeed mean dq/dr...
> Then the yes, the independent variable is the first argument in
> "def fun(r, y)". If this is not what you are looking for, if you write
> explicitly the first order system you want to solve maybe better
> answers come.
The issue seems to be that I then generally have
x = linspace(….)
which makes the output of fun(x,y) have length len(x) + 1 and not just 2, as may be expected.
Is there a syntactic solution to this?
> Pauli Virtanen
> SciPy-User mailing list
> SciPy-User at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User