Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Complexes, Reals, FullSimplify

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48800] Re: Complexes, Reals, FullSimplify
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig-de>
  • Date: Wed, 16 Jun 2004 07:49:02 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <cap3s0$cb7$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

FullSimplify[Re[(1 - 6* I)* Cos[x] - (1 + 2*I)*Sin[0.5*x]]
/. r_Real :> Rationalize[r, $MachineEpsilon], Element[x,
Reals]]


Regards

  Jens

"Stergios J. Papadakis" <stergios.papadakis at jhuapl.edu> schrieb im
Newsbeitrag news:cap3s0$cb7$1 at smc.vnet.net...
> Dear group,
> I am trying to use expressions of the below form as boundary conditions
> in NDSolve.  I keep getting "non-numerical" errors.  I have tried a lot
> of things and reduced the problem to this:
>
> These give different outputs:
>
> FullSimplify[Re[(1 - 6* I)* Cos[x] - (1 + 2*I)*Sin[(1/2)* x]],Element[x,
> Reals]]
>
> FullSimplify[Re[(1 - 6* I)* Cos[x] - (1 + 2*I)*Sin[0.5*x]],Element[x,
> Reals]]
>
> I get:
>
> \!\(Cos[x] - Sin[x\/2]\)
>
> Re[(1 - 6 \[ImaginaryI]) Cos[x] - (1 + 2 \[ImaginaryI]) Sin[0.5 x]]
>
>
> I think I can get my NDSolve to work if I can make the second
> FullSimplify above give me an output without an Re in it.  Mathematica
> assumes that 0.5 may have some tiny imaginary part and therefore keeps
> everything for full generality.  How do I eliminate
> this?  Note that I have simplified things a lot here, the actual
> expression that I will be using has many terms that all have the
> form above, with many significant digits, which depend on earlier
> calculations.  I have tried using Chop,
>
> FullSimplify[Chop[Re[(1 -
>    6* I)* Cos[x] - (1 + 2*I)*Sin[0.5* x]]], Element[x, Reals]]
>
> And that does not work, I get the same result.
>
>
>
>
>
>
> Thanks,
> Stergios
>



  • Prev by Date: Re: Integrating UnitSteps
  • Next by Date: Re: (**) comments highlighted - newbie
  • Previous by thread: Re: Complexes, Reals, FullSimplify
  • Next by thread: RE: Complexes, Reals, FullSimplify