Numerical Calculations
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:
You can even use standard symbolic operations on it:
N [expr] gives you a numerical approximation:
Functions such as 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 N . Functions such as 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:
You can use N to get an approximate numerical result:
NIntegrate does the integral numerically from the start: