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

pretty output with HoldForm

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70425] pretty output with HoldForm
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Mon, 16 Oct 2006 02:34:24 -0400 (EDT)

I want to get the following output for the series:

(1 - 1/2 - 1/4) + (1/3 - 1/6 - 1/8) + (1/5 - 1/10 - 1/12) + 
  (1/7 - 1/14 - 1/16) . . .

What I did was

kl[n_]:=HoldForm[ 1/(2n+1)-1/(4n+2)-1/(4n+4)]

then I enter eg:

reihe= Sum[kl[n],{n,1,5}]

This works quite good, but the fractions are completely unevaluated
(because of HoldForm, I know) and display as

     1
----------
4 2 + 2

But I want them displayed as

 1
--
10

Is there a way to evaluate parts inside a HoldForm, so that the
fractions are evaluated but not the sums?

Gruss Peter
-- 
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de


  • Prev by Date: Re: Demostration
  • Next by Date: Re: For Routine to Map Routine
  • Previous by thread: How to explain unexpected behaviour of Fibonacci[]?
  • Next by thread: RE: pretty output with HoldForm