Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite stepsize integrating a function #66

Closed
mforets opened this issue Apr 11, 2019 · 4 comments
Closed

Infinite stepsize integrating a function #66

mforets opened this issue Apr 11, 2019 · 4 comments

Comments

@mforets
Copy link
Contributor

mforets commented Apr 11, 2019

For the context see this discussion. In short, integrating a function such as

@taylorize function bball!(t, x, dx)
    dx[1] = x[2]
    dx[2] = -one(x[1]) # this one is constant
    return dx
end

with a taylor series in time whose order is larger than two (the exact solution has degree two), then TaylorIntegration.stepsize! returns a stepsize which is Inf.

This is maybe correct? Since one gets the exact solution for all t? So i don't know the expected action point here, but then some error happens down the line, in TaylorModels.validated_integ.

@lbenet
Copy link
Collaborator

lbenet commented Apr 11, 2019

Thanks @mforets for opening this issue!

Indeed, the returned computed local solution is actually exact, which means that if the order is 4 or larges, the returned time step will be Inf. What we could do is check for such a Inf time step, and only in that case, use the last non-zero coefficient of the series to compute a finite step size.

cc @PerezHz

@PerezHz
Copy link
Owner

PerezHz commented Apr 25, 2019

Perhaps we use could use TaylorSeries' findlast? For example, here, instead of doing ord = x.order, we could do ord = findlast(x)

@lbenet
Copy link
Collaborator

lbenet commented Apr 25, 2019

Good idea! Could you test it?

@lbenet
Copy link
Collaborator

lbenet commented Jun 6, 2019

Closing; solved by #73

@lbenet lbenet closed this as completed Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants