       Re: Re: odd mathematica blindspot

```On Tue, Apr 26, 2005 at 09:52:28PM -0400, yehuda ben-shimol wrote:
> Hi,
> First Mathematica solves it with no problem. I wonder which version
> you are using. I tested it on ver. 5.1 on Win XP.
> Second, the (rather simple) problem is
> Solve[a^x==b,x] will return
> {{x->Log[b]/Log[a]}}
> so if you assign
> sol = Solve[a^x==b,x];
> you can check it for many values of a and b which in your case will lead to
> sol={{x->-Log/Log[(999999999999/10000000000000)]}}
> to extract this value you need to use replacement rules
> x/. sol[] will give you the number
> x/.sol will give you the number as a list of a single element.

.... because the problem is so simple, that's why its a blindspot
in mathematica IMO.

Anyways, I tried it again -

Mathematica 5.1 for Linux
-- Terminal graphics initialized --

In:= Off[Solve::ifun];

In:= sol[a_, b_] := Solve[a^x == b, x]

In:= sol[(9999999999/10000000000), .5]

Out= {]

In:= sol[5,15];

{{ x -> Log/Log }}

The really odd thing is that it doesn't come up with a *symbolic* solution,
it just says that none exists. Perhaps it is evaluating (9.../10....) as one,
and hence triggering Solve to make the problem insoluble.

Perhaps there's an issue of precision? However, FindRoot works perfectly fine
on the same expression, so its a bit strange.

btw - the notation for extraction of elements is rather.. odd. Is it basically an
array of array of arrays? I would expect:

yy = {{ x -> 1, y -> 1}, { x -> 2, y -> 2 }}

to be accessed via:

yy[]{x}

and the keys of the solution to be accessed by:

keys(yy[])

or somesuch.

Is there a good tutorial somewhere on the use of datastructures in mathematica?
sort of a pocketguide on getting around?

Ed

```

• Prev by Date: Re: Converting a mapping into a well-defined function
• Next by Date: Re: Converting a mapping into a well-defined function
• Previous by thread: Re: odd mathematica blindspot
• Next by thread: Re: Re: Re: odd mathematica blindspot