Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

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

Search the Archive

Radical conjugates

  • To: mathgroup at smc.vnet.net
  • Subject: [mg129691] Radical conjugates
  • From: Francisco Javier García Capitán <garciacapitan at gmail.com>
  • Date: Mon, 4 Feb 2013 01:21:57 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

Hello, I wanted a function that takes a numerical expression of the form

a + b Sqrt[c]

or

a Sqrt[b] + c Sqrt[d]

and returns its conjugate, namely a - b Sqrt[c]  and (a Sqrt[b] - c
Sqrt[d]) respectively.

I wrote

RadicalConjugate[x_] := Module[{c},
  c = Cases[x, Power[_]];
  If[Length[c] > 0, x /. c[[1]] -> -c[[1]], x]
  ]

and it seems that it works. Anyway, do you have a different approach?

Thank you.

--
---
Francisco Javier Garc=EDa Capit=E1n
http://garciacapitan.99on.com




  • Prev by Date: Re: Any way to get gradient lines as well as contour lines?
  • Next by Date: Re: Mathematica and Lisp
  • Previous by thread: Re: making a Module or Column that will print lines interspersed
  • Next by thread: Re: Radical conjugates