Numerical Calculations

Exact symbolic results are usually very desirable when they can be found. In many calculations, however, it is not possible to get symbolic results. In such cases, you must resort to numerical methods.

Basic numerical operations.

The Wolfram Language maintains this expression in an exact, symbolic form:

(3+Sqrt[2])^3

You can even use standard symbolic operations on it:

Expand[%]

(RefLink[N, paclet:ref/N])[expr] gives you a numerical approximation:

N[%]

Functions such as (RefLink[Integrate, paclet:ref/Integrate]) always try to get exact results for computations. When they cannot get exact results, they typically return unevaluated. You can then find numerical approximations by explicitly applying (RefLink[N, paclet:ref/N]). Functions such as (RefLink[NIntegrate, paclet:ref/NIntegrate]) do the calculations numerically from the start, without first trying to get an exact result.

There is no exact formula for this integral, so the Wolfram Language returns it unevaluated:

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

You can use (RefLink[N, paclet:ref/N]) to get an approximate numerical result:

N[%]

(RefLink[NIntegrate, paclet:ref/NIntegrate]) does the integral numerically from the start:

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