[Date Index]
[Thread Index]
[Author Index]
Re: How to enter an integral in a formula and have mathematica *not*
*To*: mathgroup at smc.vnet.net
*Subject*: [mg109000] Re: How to enter an integral in a formula and have mathematica *not*
*From*: gekko <pfalloon at gmail.com>
*Date*: Sat, 10 Apr 2010 06:51:28 -0400 (EDT)
*References*: <hpkgjc$7vn$1@smc.vnet.net>
On Apr 8, 10:01 pm, Jim Rockford <jim.rockfo... at gmail.com> wrote:
> 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
You'll probably get at least a half-dozen replies along these lines,
but just in case: one way to achieve what you want would be to make
the definition of "f" only match numerical values, e.g.
f[x_?NumericQ] := stuff[x] + Integrate[g[s,x], {s,0,1}]
If it should only match for Integer arguments, you could use
f[x_Integer] := ... instead.
Cheers, P.
Prev by Date:
**Simultaneous Nonlinear Data Fits**
Next by Date:
**Re: if using Mathematica to solve an algebraic problem**
Previous by thread:
**Re: How to enter an integral in a formula and have mathematica *not***
Next by thread:
**Re: Inverse Laplace Transform**
| |