# The integrator module

**URL:** https://discourse.julialang.org/t/the-integrator-module/14365
**Category:** Numerics
**Created:** [August 31, 2018, 2:00pm UTC](https://discourse.julialang.org/t/the-integrator-module/14365 "2018-08-31T14:00:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![sysk\_msk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sysk_msk/32/6945_2.png) [@sysk\_msk](https://discourse.julialang.org/u/sysk_msk)
#### Post date: [August 31, 2018, 2:00pm UTC](https://discourse.julialang.org/t/the-integrator-module/14365/1 "2018-08-31T14:00:07Z")

</div>

I want to calculate the following formula:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/6/860bcd785376cf8b06c573ee2ad45246b75db844.png)  
but I can’t find the integrator module as Int() in MATLAB.  
how could I solve the problem using Julia?

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [August 31, 2018, 2:16pm UTC](https://discourse.julialang.org/t/the-integrator-module/14365/2 "2018-08-31T14:16:34Z")

</div>

Use QuadGK.jl

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [August 31, 2018, 3:56pm UTC](https://discourse.julialang.org/t/the-integrator-module/14365/3 "2018-08-31T15:56:36Z")

</div>

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:

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

```

assuming `N > 10`.

---

<div class="post-metadata">

### Author: ![ckoe-bccms](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ckoe-bccms/32/1816_2.png) [@ckoe-bccms](https://discourse.julialang.org/u/ckoe-bccms)
#### Post date: [August 31, 2018, 6:34pm UTC](https://discourse.julialang.org/t/the-integrator-module/14365/4 "2018-08-31T18:34:43Z")

</div>

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](https://github.com/JuliaPy/SymPy.jl) or [Reduce](https://github.com/chakravala/Reduce.jl) 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.

---

<div class="post-metadata">

### Author: ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)
#### Post date: [September 7, 2018, 9:22pm UTC](https://discourse.julialang.org/t/the-integrator-module/14365/5 "2018-09-07T21:22:22Z")

</div>

> [@ckoe-bccms](#):
>
> In julia there appears to be a package to use either [SymPy](https://github.com/JuliaPy/SymPy.jl) or [Reduce](https://github.com/chakravala/Reduce.jl) directly. Both are quite capable systems. I have not tested if they can solve that integral.

You can read about the capabilities of `Reduce` here: [Reduce.Algebra.int](https://chakravala.github.io/Reduce.jl/latest/man/07-prefix-ops.html#Reduce.Algebra.int)
