Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

UnitStep function leads to very difficult Integration

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48098] UnitStep function leads to very difficult Integration
  • From: Nathan Moore <nmoore at physics.umn.edu>
  • Date: Thu, 13 May 2004 00:08:25 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello all,

I'm trying to evaluate expectation values from joint probability 
distributions which I've had to define in a piecewise manner, ie

	norm = Integrate[G[1,x]G[2,x],{x,0,10}];
	<x^2> = Integrate[G[1,x]G[2,x] x^2,{x,0,10}] * norm

where the G[k,x] is a set of polynomials defined piecewise on 
intervals, {(0,2),(2,4),(4,6),etc}.

I assume the most Mathematica-friendly way to define these functions is 
with the UnitStep[] function.  This works to varying degree.  I was 
able to check the probability normalization this way (integrating only 
one G[k,x]) with an exact result.  Unfortunately though Mathematica 
seems unable to find an exact experssion for the expectation when the 
G[k,x] polynomials take sufficiently complex form.

The integration output starts to look like,
	Integrate[ d^4 ( (d-3)UnitStep[3-d] UnitStep[d-1]/d + UnitStep[1 - d] 
UnitStep[d])^2, {d,0,3}]

Of course I can evaluate these integrations numerically, but the 
expectations seem to follow a pattern of rational numbers (1/2, 5/12, 
5/6 etc...) and I'd really like to know the exact value.

Is there a more intelligent way to compose these functions?  The 
Simplify[] function doesn't seem to work on UnitStep[]

best regards,

Nathan Moore
University of Minnesota Physics


  • Prev by Date: Re: Drawing a globe, with countries and great circle routes
  • Next by Date: Re: simultaneous fit of multiple data sets
  • Previous by thread: Re: tabControl help please?
  • Next by thread: Re: UnitStep function leads to very difficult Integration