Mathematica can find indefinite integrals (anti-derivatives).  One has to be aware that the anti-derivative is in fact a family of the constant shifts of the function that Mathematica calculates.

Integrate[Exp[x^2],x]

In this case an anti-derivative is a special function that is not studied in pre-calculus.

However, it is not difficult to make a slightly more complicated function for which Mathematica does not know an anti-derivative.

Integrate[Exp[Sin[x^2]],x]

Nor, it knows a definite integral involving this function.

Integrate[Exp[Sin[x^2]],{x,0,1}]

However, there is a function in Mathematica which gives a good estimate for the above definite integral.

NIntegrate[Exp[Sin[x^2]],{x,0,1}]

Plot[Exp[Sin[x^2]],{x,0,1},PlotRange->{0,2.5}]

Below I illustrate how to obtain good numerical estimates for the abov definite integral using Riemann sums.

For convenience, we  first we define the function ff

ff[x_]:=Exp[Sin[x^2]]

These are Left and Right and Middle Riemann sum of this function

nn=100; Lef=N[Sum[ff[(j/nn)]*(1/nn),{j,0,nn-1}]];Rig=N[Sum[ff[(j/nn)]*(1/nn),{j,1,nn}]];Mid=N[Sum[ff[(j/nn)+(1/(2 nn))]*(1/nn),{j,0,nn-1}]];

{Lef,Mid,Rig}

The trapezoidal approximation of this definite integral

Tra=((Lef+Rig)/2)

{Lef,Mid,Tra,Rig}

The following is the approximation based on the Simpson’s rule

Sim=((Tra+2 Mid)/3)

{Lef,Mid,Sim,Tra,Rei}

A comment about the exact values vs. approximations

N[Pi]

N[Pi,12]

N[Cos[Pi/5]]

FullSimplify[Cos[Pi/5]]