1
$\begingroup$

I have three equations involving $x$, $y$, and $z$ that I would like to find a unique solution to, in the Reals.

NSolve does not find anything:

NSolve[{Sqrt[1 / (x^4)] == Sqrt[1 /((y^3) z )], 
  Sqrt[1 / (x^4)] == Sqrt[(1/x^4 + 1 /( y z^3))], 
  Sqrt[1 /( (y^3) z )] == Sqrt[(1 /x^4 + 1 /(y z^3))]}, {x, y, 
  z}, Reals]

which seems confirmed by a CountourPlot3D which shows no intersection:

ContourPlot3D[{Sqrt[1 / (x^4)] == Sqrt[1 /((y^3) z )], 
  Sqrt[1 / (x^4)] == Sqrt[(1/x^4 + 1 /( y z^3))], 
  Sqrt[1 /( (y^3) z )] == Sqrt[(1 /x^4 + 1 /(y z^3))]}, {x, 0, 
  100}, {y, 0, 100}, {z, 0, 100}, PlotLegends -> "Expressions"]

enter image description here

Question: is there a way to find "approximate" solutions, specifying an accuracy range within which a solution could be? I.e. a particular (x,y,z) combo obviously doesn't give 0 to one of my equations, but maybe gives 0.1 and that'd be good enough...

$\endgroup$

1 Answer 1

3
$\begingroup$
Clear["Global`*"]

Reformulate as a minimization problem

expr = Subtract @@@ {Sqrt[1/(x^4)] == Sqrt[1/((y^3) z)], 
   Sqrt[1/(x^4)] == Sqrt[(1/x^4 + 1/(y z^3))], 
   Sqrt[1/((y^3) z)] == Sqrt[(1/x^4 + 1/(y z^3))]}

(* {Sqrt[1/x^4] - Sqrt[1/(y^3 z)], 
 Sqrt[1/x^4] - Sqrt[1/x^4 + 1/(y z^3)], -Sqrt[1/x^4 + 1/(y z^3)] + Sqrt[1/(
  y^3 z)]} *)

Minimizing the sum of the squares

{min, arg} = 
 NMinimize[Join[{Total[expr^2]}, Thread[0 <= {x, y, z} <= 100]], {x, y, z},
  Method -> "DifferentialEvolution",
  WorkingPrecision -> 17]

(* {1.2736005375588001*10^-9, {x -> 44.219798564468166, y -> 32.928582883862153, 
  z -> 99.999999784859630}} *)

expr /. arg

(* {-0.0000178183282646516, -0.0000288761531935047, -0.0000110578249288531} *)
$\endgroup$
1
  • $\begingroup$ Note that increasing the allowed range of x,y,z seems to reliably yield a solution of the form $x \approx 0.4 z, y \approx 0.3 z$, and $z$ maxed out within the allowed range. Doing so also decreases the value of min. There's probably a way to prove this analytically, but I don't see it immediately. $\endgroup$ Nov 23, 2021 at 19:32

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.