1
$\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 Answers 3

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$
3
  • $\begingroup$ -1. The equation after logarithming is not equivalent to the original equation. $\endgroup$
    – user64494
    Nov 22, 2019 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, 2019 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$ Nov 23, 2019 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$
1
  • $\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$ Nov 23, 2019 at 12:02
0
$\begingroup$

Another way, change variables first.

eq = x - b == c (x - b)^(1/a) /. x - b -> xb
{*  xb == c xb^(1/a)  *}

Solve[eq, xb] // Flatten // Simplify;

xb = xb /. %
{*  c^(a/(a - 1))  *}

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

Of course we are making assumptions about x-b being positive and a-1!=0 which I am surprised that Mathematica did not point out as picky as version 13 is about Solve.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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