The integrator module

I want to calculate the following formula:
image
but I can’t find the integrator module as Int() in MATLAB.
how could I solve the problem using Julia?

Use QuadGK.jl

3 Likes

This particular integral can be done analytically. The answer is:

\sum_{i=0}^{10} \frac{N!}{i! (N-i)!} \frac{1}{\lambda (N-i) (N-i+1)}

or, in Julia:

f(λ,N) = sum(binomial(N,i) / (λ*(N-i)*(N-i+1)) for i = 0:10)

assuming N > 10.

26 Likes

As far as I can see int() is the function to do symbolic integration in matlab. In fact matlab contains nowadays a complete computer algebra system (CAS) as part of some toolbox (it is in fact the old MUPAD).

In julia there appears to be a package to use either SymPy or Reduce directly. Both are quite capable systems. I have not tested if they can solve that integral. But maxima (another free CAS, but without a working julia interface) can, so it should be ok.

3 Likes

You can read about the capabilities of Reduce here: Reduce.Algebra.int

1 Like