﻿ How do I compute an integral (sum, product)? – Algosim documentation
Algosim documentation: How do I compute an integral (sum, product)?

# How do I compute an integral (sum, product)?

It is easy to compute a definite integral:

∫(sin(x), x, 0, π)
1.99999999984

Hint: To type the integral sign, ∫, type “\int” followed by space or a punctuation character. In this case, ( will do.

Hint: To type π, type “\pi” followed by space or a punctuation character. In this case, ) will do.

Hint: Instead of ∫, you may use the synonym integrate.

Similarly, you can compute sums and products:

∑(1/k!, k, 0, 100)
2.71828182846	(=e)
∑(2^k⋅k!^2/(2⋅k + 1)!, k, 0, 100)
1.57079632679	(=π/2)
∑(1/(1 + Fibonacci(2⋅n + 1)), n, 0, 100)
1.11803398875	(=√5/2)

Hint: To type the n-ary summation symbol, ∑, type “\sum” followed by space or a punctuation character. In these examples, ( will do.

Hint: Instead of ∑, you may also use the synonym sum.

Hint: You can also sum vectors or matrices:

∑(❨1, k, k^2, k^3, k^4❩, k, 1, 100)
 ⎛   100    ⎞
⎜   5050   ⎟
e⎜  338350  ⎟
⎜ 25502500 ⎟
⎝2050333330⎠


And here is a product:

∏(1 − 1/prime(n)^2, n, 1, 100000)
0.607927132988

Hint: To type the n-ary product symbol, ∏, type “\product” followed by space or a punctuation character. In this case, ( will do.

Hint: Instead of ∏, you may also use the synonym product.