MathGroup Archive 1999

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

Search the Archive

Re: Integrals

  • To: mathgroup at smc.vnet.net
  • Subject: [mg21125] Re: Integrals
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Fri, 17 Dec 1999 01:21:23 -0500 (EST)
  • References: <831jfo$dho@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"Juan Carlos Heredia" <jheredia at mail.com> wrote in message
news:831jfo$dho at smc.vnet.net...
> I would like to know  How to Plot defined integrals?.
> Could you give me please an example. I need to do it now.
> Thanks a lot.

Juan,

Some ideas

Plot[Integrate[x, {x, 0, y}], {y, 0, 1}] // Timing

Plot[Evaluate[Integrate[x, {x, 0, y}]], {y, 0, 1}] // Timing (*faster*)

Plot[Integrate[x, x], {x, 0, 1}] (*fails)

Plot[Evaluate[Integrate[x, x]], {x, 0, 1}] (*works OK*)


Plot[NIntegrate[Sin[Exp[x^2]], {x, 0, y}], {y, 0, 1.2}] // Timing (*slow*)

(soln = NDSolve[{
          y'[x] == Sin[Exp[x^2]],
          y[0] == 0},
        y, {x, 0, 1.2}]) // Timing


s = y /. %[[1]]

Plot[s[x], {x, 0, 1.2}] // Timing                   (*faster*)


Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565




  • Prev by Date: Re: Emacs mode for editting .m files
  • Next by Date: Re: Can I show several steps to a solution?
  • Previous by thread: Re: Integrals
  • Next by thread: Triangulation