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

  • Context: Graduate 
  • Thread starter Thread starter rabbed
  • Start date Start date
  • Tags Tags
    Equation system System
Click For Summary
SUMMARY

This discussion focuses on solving the equation system involving the InverseDigamma function, specifically the equations n(0) + n(1) + … + n(K) = N and n(0)*0 + n(1)*1 + … + n(K)*K = E. The proposed approach emphasizes numerical methods using Python, Matlab, or Mathematica, all of which support the digamma function. Pseudo-code is provided to iteratively search for optimal values of A and B, highlighting the need for effective distance measurement to determine solution accuracy.

PREREQUISITES
  • Understanding of numerical methods for solving equations
  • Familiarity with the InverseDigamma and Digamma functions
  • Proficiency in Python, Matlab, or Mathematica programming
  • Knowledge of optimization techniques for parameter estimation
NEXT STEPS
  • Implement the provided pseudo-code in Python, Matlab, or Mathematica
  • Explore advanced distance measurement techniques for optimization
  • Study the properties and applications of the Digamma function
  • Research alternative analytic solutions for the equation system
USEFUL FOR

Mathematicians, data scientists, and engineers involved in numerical analysis and optimization, particularly those working with special functions like Digamma and InverseDigamma.

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 :)
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
884
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
938
  • · Replies 2 ·
Replies
2
Views
1K