MathGroup Archive 2007

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

Search the Archive

Re: unevaluated expression


tstf[x_] := ToString[TraditionalForm[x]];

Clear[example];

example[f_Function, x_Symbol: x] := StringJoin["\[Integral] ", 
     tstf[f[x]], " \[DifferentialD]", tstf[x], " = ", 
     tstf[Integrate[f[x], x]]]

example[#^2&]

example[#^2&, y]


Bob Hanlon

---- 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: Mapping a pure function with 2 conponents.
  • Next by Date: Re: JLink error on startup
  • Previous by thread: Re: unevaluated expression
  • Next by thread: AW: Problem with Mathematica 6