 
 
 
 
 
 
Re: How to use "Solve" to get only real number solutions?
- To: mathgroup at smc.vnet.net
- Subject: [mg55135] Re: [mg55132] How to use "Solve" to get only real number solutions?
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Mon, 14 Mar 2005 03:43:35 -0500 (EST)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
intensity[x_] := 1/4+(2*Cos[(Pi*x)/100])/Pi+
      (4*Cos[(Pi*x)/100]^2)/Pi^2-
      (2*Cos[(3*Pi*x)/100])/(3*Pi)-
      (8*Cos[(Pi*x)/100]*Cos[(3*Pi*x)/100])/(3*Pi^2)+
      (4*Cos[(3*Pi*x)/100]^2)/(9*Pi^2);
Off[Solve::ifun];
Select[Chop[Solve[
      intensity[x] == 0.3*(1/4+32/(9*Pi^2)+
              (4*Sqrt[2])/(3*Pi)),x]],
  FreeQ[x/.#,Complex]&]
{{x -> -47.4207},{x -> 47.4207}}
Bob Hanlon
> 
> From: "PengYu.UT at gmail.com" <PengYu.UT at gmail.com>
To: mathgroup at smc.vnet.net
> Date: 2005/03/13 Sun AM 04:57:54 EST
> To: mathgroup at smc.vnet.net
> Subject: [mg55135] [mg55132] How to use "Solve" to get only real number solutions?
> 
> Hi All
> 
> For example I have the following function and I want to find the
> solution of the quation shown below. But Mathematica showns not only
> real number solutions. Do you know how to restrict the solutions to
> only real numbers. Thanks!
> 
> Best wishes,
> Peng
> 
> intensity[x_, δ_, p_, λ_] := 1/4 + (2*Cos[(Pi*x)/100])/Pi +
> (4*Cos[(Pi*x)/100]^2)/Pi^2 - (2*Cos[(3*Pi*x)/100])/(3*Pi) -
>  (8*Cos[(Pi*x)/100]*Cos[(3*Pi*x)/100])/(3*Pi^2) +
> (4*Cos[(3*Pi*x)/100]^2)/(9*Pi^2)
> 
> Solve[intensity[x, 0, 200, 50] == 0.3*(1/4 + 32/(9*Pi^2) +
> (4*Sqrt[2])/(3*Pi)), x]
> 
> 

