Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: How to solve the integrate problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128156] Re: How to solve the integrate problem
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Wed, 19 Sep 2012 04:58:59 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20120916072234.342B467DE@smc.vnet.net>

Clear[P];
P[Q_, x_] = Piecewise[
   {{-Q*v + p*x + g (Q - x), x <= Q}},
   -Q*v + p*Q - B (x - Q)];

If you want to calculate the expected value of P you need to know the
probability distribution for x. For example,

dist = RayleighDistribution[100*Sqrt[2/Pi]];

Mean[dist]

100

Plot[PDF[dist, x], {x, 0, 400}]

The expected value of P would then be

Assuming[{Q > 0},
  Integrate[P[Q, x]*PDF[dist, x], {x, 0, Infinity}]] //
 Simplify

Q*(g - v) - 100*(g - p)*Erf[(Sqrt[Pi]*Q)/200] -
   100*B*Erfc[(Sqrt[Pi]*Q)/200]


Bob Hanlon


On Mon, Sep 17, 2012 at 11:56 PM, =E5=BC=B5=E7=99=BB=E5=96=AC <toc531 at gmail.com> wrote:
> Each unit purchased costs "v",each unit sold produces a revenue of "p",each
> unit disposed as salvage gives a revenue of "g",and there is an additional
> cost"B" associated with each unit of demand not satisfied. If a quantity "Q"
> a demand "x" occurs, the profit is
>
> P(Q,x)=-Qv+px+g(Q-x)  if x<=Q
>        -Qv+pQ-B(x-Q)  if x>=Q
> The expected value of the profit, as a function of Q, is given by
>
> E[P(Q)]=integrate[{P(Q,x)},{x,0,infinite}]
>
> Question:I don't know how to use mathematica to solve E[P(Q)]
>
> Thank you.
>
> 2012/9/16 Bob Hanlon <hanlonr357 at gmail.com>
>>
>> Integrate[Q (P - W) - M (x - Q), {x, Q, Infinity}]
>>
>> Integrate::idiv: Integral of M Q+P Q-Q W-M x does not converge on
>> {Q,\[Infinity]}. >>
>>
>> Integrate[Q*(P - W) - M*(-Q + x),
>>    {x, Q, Infinity}]
>>
>>
>> Integrate[P*x - W*Q + S (Q - x), {x, 0, Q}] // Simplify
>>
>> (1/2)*Q^2*(P + S - 2*W)
>>
>>
>> Bob Hanlon
>>
>>
>> On Sun, Sep 16, 2012 at 3:22 AM,  <toc531 at gmail.com> wrote:
>> > x>Q ,Q(P-W)-M(x-Q),  x belongs(Q,infinite)
>> > x<=Q,P*x-W*Q+S(Q-x), x belongs(0,Q)
>> >
>> > Q,P,W,M,S are unknown constant number.
>> >
>> > I want to *dx*
>> >
>> > THANK U
>> >
>
>



  • Prev by Date: Re: Kernel exits (for lack of memory)
  • Next by Date: Problem with Map & For Loop !
  • Previous by thread: Re: How to solve the integrate problem
  • Next by thread: Re: How to solve the integrate problem