0
$\begingroup$

I am trying to solve analytically a non-linear system of equations:

Ec1 = A + 2*pvz*Ezmiss - 2*El*Sqrt[Etmiss^2 + Ezmiss^2 + mmiss^2];
Ec2 = B - mmiss^2 + 2*pvz*Ezmiss - 2*Evis*Sqrt[Etmiss^2 + Ezmiss^2 + mmiss^2];
sol = FullSimplify[Solve[Ec1 == 0 && Ec2 == 0, {Ezmiss, mmiss}]]

Mathematica returns four solutions, but I think they are not correct. I have solved the system with SymPy python package and I have also obtained numerical solutions for the system, and both do not coincide with the solution that Mathematica gives me. Am I doing something wrong? Can I simplify things so that Mathematica works better with the system?

$\endgroup$
4
  • $\begingroup$ Do you have any assumptions on the free parameters? Are they real numbers? Positive? Often you get better results if you specify constraints like these. $\endgroup$ Commented Oct 5, 2020 at 8:13
  • 2
    $\begingroup$ The problem comes from the fact, that MMA does not simplify x-Sqrt[x^2]. First in MMA all variables, unless told otherwise, are assumed to be complex. Second, Sqrt is a double valued function. If you specify x to be real, MMA only simplifies to: x - Abs[x] what may not always be what you want. You may use PowerExpand, it assumes that all variables are real numbers. $\endgroup$ Commented Oct 5, 2020 at 8:27
  • $\begingroup$ For specific sets of parameter values, one or more solutions may work with others being parasites. But which ones work will, typically, depend on the parameter values. $\endgroup$ Commented Oct 5, 2020 at 12:43
  • $\begingroup$ What are the numerical solutions and SymPy solutions you want to obtain in mathematica? $\endgroup$
    – Coolwater
    Commented Oct 5, 2020 at 14:45

1 Answer 1

1
$\begingroup$

First to facilitate things, make mmiss2 = mmiss^2 and then

Ec1 = A + 2*pvz*Ezmiss - 2*El*Sqrt[Etmiss^2 + Ezmiss^2 + mmiss2];
Ec2 = B - mmiss2 + 2*pvz*Ezmiss - 2*Evis*Sqrt[Etmiss^2 + Ezmiss^2 + mmiss2];
sol = Solve[{Ec1 == 0, Ec2 == 0}, {Ezmiss, mmiss2}, Reals]

The solution is conditional because depending on the values for

{A, B, El, Etmiss, Evis, pvz}

the result could not be real ...

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.