Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*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 2006

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

Search the Archive

Re: Ask Mathematica to sub for a long expression

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71892] Re: Ask Mathematica to sub for a long expression
  • From: "dimitris" <dimmechan at yahoo.com>
  • Date: Sat, 2 Dec 2006 05:11:43 -0500 (EST)
  • References: <ekp4o4$2fq$1@smc.vnet.net>

It is!

For example try the following

Plus @@ Table[Random[Integer, {0, 10}]*x^Random[Integer, {0,
           4}]*Sqrt[a^2 + b^2 - 2*a*b*Cos[theta]], {8}] + x
% /. Sqrt[a^2 + b^2 - 2*a*b*Cos[theta]] -> c
Solve[% == 0, x]
% /. c -> Sqrt[a^2 + b^2 - 2*a*b*Cos[theta]]

The following command will take to the proper place within Mathematica
book for learning more!

FrontEndExecute[{HelpBrowserLookup["MainBook", "2.5"]}]

Regards
Dimitris



aaronfude at gmail.com wrote:
> Hi,
>
> Is it possible to ask Mathematica to replace a long expression, such as
> Sqrt[a^2+b^2-2*a*b*Cos[theta]] with "c", whenever it encounters that
> long expression?
> 
> Thanks!
> 
> Aaron Fude


  • Prev by Date: RE: Is mathematica able to transform formula
  • Next by Date: Re: Is mathematica able to transform formula
  • Previous by thread: Ask Mathematica to sub for a long expression
  • Next by thread: Re: Ask Mathematica to sub for a long expression