-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Differentiation for a limit of an integral #56
Comments
The place to put the derivative rule would be https://github.com/SciML/Quadrature.jl/blob/master/src/Quadrature.jl#L577-L635 . Indeed right now it doesn't do the derivative w.r.t. the upper bound. |
Hi, I have got the same problem. Is there a simple way to fix it? I think having the variable in the lower bound leads similarly to a StackOverflowError. Here is an example of this type of problem
|
Someone probably just needs to do https://github.com/SciML/Quadrature.jl/blob/master/src/Quadrature.jl#L170
|
Thanks for the suggestion. I have tried it in the following way:
I receive the following:
This is the same error as before. Using another method, e.g.
|
Beginner here. I think I'm running into this sort of problem too (and I asked about it on discourse). I'm unclear: has this differentiation wrt limit of integration feature been added yet? thanks |
Similar problem for me as well |
I am also a Julia beginner but interested in solving this problem. Any advice where to start? The links above seem outdated. |
Derivative overloads generally aren't the easiest project to get started with. I'd usually advise doing something easier first, like #194. If you do want to help this effort though, I think the starting place is to help improve the tests, i.e. help us finish #196 which will highlight exactly what parts of the algorithms are not dealing with derivatives well. The actual derivative overloads are in https://github.com/SciML/Integrals.jl/blob/master/ext/IntegralsForwardDiffExt.jl and https://github.com/SciML/Integrals.jl/blob/master/ext/IntegralsZygoteExt.jl, the latter using ChainRules https://juliadiff.org/ChainRulesCore.jl/stable/ |
as a quick solution: with e.g. |
I have a function with an integral, where the variable is the upper limit of the intgral. Using different integration methods and different automatic differentiation methods for differentiation for the upper limit leads to a StackOverflowError. If I understand the error messages right, the problem is in the different integration methods and the dual-type.
I tried to define with DiffRules.jl a rule for this case (which is simply the integrand at the upper limit), but I still got the error message. Because of the simple rule for this case, it would not be necessary to use the integration method itself and problems with the dual-type could be avoided.
The text was updated successfully, but these errors were encountered: