[SciPy-User] scipy.integrate.solve_bvp with explicit dependence on independent variable?

Boyan Penkov boyan.penkov at gmail.com
Wed Oct 25 18:57:38 EDT 2017

Boyan Penkov

> 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:
> [clip]
>> So, can scipy.integrate.solve_bvp be used in problems where there's
>> an
>> explicit dependence on $r$, for functions where the right-hand side
>> is
>> 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
> https://mail.python.org/mailman/listinfo/scipy-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-user/attachments/20171025/a7c48a49/attachment.html>

More information about the SciPy-User mailing list