A Equation system involving InverseDigamma(Digamma(a+1)-b*k)-1

AI Thread Summary
The discussion focuses on solving a system of equations involving the Inverse Digamma function for variables a and b, given constants N, E, and K. The equations include summations of n(k) defined as InverseDigamma(Digamma(a+1)-b*k)-1. Participants suggest that numerical methods using programming languages like Python, Matlab, or Mathematica are necessary for finding solutions. Pseudo-code is provided to illustrate a brute-force approach for searching optimal values of a and b within specified ranges. The conversation invites further suggestions for analytic solutions to the problem.
rabbed
Messages
241
Reaction score
3
How would one go about solving this for a and b given N, E and K?

n(0) + n(1) + … + n(K) = N
n(0)*0 + n(1)*1 + … + n(K)*K = E

Where n(k) = InverseDigamma(Digamma(a+1)-b*k)-1
 
Mathematics news on Phys.org
I think it would have to be done numerically using Python, Matlab, or Mathematica.

Mathematica has a digamma function:

https://mathworld.wolfram.com/DigammaFunction.html

and Matlab has a digamma function:

https://www.mathworks.com/help/matlab/ref/psi.html

and Python has a version of the digamma function:

https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.digamma.html

Here's some pseudo code to search for the best A, B values across a range of A, B values. It's not the fastest or the best way, and the pseudo-code needs to be written in either Python, Matlab, or Mathematica to find the answer you're looking for.

Also, the means of determining closeness could be better implemented with perhaps some other distance measurement more suited to this search.

Code:
given N , E , K

A = 0
B = 0

NDIFF= max_float_value
EDIFF = max_float_value

for a in range(a_min,a_max,a_step)

    for b in range(b_min,b_max,b_step)

        for k = 0 to K:

            X = (a+1)-b*k
            NK = inverse_digamma(digamma(X))
            N2 = N2 + NK
            E2 = E2 +k*NK

        if ((N2-N)^2+(E2-E)^2) < (NDIFF^2+EDIFF^2):
            NDIFF = (N2 - N)
            EDIFF = (E2 - E)
            A = a
            B = b

print "NDIFF = " NDIFF
print "EDIFF = " EDIFF
print "A = ". A, "  B = ", B
 
Last edited:
Thanks, i'll try that.
If anyone has ideas for an analytic solution, just shoot :)
 
Suppose ,instead of the usual x,y coordinate system with an I basis vector along the x -axis and a corresponding j basis vector along the y-axis we instead have a different pair of basis vectors ,call them e and f along their respective axes. I have seen that this is an important subject in maths My question is what physical applications does such a model apply to? I am asking here because I have devoted quite a lot of time in the past to understanding convectors and the dual...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...

Similar threads

Replies
14
Views
2K
Replies
2
Views
2K
Replies
5
Views
1K
Replies
3
Views
1K
Replies
1
Views
1K
Replies
10
Views
1K
Back
Top