Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Is there a way to specify the dependent variable in eulers_method?

Consider

sage: u,v = PolynomialRing(QQ,2, "uv").gens()
sage: eulers_method(2*u + v, 1, 5, 0.2, 4)

On the face of it it's ambiguous whether this is solving du/dv = 2u + v with u(v=1) = 5 or if it's doing dv/du = 2u + v with v(u=1)=5. In practice it solves the latter, but how is that determined?

It appears to hinge on the order of u and v on the LHS of the first line but I can't find any mention of this in the documentation.

Is there a way to specify the dependent variable in eulers_method?

Consider

sage: u,v = PolynomialRing(QQ,2, "uv").gens()
sage: eulers_method(2*u + v, 1, 5, 0.2, 4)

On the face of it it's ambiguous whether this is solving du/dv = 2u 2*u + v with u(v=1) = 5 or if it's doing dv/du = 2u 2*u + v with v(u=1)=5. In practice it solves the latter, but how is that determined?

It appears to hinge on the order of u and v on the LHS of the first line but I can't find any mention of this in the documentation.

Is there a way to specify the dependent variable in eulers_method?

Consider

sage: u,v = PolynomialRing(QQ,2, "uv").gens()
sage: eulers_method(2*u + v, 1, 5, 0.2, 4)

On the face of it it's ambiguous whether this is solving du/dv = 2*u + v with u(v=1) = 5 or if it's doing dv/du = 2*u + v with v(u=1)=5. In practice it solves the latter, but how is that determined?

It appears to hinge on the order of u and v on the LHS of the first line but I can't find any mention of this in the documentation.