MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Only real solutions for a=a^0.7*b

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119755] Re: Only real solutions for a=a^0.7*b
  • From: "niels.gierse at gmail.com" <niels.gierse at googlemail.com>
  • Date: Mon, 20 Jun 2011 19:37:55 -0400 (EDT)
  • References: <itm0nq$13i$1@smc.vnet.net>

On 20 Jun., 01:28, Dana DeLouis <dana.... at gmail.com> wrote:
> Hi.  Given an example like this:
>
> equ=3 x^3+4 x-7.0;
> Solve[equ==0,x]
> {
> {x->-0.5-1.44338 I},
> {x->-0.5+1.44338 I},
> {x->1.}
>
> }
>
> Sometimes this works:
>
> Solve[equ==0,x,Reals]
> {{x->1.}}
>
> However, your example returned a ConditionalExpression
>
> eq =  a==a^0.7*b ;
> Solve[eq,a,Reals]
> <...>
>
> Probably not the best way, but here's one idea:
>
> NoComplex[v_]:=Length[Position[v,_Complex,\[Infinity],Heads->True]]==
=0
>
> eq =  a==a^0.7*b ;
> Solve[eq,a] //NoComplex
>
> {{a->0.},{a->1. b^(10/3)}}
>
> Another example:
>
> equ = 3 x^3 + 4 x - 7.0;
> Solve[equ == 0, x]
>
> {{x -> -0.5 - 1.44338 I}, {x -> -0.5 + 1.44338 I}, {x -> 1.}}
>
> Solve[equ == 0, x] // NoComplex
>
> {{x -> 1.}}
>
> = = = = = = = = = =
> HTH  : >)
> Dana DeLouis
> $Version
> 8.0 for Mac OS X x86 (64-bit) (November 6, 2010)
>
> On Jun 18, 7:54 pm, "niels.gie... at gmail.com" <niels.gie... at googlemail.com=
> wrote:
>
>
>
>
>
>
>
> > Hi all!
>
> > Is there a way to make Mathematica only report the real solution for
>
> > eq = a == a^0.7*b
>
> > Solve[eq, a]
>
> > reports:
> > {{a -> 0.}, {a -> (-0.5 - 0.866025 I) b^(
> >     10/3)}, {a -> (-0.5 + 0.866025 I) b^(10/3)}, {a -> 1. b^(10/3)}=
}
>
> > The solution I am after is the last one. Is there a way to have solve
> > only report that one? As the exponent is changing from case to case
> > selecting one like [[5]] does not help. Playing around with Refine[],
> > Assuming[] etc. to impose a>0 did not help.
>
> > Does someone have a hint for me how to do this? I am using Mathematica
> > 7.0.0 (Windows, 64 bit)
>
> > Cheers,
>
> > Niels

Thanks for your reply. It both worked _and_ helped me getting some
insight into functional programming.

In the meantime I made the discovery that one can fool Mathematica
into doing what I want. If I manually reshape the equation to be

eq2=1.0==b/a^0.3

then Solve[eq2,a] reports:
Solve::ifun: Inverse functions are being used by Solve, so some
solutions may not be found; use Reduce for complete solution
information. >>
{{a -> 1./(1/b)^3.333333333333333}}

So kind of what I was hoping for. Looks that there could be some
finetuning in the Solve[] function done to allow for domain selection.

Again, thanks for your help.

Cheers

Niels


  • Prev by Date: Re: How to find one expression in terms of another expression?
  • Next by Date: Re: Why doesn't TrueQ return True here?
  • Previous by thread: Re: Only real solutions for a=a^0.7*b
  • Next by thread: Interpolation with known derivative values