SciML / SciML/Integrals.jl

More types of infinity transformations

Open
#149 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
245
Forks
36
Avg merge
4h 43m
Merged PRs (30d)
15

Description

Currently the only type of transformation used for handling infinite bounds is $u \mapsto a + t/(1-t)$ and $u \mapsto t/(1-t)^2$. It could be nice to eventually support other transformations.

In some of the integrals I've dealt with in my work, I've found that transformations like

$$
s = -\cot\left[\frac{\left(\pi + 2\arctan(a)\right)(\xi+1)}{4}\right], \quad -1 < \xi < 1,
$$

and

$$
s = -\cot\left[\frac{\left(\pi - 2\arctan(a)\right)(s-1)}{4}\right], \quad -1 < \xi < 1,
$$

could be useful, giving the (rather complicated..) results

$$
\int_{-\infty}^a g(s)\mathrm{d}s = \frac{1}{4}\left(\pi + 2\arctan(a)\right)\int_{-1}^1 \csc^2\left[\frac{1}{4}\left(s+1\right)\left(2\arctan(a) + \pi\right)\right]g\left(-\cot\left[\frac{\left(\pi + 2\arctan(a)\right)(s+1)}{4}\right]\right)\mathrm{d}s,
$$

$$
\int_a^\infty g(s)\mathrm{d}s = \frac{1}{4}\left(\pi - 2\arctan(a)\right)\int_{-1}^1 \csc^2\left[\frac{1}{4}\left(s-1\right)\left(\pi - 2\arctan(a)\right)\right]g\left(-\cot\left[\frac{\left(\pi - 2\arctan(a)\right)\left(s-1\right)}{4}\right]\right)\mathrm{d}s
$$

which typically gave better results when applying Gauss-Legendre quadrature afterwards. These integrals I dealt with had issues with oscillations and singularities, etc., so the currently used transform is still a good default. Another useful transform is $t \mapsto (2/\pi)\arctan(t)$, giving

$$
\int_{-\infty}^\infty g(t)\mathrm{d}t = \frac{\pi}{2}\int_{-1}^1 \sec^2\left(\frac{\pi t}{2}\right)g\left(\tan\frac{\pi t}{2}\right)\mathrm{d}t.
$$

Contributor guide

Open the contributing guide

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 by reviewing the existing infinite-bound transformations in Integrals.jl and the current integration entry points that select them. Compare the proposed cotangent and arctangent transforms with the existing default, then define the supported transformation API and validation needed for the new options; done means the alternatives are usable without displacing the current default.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.