Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to solve the following equation with respect to x.

eqn = x^z + y == a;

But when I do

Reduce[eqn,x]

mathematica doesn't solve at all. I guess this is because of symbolic expression in powers. If I replace z into some numeric values, mathematica works immediately.

I was wondering what I am missing with this.

share|improve this question
3  
Try adding Reals as the domain in Reduce. –  Szabolcs May 24 '12 at 15:17
    
What I want to get is general expression x=(a-y)^(1/z) –  John Shin May 24 '12 at 15:30
1  
Is there any other function that could yield x=(a-y)^(1/z) ??? –  John Shin May 24 '12 at 15:36
2  
Assuming, $x\text{,}y\text{,}z\in\mathbb{R}$ then another acceptable solution is $|x|>0$ when $z=0$ and $y=a-1$. So is $x=0$ and $y=a$ when $z>0$. –  rcollyer May 24 '12 at 15:44
5  
Solve, which is less concerned with being wrong* than Reduce, will in fact give (a-y)^(1/z). *By wrong I do not mean it did something wrong, but simply that the result could be invalid once some actual values are plugged into the parameters. This generally comes about from branch cuts that cannot be computed until parameters receive actual values. –  Daniel Lichtblau May 24 '12 at 17:41
show 1 more comment

1 Answer

I tested both suggested answers.

eqn = x^z + y == a;  
Reduce[eqn, x, Reals]

Gives the output:

(z > 0 && y == -0^z + a && x == 0) || (y == -1 + a && z == 0 && 
   x < 0) || ((z/2 | C[1]) \[Element] 
    Integers && ((C[1] <= -1 && y < a && z == C[1] && 
       x == -(a - y)^((1/z))) || (C[1] >= 1 && y < a && z == C[1] && 
       x == -(a - y)^((1/z))))) || (((1 + z)/2 | C[1]) \[Element] 
    Integers && 
   y > a && ((C[1] <= -1 && z == C[1] && 
       x == -(-a + y)^((1/z))) || (C[1] >= 1 && z == C[1] && 
       x == -(-a + y)^((1/z))))) || (y == -1 + a && z == 0 && 
   x > 0) || (z != 0 && y < a && x == (a - y)^(1/z))

Where as

eqn = x^z + y == a;  
Solve[eqn, x]

Gives the output:

{{x -> (a - y)^(1/z)}}

So either method will return the answer you want, though Solve[] seems to give the particular format that your looking for.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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