# How to get $x$ in terms of $y$ and $w$ from $w = a p x^{p-1} \left(a x^p+b y^p\right)^{\frac{1}{p}-1}$

I'm having trouble to solve the following equation for $x$ both manually and in Mathematica:

$\quad \quad w = a p x^{p-1} \left(a x^p+b y^p\right)^{\frac{1}{p}-1}$

In Mathematica notation:

w == (((a (x^p) + b (y^p))^((1/p) - 1))*p*a*(x^(p - 1)))

-

The various powers involving p serve to bury the x too deep to be able to solve for it without additional assumptions. To make the job of specifying such assumptions easier, I'll introduce an auxiliary variable z. First I solve for z, which requires only two additional assumptions to allow Solve to invert the powers. The result is stored in zSolution. Then I recover x:

Clear[z, w, a, p, b, y];

x = z^(1/p);

zSolution =
First@Solve[
Simplify[
w == ((((a (x^p) + b (y^p))^((1/p) - 1))*p*a*(x^(p - 1)))),
Assumptions -> p > 0 && z > 0], z]

Solve::ifun :  "Inverse functions are being used by ...

(*
==> {z -> -((b (w/(a p))^(p/(-1 + p)) y^p)/(-1 + a (w/(a p))^(p/(-1 + p))))}
*)

x /. zSolution

(*
==> (-((b (w/(a p))^(p/(-1 + p)) y^p)/(-1 + a (w/(a p))^(p/(-1 + p)))))^(1/p)
*)


The reason I chose to replace x = z^(1/p) is that the new equation in z removes the powers x^p, so you have to worry about fewer exponents in the calculation.

If you want to do this manually, it's arguably easier than the Mathematica approach as long as you don't worry about the assumptions: You'll notice that if you bring the lone factor x^(p - 1) into the large parenthesis, it cancels the x that's already there in one term, and adds a 1/x in the other term. That leaves x only in one spot, and you can invert for x.

-

Factor x^p out of the last term to get

 w == a p (a + b (y/x)^p)^(1/p-1)


then use

Eliminate[{{w == a p (a + b z^p)^(1/p - 1), z == y/x}}, z]


to get

((-a + ((a p)/w)^(p/(-1 + p)))/b)^(1/p) == y/x && x != 0


$\left(\frac{\left(\frac{a p}{w}\right)^{\frac{p}{p-1}}-a}{b}\right)^{\frac{1}{p}}=\frac{y}{x}\land x\neq 0$

-