5
$\begingroup$

Part 1

I am trying to solve a simple system of equations as follows

Solve[{A x^B == f, A y^B == g}, {A, B}]

But I just get the error

Solve::nsmet: This system cannot be solved with the methods available to Solve. >>

I also tried

Reduce[{A x^B == f, A y^B == g}, {A, B}]

to no avail as it lead to an endless evaluation!

I know that in such cases

1- It is a matter of assumptions or conditions that may have not been given to the solver in order to find the solution!

2- Or simply, Solve doesn't know how to solve the equation symbolically due to complexity.

However, I couldn't find any useful assumptions to pass to Mathematica or any complexity. Also, I got excited when I saw that Maple just solved it without any assumptions needed as the following picture shows.

So, what is going on here? :)

Any help is appreciated.

enter image description here


Part 2

I made some progress that is indicated in my answer below. So, please read it before looking to the questions of this part.

The following questions still remained unanswered to me!

1- Why the command

 Reduce[{A x^B == f, A y^B == g}, {A, B}]

does not work here?

2- Why I just cannot get the solution in Real domain by the following command?

 Solve[{A x^B == f, A y^B == g}, {A, B},Reals,MaxExtraConditions -> Automatic]
$\endgroup$
  • $\begingroup$ Trying to plug in some values indicates the Maple solution isn't correct. $\endgroup$ – Feyre Jul 3 '16 at 16:29
  • $\begingroup$ @Feyre: It seems right to me as I obtained the same result of Maple by hand unless there may be fundamental error! :) $\endgroup$ – H. R. Jul 3 '16 at 16:33
  • $\begingroup$ The numbers I tried did not fulfil reduce constraints as provided by @halirutan $\endgroup$ – Feyre Jul 3 '16 at 16:41
  • $\begingroup$ Why does this have a bugs tag? $\endgroup$ – J. M. is away Jul 4 '16 at 15:22
7
$\begingroup$

I think that that the key feature is to use the MaxExtraConditions option for the Solve command.

In elaborate answer of Artes in here, a very very nice presentation is referred. It is entitled as Getting the Most from Algebraic Solvers in Mathematica by Adam Strzeboński. You can download the .cdf file of the presentation which is really helpful. Slide $10$ to $12$ are the ones that exactly discuss this issue.

I think beginners like me will find the answer of the following questions in that representation

1- What is the difference between Reduce and Solve command?
2- What are generic and complete solutions?
3- What are parameters and variables?
4- Why Solve and Reduce command do not accept assumptions on the parameters?

Finally, with the help of the presentation, I found that the command

Solve[{A x^B == f, A y^B == g}, {A, B},MaxExtraConditions -> Automatic]

will give the result.

enter image description here

Also you can just take the Real domain solution by

 Normal[Solve[{A x^B == f, A y^B == g}, {A, B}, MaxExtraConditions -> Automatic]] /. {C[1] -> 0}

enter image description here

$\endgroup$
  • 1
    $\begingroup$ Wow, very good find! I find this option quite counterintuitive. When setting it to Infinity or a number, we get no answer. But setting it to All or Automatic does give an answer. $\endgroup$ – Szabolcs Jul 4 '16 at 8:18
  • $\begingroup$ @Szabolcs: Thanks. :) But Still I didn't get satisfied as I don't know the answer of questions in Part 2. Can you kindly think about them and let me know if you got anything. :) $\endgroup$ – H. R. Jul 4 '16 at 8:20
  • 1
    $\begingroup$ I don't know. Maybe Wolfram will find it useful if you send these examples to them, showing Solve with MaxExtraConditions -> 0, 1, Infinity, All, Automatic and Reduce. Maybe there's a good explanation, maybe something is going wrong ... either way it couldn't hurt to show them the examples. Perhaps there will be a way to improve things in the future. $\endgroup$ – Szabolcs Jul 4 '16 at 8:25
  • $\begingroup$ @Szabolcs: And how can I send them this example? Is there a well known e-mail which receives such examples? :) $\endgroup$ – H. R. Jul 4 '16 at 8:30
  • 2
    $\begingroup$ support(AT)wolfram(DOT)com is what you should try. $\endgroup$ – J. M. is away Jul 4 '16 at 8:34
3
$\begingroup$

Try the following:

eq = Eliminate[{A*ra^B == fa, A*rb^B == fb}, A]
Solve[eq, B]

(* {{B->-(Log[fb/fa]/(Log[ra]-Log[rb]))}} *)

and as you repeat this or do it by hand, please note that there are certain restrictions on the values. If you want to know what Maple did not tell you, try this

Reduce[eq, B]

and look at the conditions that need to be fulfilled

Mathematica graphics

$\endgroup$
  • 2
    $\begingroup$ @H.R. There is much to say, see e.g. What is the difference between Reduce and Solve? $\endgroup$ – Artes Jul 3 '16 at 17:14
  • $\begingroup$ @Artes: Thanks for the valuable link. I read your elaborate answer there. But in this case neither Solve nor Reduce seems to work! :) $\endgroup$ – H. R. Jul 3 '16 at 18:03
  • $\begingroup$ @H.R. These both functions work too however one has to input properly right restrictions for variables. Solve can also eliminate variables, e.g. Am I missing anything? Solving Equations $\endgroup$ – Artes Jul 3 '16 at 18:14
  • $\begingroup$ @Artes: What can I do get some answer from Mathematica? Can you kindly write an answer including the right restriction for variables such that it leads to the answer by Maple. :) $\endgroup$ – H. R. Jul 3 '16 at 19:30
  • $\begingroup$ @halirutan: A weird thing is that why Reduce[expr,vars] does not work on my original equation without eliminating $A$? Also, Solve[expr,vars,elims] does not work too! $\endgroup$ – H. R. Jul 3 '16 at 20:04

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.