MathGroup Archive 2007

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

Search the Archive

Re: unevaluated expression [CORRECTION]


Disregard this "correction" I got target fixation on the integral symbol and overlooked its argument. Sorry about the noise.


Bob Hanlon

---- Bob Hanlon <hanlonr at cox.net> wrote: 
> 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: Best practice for Mathematica package development
  • Next by Date: Defining the Legacy Colors
  • Previous by thread: Re: unevaluated expression [CORRECTION]
  • Next by thread: Re: A wrong definite integral in 5.0? (2nd response)