I have a function $f : \mathbb{R} \rightarrow \mathbb{R}^3$ defined in a rather nasty way in mathematica however it's a smooth function and what not. I am interested in $f'[t]$ and when I run it through ParametricPlot3D, it shows me what I expect it to look like.
When I try run $f'[t]$ or $f[t]$ through NIntegrate however, I always get a NIntegrate::inumr error saying the integrand has evaluated to non-numerical values.
What could be the cause of this, why is it that something I can ParametricPlot3D and also manually set up a numerical integration function for isn't working for NIntegrate?
Thanks in advance.
Additional information:
FF[t_] = Sqrt[d2 E^(- 0.2 t) + d1 E^(0.2 t) - (b5 / (2 * 0.01))]
GG[s_] := -NIntegrate[Sqrt[d2 E^(- 0.2 t) + d1 E^(0.2 t) - (b5 / (2 * 0.01))], {t, 0, s}]
Asym[t_?NumericQ] := FF[t] * {1, 0, 0} - (Sqrt[0.01 b5 + c5])/(FF[t]^2 )
{0, Cos[GG[t] + Arg[beta5] + Pi], Sin[GG[t] + Arg[beta5] + Pi]}
Everything else is just a real number (beta5 a complex number but Arg[beta5] is a number)
Both of these work fine (I see a nice smooth curve each time):
ParametricPlot3D[Asym[t], {t, 0, 1}]
ParametricPlot3D[Asym'[t], {t, 0, 1}]
Neither of these work:
NIntegrate[Norm[Asym'[t]], {t, 0, 1}]
NIntegrate[Norm[Asym[t]], {t, 0, 1}]
If I calculate the following, it shows me a value for the first entry but not the second two entries implying it is the GG[t] stuffing things up seeing as GG[t] is not used in the first entry of Asym[t] at all.
NIntegrate[Asym[t], {t, 0, 1}]
t_?NumericQ
. $\endgroup$t
in NIntegrate gets captured. Can repair either by also havingGG[s_?NumericQ] := ...
or else by defining it with its ownt
, via GG[s_] := Module[{t}, -NIntegrate[ Sqrt[d2 E^(-0.2 t) + d1 E^(0.2 t) - (b5/(2*0.01))], {t, 0, s}]]. I will add that such questions are more easily answered if all code is provided, in this case that would include assignments ford2
,b5
, etc. $\endgroup$