Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: Weird trigonometric integral and Simplification question

  • To: mathgroup at
  • Subject: [mg31789] Re: [mg31777] Weird trigonometric integral and Simplification question
  • From: BobHanlon at
  • Date: Sun, 2 Dec 2001 04:25:05 -0500 (EST)
  • Sender: owner-wri-mathgroup at

In a message dated 2001/12/1 4:50:18 AM, bta at writes:

>Simplification question
>   If I set lambda=(1+Sqrt[5])/2, and then ask Mathematica to
>Expand[lambda^7] or ask for any other power of lambda, Mathematica
>gives a nice result that I can easily rewrite by hand in the form a + b
>lambda where a and b are integers. Is there any way to get Mathematica
>write the result in this form? (I'm not interested in the answer involving
>the Fibonacci sequence, I'm interested in learning how to manipulate
>expressions in Mathematica.)

Once you give lambda a value you cannot express anything literally in 
terms of lambda since Mathematica will substitute the assigned value.  
However, the symbol GoldenRatio which is equivalent to your lambda 
can be used

{GoldenRatio, FunctionExpand[GoldenRatio]}

{GoldenRatio, (1/2)*(1 + Sqrt[5])}


f[n_Integer?NonNegative] := 
    Module[{a,b, lambda = (1+Sqrt[5])/2, soln1, soln2}, 
      soln1 = FullSimplify[Solve[a+b*lambda == lambda^n, {a,b}][[1]]];  
      soln2 = 
        Solve[Coefficient[FullSimplify[a /. soln1 /. Sqrt[5] -> x], x] == 0, 
      Simplify[a+b*GoldenRatio /. Join[soln1 /. soln2, soln2]]];


8 + 13*GoldenRatio

Table[{GoldenRatio^n,"==", t=f[n], 
      FullSimplify[GoldenRatio^n - t]\[Equal]0}, {n, 0, 7}]//TableForm

>    Similarly if I ask Mathematica for Inverse[{{a,b},{c,d}}] it gives
>nice result, but how do I get it to factor out a d-b c?

inv = Inverse[{{a,b},{c,d}}]

If you factor something out of a matrix, Mathematica will immediately 
carry out the multiplication or division.  You can use an undefined 
operator to delay the operations

CircleTimes[(t=Denominator[inv[[1,1]]]) * inv, 1/t]

inv == Times@@%

Bob Hanlon
Chantilly, VA  USA

  • Prev by Date: Re: "Incremental Integration"?
  • Next by Date: Re: shuffling a deck of cards
  • Previous by thread: Re: Weird trigonometric integral and Simplification question
  • Next by thread: Re: Weird trigonometric integral and Simplification question