Skip to content

Conversation

@DanielVandH
Copy link
Member

@DanielVandH DanielVandH commented Nov 4, 2024

Instead of computing the transform for the weighted conversion introduced in #118, it turns out that the formula for the coefficients isn't actually too bad. In particular,

$$x(t-x) = \ell_1 + (1-x)\left[\ell_2 + \ell_3\beta^{t,(a-1,1,c-1)}\left(x-\alpha^{t,(a-1,1,c-1)}\right)\right]$$

where I use the notation $P_1^{t, (a, b, c)} = \beta^{t,(a,b,c)}(x-\alpha^{t,(a,b,c)})$ with

$$\begin{align*} \alpha^{t,(a,b,c)} &= \frac{\Gamma^{t,(a+1,b,c)}}{\Gamma^{t,(a,b,c)}}, \\\ \beta^{t,(a,b,c)} &= \sqrt{\frac{\Gamma^{t,(a,b,c)}}{\Gamma^{t,(a+2,b,c)} - 2\alpha^{t,(a,b,c)}\Gamma^{t,(a+1,b,c)} + \left(\alpha^{t,(a,b,c)}\right)^2\Gamma^{t,(a,b,c)}}}, \\\ \Gamma^{t, (a, b, c)} &= \int_0^1 x^a(1-x)^b(t-x)^c \,\mathrm dx = \mathrm B(a+1, b+1)t^c{}_2F_1\left(a+1,-c;a+b+2,t^{-1}\right), \end{align*}$$

and $\mathrm B(x, y)$ is the beta function. The coefficients are then

$$\begin{align*} \ell_1 = t - 1, \quad \ell_2 = 1 + \alpha^{t, (a-1,1,c-1)} - t, \quad \ell_3 = 1/\beta^{t,(a-1,1,c-1)}. \end{align*}$$

@codecov
Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.97%. Comparing base (28b78cb) to head (fbc85a8).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #121      +/-   ##
==========================================
+ Coverage   94.92%   94.97%   +0.05%     
==========================================
  Files           3        3              
  Lines         650      657       +7     
==========================================
+ Hits          617      624       +7     
  Misses         33       33              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dlfivefifty dlfivefifty merged commit ed25acf into master Nov 11, 2024
11 checks passed
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

Successfully merging this pull request may close these issues.

3 participants