I am trying to solve some first order linear odes dy/dt = A(t) y where y is an N vector and A(t) an NxN matrix with real entries. N varies.
I need arbitrary precision arithmetic, so I'm trying to use sage.calculus.desolvers.desolve_tides_mpfr(f, ics, initial, final, delta, tolrel=1e-16, tolabs=1e-16, digits=50) desolve_tides_mpfr() requires the ode to be described by f which is a symbolic function f(t,y_1,...,y_N) of N+1 variables which returns a list of derivatives [dy_1/dt, ..., dy_N/dt] My problem is that N varies. I can write a symbolic expression of the form f(t,y) = A(t)*y with two arguments, t a real number and y a vector, returning a vector. But that is not acceptable to desolve_tides_mpfr(). Is there any way of avoiding writing a separate f for each value of N? e.g., f(x,y_1,y_2) = list(A(t)*vector[y_1,y_2])) thanks, Daniel Friedan -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/473ca93f-481f-4c30-9c7c-307f9649457cn%40googlegroups.com.