I'm a beginner. I would like to draw the plot of a certain function $f(n)$, n=1,2,...
Specifically, my function is
$$\int_0^\infty\left(\frac12 + \frac12\cdot\mathrm{erf}(x/\sqrt 2)\right)^n \exp(-x^2) \mathrm{d}x $$
Thanks!
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityYou need DiscretePlot
, NIntegrate
, how to define a function (in terms of n
), and avoiding premature evaluation with NIntegrate.
f[n_?NumericQ] :=
NIntegrate[(1/2 + 1/2 Erf[x/Sqrt[x]])^n Exp[-x^2], {x, 0, Infinity}]
DiscretePlot[f[n], {n, 0, 10}, PlotRange -> {0, 1}]
DiscretePlot
,NIntegrate
, how to define a function (in terms ofn
), and avoiding premature evaluation with NIntegrate $\endgroup$