MathGroup Archive 2011

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

Search the Archive

Re: get a, b from numbers in the form a+b Pi

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119161] Re: get a, b from numbers in the form a+b Pi
  • From: Themis Matsoukas <tmatsoukas at me.com>
  • Date: Mon, 23 May 2011 06:27:06 -0400 (EDT)

The following is not elegant (quite brute force, really) but does what you want:

nums = {1/2 (-2 + \[Pi]), -2 + (3 \[Pi])/4, -(11/3) + (5 \[Pi])/4, 
   5/48 (-64 + 21 \[Pi]), -(61/5) + (63 \[Pi])/
     16, -(338/15) + (231 \[Pi])/32};
a = nums /. \[Pi] -> 0;
b = Expand[(nums - (nums /. \[Pi] -> 0))/\[Pi]];
ab = Transpose[{a, b}]

{{-1, 1/2}, {-2, 3/4}, {-(11/3), 5/4}, {-(20/3), 35/16}, {-(61/5), 63/
  16}, {-(338/15), 231/32}}

Themis


  • Prev by Date: Re: Series[log[x], {x, 0, 3}]
  • Next by Date: A problem with NIntegrate
  • Previous by thread: get a, b from numbers in the form a+b Pi
  • Next by thread: Re: get a, b from numbers in the form a+b Pi