# FindInstance on a system with three variables keeps evaluating

I have been trying to find a set of parameters for a function that fit some constraints.

FindInstance[
-a*PDF[NormalDistribution[24, σ], 1] + b == 20 &&
-a*PDF[NormalDistribution[24, σ], 24] + b == 3 &&
Total[Table[-a*PDF[NormalDistribution[24, σ], x] + b, {x, 47}]] == 350,
{a, σ, b}, Reals]


I am trying to solve for a function in the form of

-a*PDF[NormalDistribution[24., σ], x] + b


with the following constraints:

-a*PDF[NormalDistribution[24., σ], 1] + b == 20
-a*PDF[NormalDistribution[24., σ], 24] + b == 3
Total[Table[-a*PDF[NormalDistribution[24, σ], x] + b, {x, 47}]] == 350


The cell has been evaluating for 26 hours and still hasn't given me a result. Could you please guide me on how to edit the code to give me a faster result?

• Seems an XY problem perhaps.
– ciao
Commented Aug 12 at 22:58

\$Version

(* "14.1.0 for Mac OS X ARM (64-bit) (July 16, 2024)" *)

Clear["Global*"]

sol1 = NSolve[{
-a*PDF[NormalDistribution[24, σ], 1] + b == 20,
-a*PDF[NormalDistribution[24, σ], 24] + b == 3,
Total[Table[-a*PDF[NormalDistribution[24, σ], x] + b, {x, 47}]] ==
350, σ > 0}, {a, b, σ}, Reals, WorkingPrecision -> 50]

(* {} *)


There is no solution. Reformulate as a minimization.

obj = Total[(SubtractSides[{
-a*PDF[NormalDistribution[24, σ], 1] + b == 20,
-a*PDF[NormalDistribution[24, σ], 24] + b == 3,
Total[
Table[-a*PDF[NormalDistribution[24, σ], x] + b, {x, 47}]] ==
350}][[All, 1]])^2];


The approximate solution is then

sol2 = N[NMinimize[{obj, σ > 0}, {a, b, σ},
WorkingPrecision -> 50,
`