MathGroup Archive 2007

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

Search the Archive

Re: unevaluated expression

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77208] Re: unevaluated expression
  • From: dh <dh at metrohm.ch>
  • Date: Tue, 5 Jun 2007 06:59:44 -0400 (EDT)
  • References: <f40gan$628$1@smc.vnet.net>


Hi Julio,

assume you want "x" as the dummy integration variable and you feed a 

pure function to your function fun. Then:

fun[f_]:=HoldForm[Integrate[f,x]]//.{Slot[1]->x,HoldPattern[Function[a_]]->a}==

       Integrate[f[x],x]

you can now say e.g.:

fun[#^2&]

hope this helps, Daniel



juliok at verizon.net wrote:

> How do you write a function such as

>    example[f_]:= ......

> 

> so that when entering example[#^2] Mathematica will respond with

> 

> integral_symbol x^2 dx = x^3 /3

> 

> where integral_symbol is the standard math symbol, exponents are

> superscripts, etc. I tried Hold[], Unevaluated[], nothing seems to

> work.

> 

> Thanks

> 

> 

> Julio

> 

> 




  • Prev by Date: Re: Slow work of some List functions in Mathematica 6
  • Next by Date: Rotate and Normal
  • Previous by thread: Re: unevaluated expression
  • Next by thread: Re: unevaluated expression