Numerical Mathematics in the Wolfram Language

One of the important features of the Wolfram Language is its ability to give you exact, symbolic results for computations. There are, however, computations where it is just mathematically impossible to get exact "closed form" results. In such cases, you can still often get approximate numerical results.

There is no "closed form" result for (∫_0^1)sin(sin(x))dx. The Wolfram Language returns the integral in symbolic form:

Integrate[Sin[Sin[x]],{x,0,1}]

You can now take the symbolic form of the integral and ask for its approximate numerical value:

N[%]

When the Wolfram Language cannot find an explicit result for something like a definite integral, it returns a symbolic form. You can take this symbolic form and try to get an approximate numerical value by applying (RefLink[N, paclet:ref/N]).

By giving a second argument to (RefLink[N, paclet:ref/N]), you can specify the numerical precision to use:

N[Integrate[Sin[Sin[x]],{x,0,1}],40]

If you want to evaluate an integral numerically in the Wolfram Language, then using (RefLink[Integrate, paclet:ref/Integrate]) and applying (RefLink[N, paclet:ref/N]) to the result is not the most efficient way to do it. It is better instead to use the function (RefLink[NIntegrate, paclet:ref/NIntegrate]), which immediately gives a numerical answer, without first trying to get an exact symbolic result. You should realize that even when (RefLink[Integrate, paclet:ref/Integrate]) does not in the end manage to give you an exact result, it may spend a lot of time trying to do so.

(RefLink[NIntegrate, paclet:ref/NIntegrate]) evaluates numerical integrals directly, without first trying to get a symbolic result:

NIntegrate[Sin[Sin[x]],{x,0,1}]

Symbolic and numerical versions of some Wolfram Language functions.