JuliaApproximation / JuliaApproximation/ApproxFunBase.jl

ApproxFun+IntervalArithmetic: make ODE solving really rigorous

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
13
Forks
13
Avg merge
10h 33m
Merged PRs (30d)
16

Description

The following code returns successfully for solving Airy's equation (the extra definitions are work arounds for bugs):

julia> Base.broadcast(::typeof(*), a::IntervalArithmetic.Interval, b::AbstractVector) = 
           map(x -> a*x, b)

julia> Base.Broadcast.broadcasted(::typeof(*), a::IntervalArithmetic.Interval, b::AbstractVector) = 
           map(x -> a*x, b)

julia> Base.length(d::UnitRange{<:IntervalArithmetic.Interval}) = Integer(maximum(d.stop.hi)-minimum(d.start.lo)+1)

julia> u = [Dirichlet(); D^2 - x] \ [[1, 0], 0]
Fun(Chebyshev([-1, -1]..[1, 1]),IntervalArithmetic.Interval{Float64}[[0.528647, 0.528648], [-0.522247, -0.522246], [-0.023162, -0.0231619], [0.0223854, 0.0223855], [-0.00557882, -0.00557881], [-0.000122104, -0.000122103], [9.37066e-05, 9.37067e-05], [-1.68122e-05, -1.68121e-05], [-2.4373e-07, -2.43729e-07], [1.63064e-07, 1.63065e-07]  …  [1.54639e-10, 1.5464e-10], [-1.89644e-11, -1.89643e-11], [-1.63813e-13, -1.63812e-13], [9.21385e-14, 9.21386e-14], [-9.91957e-15, -9.91956e-15], [-7.12466e-17, -7.12465e-17], [3.76658e-17, 3.76659e-17], [-3.63796e-18, -3.63795e-18], [-2.23433e-20, -2.23432e-20], [-1.12162e-20, -1.12161e-20]])

It happens to have worked:

julia> parse(BigFloat,"0.546136459064141770613483785351029091974067802242010192661484687977676021081218637004123196030567166414008915304513669838826570884623515686") in u(0) # true value from mathematica
true

However, this is mostly luck: the convergence criteria doesn't actually control the decay in the tail. To do this properly (and thereby have apriori guaranteed success) we would need to modify the convergence check at https://github.com/JuliaApproximation/ApproxFunBase.jl/blob/7dd9ef0a111ffd702f989c6f752a62538bc7e62b/src/Caching/matrix.jl#L122

to properly bound the tail.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/Caching/matrix.jl at the convergence check around line 122, then reproduce the Airy-equation example from the issue. Determine how the current check handles coefficient tails; done means the convergence criterion properly bounds the tail and provides an a priori guarantee rather than relying on observed success.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.