Mathematica Asked by JHT on August 6, 2021
When trying to plot the following function in version 12.2
f[x_]:=x Exp[-x^2]
F[y_]:=NIntegrate[Sign[f[x]]Sqrt[((f[x])^2)/(f[x]+1)],{x,0,y}];
Plot[F[x],{x,-5,5}]
this message appears.
It happens also when using RealSign
. Does that occur in other versions as well, or just for me?
It does not occur if I change the definition a little and use f[x_?NumericQ] = x Exp[-x^2]
.
NumericQ
work.
f[x_] = x Exp[-x^2]
F[y_?NumericQ] :=
NIntegrate[Sign[f[x]] Sqrt[((f[x])^2)/(f[x] + 1)], {x, 0, y}];
Plot[F[x], {x, -5, 5}]
Or
Clear[f, G];
f[x_] = x Exp[-x^2];
NDSolve[{G'[x] == Sign[f[x]] Sqrt[((f[x])^2)/(f[x] + 1)], G[0] == 0},
G[x], {x, -5, 5}]
Plot[G[x] /. %, {x, -5, 5}]
Answered by cvgmt on August 6, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP