Re: Re: Solve inconsistant actions?
- To: mathgroup at smc.vnet.net
- Subject: [mg87257] Re: [mg87217] Re: Solve inconsistant actions?
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sat, 5 Apr 2008 04:25:51 -0500 (EST)
- Reply-to: hanlonr at cox.net
newrent = Table[125000 E^(r 14), {r, .01, .04, .005}];
The only case with a problem (its algorithms couldn't find a solution) is
Solve[#/rate == 1894000, rate] & /@ newrent // Column
{{rate->0.0759156}}
{}
{}
{{rate->0.0936555}}
{}
{{rate->0.107729}}
{{rate->0.115541}}
I find that simplifying an expression can sometimes help.
Solve[Simplify[#/rate == 1894000], rate] & /@ newrent // Column
{{rate->0.0759156}}
{{rate->0.0814201}}
{{rate->0.0873238}}
{{rate->0.0936555}}
{{rate->0.100446}}
{{rate->0.107729}}
{{rate->0.115541}}
This is equivalent to what you did with
Solve[# == 1894000 rate, rate] & /@ newrent
Alternatively, use only exact or only approximate numbers (as in one of your examples). Hence, either
Solve[Simplify[#/rate == 1894000.], rate] & /@ newrent // Column
or
Solve[#/rate == 1894000, rate] & /@ Rationalize[newrent, 0] // N // Column
And Reduce has more robust capabilities than Solve
Bob Hanlon
---- mhicks <mhicks at san.rr.com> wrote:
> Can someone enlighten me as to what discriminators Solve uses in
> providing some solutions while disdaining others in the attached simple
> code?
>
> Is it an operator or Mathematica bug? I am running 6.0.1 under win xp.
>
>
> newrent = Table[125000 \[ExponentialE]^(r 14), {r, .01, .04, .005}] // N
>
> Table[Solve[newrent[[i]]/rate == 1894000 , rate], {i, 1, 7}]
>
> Table[Solve[newrent[[i]]/rate == 1894000. , rate], {i, 1, 7}]
>
> Table[Reduce[newrent[[i]]/rate == 1894000 , rate], {i, 1, 7}]
>
> Table[Solve[newrent[[i]] == 1894000 rate, rate], {i, 1, 7}]
>
>
> Thanks for any help,
>
> Marlyn Hicks
>
> mhicks at san.rr.com
>
>