Re: Only real solutions for a=a^0.7*b
- To: mathgroup at smc.vnet.net
- Subject: [mg119733] Re: Only real solutions for a=a^0.7*b
- From: Dana DeLouis <dana.del at gmail.com>
- Date: Sun, 19 Jun 2011 19:28:42 -0400 (EDT)
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