Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: unevaluated expression

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77220] Re: [mg77114] unevaluated expression
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Wed, 6 Jun 2007 06:40:29 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

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