Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

FindFit with conditionals

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57307] FindFit with conditionals
  • From: Edward Peschko <esp5 at pge.com>
  • Date: Tue, 24 May 2005 05:12:44 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

hey all,

I'd like to do a FindInstance on a function with conditionals, something like

FindInstance
[
	NIntegrate[m * (e^(-lambda) * lambda^x) / x! + n, {x,1,2}] == 1 &&
		m * (e^-1 * 1^1)/1! + n == 0 &&
		m * (e^-2 * 2^2)/2! + n == 0, 
	{ lambda, m, n} 
]

What I was *hoping* that mathematica would do would be to substitute 
lambda, m, and n inside the expression passed to NIntegrate, which would then 
calculate the integral based on individual values, and then find an instance
which fits all three criteria. However, it doesn't seem to do this, instead 
it complains that 'Integrand ... is not numerical'.

A side note - can you do interval arithmetic in FindInstance? ie: could you say:

FindInstance
[
	NIntegrate[m * (e^(-lambda) * lambda^x) / x! + n, {x,1,2}] ==
							 Interval[.999,1.001] &&
		m * (e^-1 * 1^1)/1! + n == Interval[-.001, .001] &&
		m * (e^-2 * 2^2)/2! + n == Interval[-.001, .001] &&
	{ lambda, m, n} 
]

to get around machine precision issues?

Anyways, this would be much more helpul behavior (evaluating lambda, m, and n 
in subexpressions) than what it does now. Any ideas on how to implement this?

Ed

(
ps - any ideas on how to solve something like this in other ways, aside
from FindInstance?
)


  • Prev by Date: Re: runs test once more
  • Next by Date: Re: Mapping Data
  • Previous by thread: Re: Formating with TableForm
  • Next by thread: Re: FindFit with conditionals