MathGroup Archive 2006

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

Search the Archive

Re: Ask Mathematica to sub for a long expression


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