I trt to get Mathematica getting me the simple solutions for x and y from this system of two power equations:

$$\text{Eq. 1: } z=x^{m}y^{n}$$ $$\text{Eq. 2: }z=\tau x^{m-1}y^{1-n},$$

The simple solutions are

$$x=\left(z^{1-2n}\tau^{-n}\right)^{\frac{1}{n-2nm+m}}$$ $$y=\left(z\tau^{m}\right)^{\frac{1}{n-2nm+m}},$$

but I cannot make Mathematica find them. Entering in Mathematica

Solve[z == x^m y^n && z == \[Tau] x^(m - 1) y^(1 - n), {x, y}]

or, e.g.,

FullSimplify[Solve[z == x^m y^n && z == \[Tau] x^(m - 1) y^(1 - n), {x, y}]]

I get back

x -> E^((-Log[z] + 2 n Log[z] - n Log[\[Tau]])/(-m - n + 2 m n)), 
y -> E^((-Log[z] + m Log[\[Tau]])/(-m - n + 2 m n))

that is,

$$x\to e^{\frac{-n \log (\tau )+2 n \log (z)-\log (z)}{2 m n-m-n}},y\to e^{\frac{m \log (\tau )-\log (z)}{2 m n-m-n}}.$$

Why does even FullSimplify (or Simplify) not give me back the simple solution?

Even after imposing the simple result, i.e. defining

x = (z^(1 - 2 n) \[Tau]^-n)^(1/(n - 2 n m + m)); y = (z\[Tau]^m)^(1/(n - 2 n m + m));

Mathematica doesn't tell confirm to me that the difference between the LHS and the RHS of Equation 1,

x^m y^n - z

is zero:

FullSimplify[x^m y^n - z]


-z + ((z\[Tau]^m)^(1/(m + n - 2 m n)))^n ((z^(1 - 2 n) \[Tau]^-n)^(1/(m + n - 2 m n)))^m

This is easily seen to be zero, but it puzzles me that Mathematica doesn't tell me that.

  • $\begingroup$ For some reason TrigFactor does the trick. $\endgroup$
    – rhermans
    Commented Sep 5, 2014 at 9:58
  • 1
    $\begingroup$ My guess would be that it doesn't know what kind of values those symbols are allowed to take, and so attempts to give you solutions for complex valued choices. Simplifying as you want would then kill off possibilities, and so be wrong. Did you try adding Assumptions to see what happens? $\endgroup$
    – Zibadawa
    Commented Sep 5, 2014 at 11:25
  • $\begingroup$ What about $\left\{x\to \left(z^{1-2 n}\tau ^n \right)^{\frac{1}{-2 m n+m+n}},y\to \left(z \tau ^{-m}\right)^{\frac{1}{-2 m n+m+n}}\right\}$? It is obtained from Mathematica's solution by replacing $\log(z)\to\log(z)+2\pi m i$ and $\log(\tau)\to\log(\tau)+2\pi i$. This is a good indication that you cannot ignore the branch structure of the logarithm and therefore of the complex roots. $\endgroup$ Commented Sep 5, 2014 at 14:27

1 Answer 1


Mathematica will not always give you answers the way you want it. Sometimes a little bit of massaging needs to be done. In this case let's define some rules:

logrule = {Log[x_] + Log[y_] :> Log[x y], n_ Log[x_] :> Log[x^n]}

expr = Solve[z == x^m y^n && z == \[Tau] x^(m - 1) y^(1 - n), {x, y}];


expr //. logrule

Mathematica graphics

You can also use FullSimplify with a TransformationFunction instead of ReplaceRepeated (//). We define the function:

tf[x_] := x /. logrule

Which we can use as:

FullSimplify[expr, TransformationFunctions -> {Automatic, tf}]

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.