I've been posting some questions all around issues with defining and using variables/functions in Mathematica. Based on the answers/comments I got I still cannot make this simple code work... Why is this not working?
d1 = 50;
u22 = 1;
s22 = u22*0.25;
d2 = 1;
p2=1;
F = 0.95;
FS22[x_] :=
CDF[GumbelDistribution[u22 - EulerGamma*s22*6^0.5/Pi, s22*6^0.5/Pi],
x];
FS2[x_?NumericQ] := ((1 - p2)*UnitStep[x] + p2*FS22[x])^(d1/d2);
NSolve[F == FS2[x], x, Reals]
Result:
Out[1056]= NSolve[0.95 == FS2[x], x, Reals]
Another try:
NSolve[
F == ((1 - p2)*UnitStep[x] +
p2*CDF[GumbelDistribution[u22 - EulerGamma*s22*6^0.5/Pi,
s22*6^0.5/Pi], x])^(d1/d2), x, Reals]
Result:
Out[1057]= {{x -> 1.2635}}
FS2[x]-Fagrees with the result. – Bill Watts Mar 02 '20 at 23:39NSolve[0.95 == FS2[x], x, Reals]Do you have any option activated or something that it can justify these different results? I just installed Mathematica yesterday... – jpcgandre Mar 03 '20 at 00:10