Message Boards Message Boards

0
|
6936 Views
|
6 Replies
|
2 Total Likes
View groups...
Share
Share this post:

[?] What do these solutions from Solve mean?

Posted 6 years ago

When I compute the following (with Mathematica 11.2):

Solve[(1 + r)^81 == 1.45, r]

I get a long list of solutions, all negative reals and complex numbers, apart from the one positive real answer I was expecting.

The solution list begins...

{{r -> -4.46763}, {r -> -4.45283}, {r -> -4.30803}, {r -> -4.11268}, {r -> -3.94294}....etc.

These values of r do not even remotely solve the equation, as far as I can see. Apart from anything else, they make the LHS negative, so it cannot be equal to the RHS, which is positive.

What is the meaning of these solutions? Is this just a bug in Mathematica? Or is there some sense in which they are solutions?

POSTED BY: Marc Widdowson
6 Replies

One needs much more precision for these high powers. For all the complex solutions use:

Solve[(1 + r)^81 == 1.45`40, r]

Or for the real solution:

Solve[(1 + r)^81 == 1.45`40, r, Reals]

where 40 is the number of digits which should be high here for these high powers (81!).

POSTED BY: Sander Huisman

Yes, this is strange! To eliminate complex solutions, you coud compute:

Res = Solve[(1 + r)^81 == 1.45, r, Reals]
Map[1.45 - (1 + r)^81 /. # &, Res] // Chop

which gives r=-1 as a multiple solution and, finally, the correct one : 0.00459774. To avoid problems of precision, I tried:

Res = Solve[(1 + r)^81 == Rationalize[1.45], r, Reals]

then Mathematica give an unique solution (a pure fonction). But I don't have any explanation!

POSTED BY: Claude Mante
Posted 6 years ago

Thank you very much. That provides a little more insight.

POSTED BY: Marc Widdowson
Posted 6 years ago

Some further observations

Solve[(1 + r)^n == C, r]

gives n solutions. E.g. there are 81 solutions in the example above.

Solve[(1 + r)^4 == 1, r]

gives

{{r -> -2}, {r -> -1 - i}, {r -> -1 + i}, {r -> 0}}

which are in fact all valid solutions, in this case.

POSTED BY: Marc Widdowson
Posted 6 years ago

Ah, I see. So those negative reals are artefacts of the lack of precision, and should be complex. Thank you.

POSTED BY: Marc Widdowson

What about 1 + r = x; x^81 == 1.45 , so

In[16]:= x = N[Power[1.45`30, (81)^-1], 30]

Out[16]= 1.00459774172863829263717967674

and then r = x - 1

POSTED BY: Hans Dolhaine
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract