Mathematica 9 is now available
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 [CORRECTION]

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

This uses a larger integral symbol

Clear[example];

example[f_Function, x_Symbol: x] := 
   Module[{g}, StringJoin[
   StringReplace[tstf[Integrate[g[x], x]], ToString[g] -> "f"], 
   " = ", tstf[Integrate[f[x], x]]]]


Bob Hanlon

---- Bob Hanlon <hanlonr at cox.net> wrote: 
> 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: Series Csc[z]
  • Next by Date: Re: Strange behaviour in first example from Plot3D documentation
  • Previous by thread: Re: Segregating the elements of a list based on given lower and upper
  • Next by thread: Re: unevaluated expression [CORRECTION]