Skip to main content
2 of 4
added 558 characters in body
Ulrich Neumann
  • 61.8k
  • 2
  • 29
  • 66

Alternatively to MichaelE2's interesting answer you might use

  • 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.1934910^-17, {q -> 0.530368, m -> 6.3477810^-9}})

addendum

  • or FixedPointList

    intqm =. intqm[q_?NumericQ, m_?NumericQ] := { 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"], 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"]} FixedPointList[Apply[intqm, #] &, {1, 1}, 15]

Both results agree well with MichaelE2's answer!

Ulrich Neumann
  • 61.8k
  • 2
  • 29
  • 66