# Interactive variation of integration limit

I want to compute this function for different values of Kappa, so that I don't have to change Kappa manually. Some kind of Manipulate expression.

Integralfunc[t_] :=
NIntegrate[a^-2(Exp[-1/a^2]*BesselI[0, 1/a^2], {a, 0. 02, Kappa*t}]
SetAttributes[Integralfunc, Listable]
DeFunc = IntegralFunc[Range[0.1, 250, 1.25]]
ListPlot[DeFunc, PlotStyle Red]

• Why not just Integralfunc[t_, Kappa_] := NIntegrate[a^-2 (E^(-1/a^2))*BesselI[0, 1/a^2], {a, 0.02, Kappa*t}]? Then you can, for example, Integralfunc[47, 23] which gives 2.36619. You can make a Table of the values or plot it with, e.g., Plot3D[Evaluate@Integralfunc[t, k], {t, 0.1, 10}, {k, 1, 15}, PlotRange -> All]. Or, if you insist on a Manipulate: Manipulate[Integralfunc[t, k], {t, 0.1, 250, 1.25}, {k, 1, 100}]. – corey979 Nov 20 '16 at 17:36
• You are trying to numerically integrate to a variable, that doesn't make sense. – Feyre Nov 20 '16 at 17:37
• Actually If I change the value of Kappa manually, than there is an answer for this problem, But I want to change Kappa like in Manipulate Function. – Amanullah Malik Nov 20 '16 at 17:37
• @AmanullahMalik corey's comment allows you to do that, then you can just run Manipulate[Integralfunc[t, k], {t, 0.1, 10, 0.1}, {k, 1, 15}]. – Feyre Nov 20 '16 at 17:40
• actually fact is for a certain value of kappa graph is in our favor it coulb be any value in an interva – Amanullah Malik Nov 20 '16 at 17:42

ClearAll[Integralfunc, DeFunc]


Functions that directly or indirectly use numeric techniques should have their arguments restricted to numeric values.

IntegralFunc[t_?NumericQ, Kappa_?NumericQ] :=

NIntegrate[a^-2 (E^(-1/a^2))*BesselI[0, 1/a^2],
{a, 0.02, Kappa*t}];

DeFunc[Kappa_?NumericQ] :=
IntegralFunc[#, Kappa] & /@ Range[0.1, 250, 1.25]


Use a fixed PlotRange to make it easier to see the effect of changing Kappa

Manipulate[
ListPlot[DeFunc[Kappa],
PlotStyle -> Red,
PlotRange -> {2.3, 2.37}],
{{Kappa, 5}, 1, 10, .01, Appearance -> "Labeled"}]