MathGroup Archive 2010

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

Search the Archive

Re: How to enter an integral in a formula and have mathematica *not*

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108993] Re: How to enter an integral in a formula and have mathematica *not*
  • From: "David Park" <djmpark at comcast.net>
  • Date: Fri, 9 Apr 2010 03:33:43 -0400 (EDT)

You could use something like the following:

f[x_] := x + HoldForm[Integrate[Sin[s + x], {s, 0, 1}]]

f[.5]
% /. Integrate -> NIntegrate // ReleaseHold

The Presentations package has a Student's Integral section that allows one
to hold integrals and manipulate them, using various integration techniques,
before evaluation. One uses integrate with a small "i" and then later
specifies the type of integration. 

f[x_] := x + integrate[Sin[s + x], {s, 0, 1}]

f[.5]
% // UseNIntegrate

giving the same answers as above.


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  




From: Jim Rockford [mailto:jim.rockford1 at gmail.com] 


I have a certain integral, part of a larger expression, that can be
expressed in terms of incomplete gamma functions by Mathematica.  But
in carrying out the definite integral and forcing it to be written in
terms of gamma functions, this introduces branch points and other
unnecessary complications.  I want the integral left alone and
evaluated numerically, but I still want to express the general formula
for this large expression with the unevaluated integral in place.

For example, I'd like

f[x_] = (stuff) + int_{0}^{1} (g[s,x]) ds

where the definite integral is expressed in the usual Mathematica
notation.

What I do *not* want Mathematica to do at this stage is to do the
integral analytically and write it in terms of special functions.
Instead, I just want to later make a list of values for  f[x]  and
have the integral done numerically.

How can I program this?

Thanks,
Jim




  • Prev by Date: Re: Speed Up of Calculations on Large Lists
  • Next by Date: Re: Estimating memory usage of expressions
  • Previous by thread: How to enter an integral in a formula and have mathematica *not*
  • Next by thread: Re: How to enter an integral in a formula and have mathematica *not*