0
$\begingroup$

I am having trouble with Mathematicas Solve function. A simple example like this cannot be solved (it basically evaluates the cell forever):

Solve[(x-b)==c (x-b)^(1/a),x]

However, this expression can be readily evaluated by Mathematica:

Solve[(x)==c (x)^(1/a),x]

Once I give extra conditions to the Solve function, it throws an error message that "This system cannot be solved with the methods available to Solve.". For example this one:

Solve[(x-b)==c (x-b)^(1/a) && x!=b,x]

Trying Reduce basically also evaluates the expressions forever. I know I could just solve it by hand, but I'd like to write a bit of automated code for solving certain problems. Is there any way to tell Mathematica that this is indeed solvable? Many thanks!

$\endgroup$
3
$\begingroup$

As often happens, if you help out a bit, your equations can be solved. Recognizing that problems involving powers can often be solved using Logs, try:

Solve[ApplySides[Log, (x - b) == c (x - b)^(1/a)], x]
{x -> b + c^(a/(-1 + a))}

which is the answer you might expect if all the variables had suitable (real and positive) values.

$\endgroup$
  • $\begingroup$ -1. The equation after logarithming is not equivalent to the original equation. $\endgroup$ – user64494 Nov 22 '19 at 19:28
  • $\begingroup$ What answer do you think the OP would have come up with when stating "I know I could just solve it by hand"? My guess is {x -> b + c^(a/(-1 + a))}, which is what this gives. $\endgroup$ – bill s Nov 22 '19 at 22:46
  • $\begingroup$ Ah, interesting, I didn't know one could do these kind of transformations. That does the trick! Of course, one should always keep in mind in which domain the parameters are defined. (I should have added that to the original question, sorry!) $\endgroup$ – jabberwocky Nov 23 '19 at 11:56
2
$\begingroup$

This is not a simple equation. By default, x, a, b, c are treated as complexes and (x - b)^(1/a) is a many-valued (infinitely-valued for some values of the parameters ) expression. Even over the reals, three parameters are too much.

The following work:

Reduce[(y) == c y^(1/a), y, Reals]

(a > 0 && y == 0) || (1/2 (1 - (-1 + a)/a) [Element] Integers && c < 0 && ((a < 0 && y == -(-c)^((a/(-1 + a)))) || (0 < a < 1 && y == -(-c)^((a/(-1 + a)))) || (a > 1 && y == -(-c)^((a/(-1 + a)))))) || (a == 1 && c == 1 && y < 0) || (-((-1 + a)/(2 a)) [Element] Integers && ((a < 0 && c > 0 && y == -c^((a/(-1 + a)))) || (0 < a < 1 && c > 0 && y == -c^((a/(-1 + a)))) || (a > 1 && c > 0 && y == -c^((a/(-1 + a)))))) || (a == 1 && c == 1 && y > 0) || (a < 0 && c > 0 && y == (1/c)^(-(a/(-1 + a)))) || (0 < a < 1 && c > 0 && y == (1/c)^(-(a/(-1 + a)))) || (a > 1 && c > 0 && y == (1/c)^(-(a/(-1 + a))))

and

Solve[(y) == c y^(1/a), y, Reals]

{{y -> ConditionalExpression[0, a > 0]}, {y -> ConditionalExpression[(1/c)^(-( a/(-1 + a))), (0 < a < 1 && c > 0) || (a > 1 && c > 0) || (a < 0 && c > 0)]}, {y -> ConditionalExpression[-(-c)^(( a/(-1 + a))), (1/2 (1 - (-1 + a)/a) [Element] Integers && 0 < a < 1 && c < 0) || (1/2 (1 - (-1 + a)/a) [Element] Integers && a > 1 && c < 0) || (1/2 (1 - (-1 + a)/a) [Element] Integers && a < 0 && c < 0)]}, {y -> ConditionalExpression[-c^(( a/(-1 + a))), (-((-1 + a)/(2 a)) [Element] Integers && 0 < a < 1 && c > 0) || (-((-1 + a)/(2 a)) [Element] Integers && a > 1 && c > 0) || (-((-1 + a)/(2 a)) [Element] Integers && a < 0 && c > 0)]}}

Addition. The command

Solve[(y) == c y^(1/a), y]

performs

{{y -> c^(1/(1 - 1/a))}}

and an error communication "Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information ", but

Reduce[(y) == c y^(1/a), y]

is spinning.

$\endgroup$
  • $\begingroup$ I know, the parameters are complex by default. The more surprised I was that the "simple" version of the problem could be easily solved. Once I specified the problem like this, Solve[(x)==c (x)^(1/a)&&0<a<1&&c>0&&x>0,x], Mathematica again goes into one of its neverending odysseys... $\endgroup$ – jabberwocky Nov 23 '19 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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