Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #3188
| From | Dana DeLouis <dana.del@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Only real solutions for a=a^0.7*b |
| Date | 2011-06-19 23:28 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <itm0nq$13i$1@smc.vnet.net> (permalink) |
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...@gmail.com" <niels.gie...@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
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Only real solutions for a=a^0.7*b Dana DeLouis <dana.del@gmail.com> - 2011-06-19 23:28 +0000 Re: Only real solutions for a=a^0.7*b "niels.gierse@gmail.com" <niels.gierse@googlemail.com> - 2011-06-20 23:37 +0000
csiph-web