Alternatively to MichaelE2's interesting answer you might use
NMinimize
- `NMinimize` J[q_?NumericQ, m_?NumericQ] := # . # &[{q - NIntegrate[ 1/Sqrt[2 Pi] Exp[-z^2/ 2] Tanh[ (Sqrt[q] z + 1/2 m)/(1/2) ]^2, {z, -Infinity, -10, 10, Infinity}, Method -> "GlobalAdaptive"], m - NIntegrate[ 1/Sqrt[2 Pi] Exp[-z^2/ 2] Tanh[ (Sqrt[q] z + 1/2 m)/(1/2)], {z, -Infinity, -10, 10, Infinity}, Method -> "GlobalAdaptive"]}] NMinimize[ Re@J[q, m], {q, m}] // Quiet (*{1.19349*10^-17, {q -> 0.530368, m -> 6.34778*10^-9}}*) addendum
or FixedPointList
- `FixedPointList` intqm[q_?NumericQ, m_?NumericQ] := { NIntegrate[1/Sqrt[2 Pi] Exp[-z^2/2] Tanh[ (Sqrt[q] z + 1/2m)/(1/2)]^2, {z, -Infinity, -10, 10, Infinity}, Method -> "GlobalAdaptive"], NIntegrate[1/Sqrt[2 Pi] Exp[-z^2/2] Tanh[ (Sqrt[q] z + 1/2m)/(1/2)],{z, -Infinity, -10, 10, Infinity}, Method -> "GlobalAdaptive"]} FixedPointList[Apply[intqm, #] &, {1, 1}, 15] (*{..., {0.530368, 0.0000164061}, {0.530368, 7.70484*10^-6}}*) Both results agree well with MichaelE2's answer!