MathGroup Archive 2012

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

Search the Archive

Re: Evaluating Exponential functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125929] Re: Evaluating Exponential functions
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Sat, 7 Apr 2012 05:59:04 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201204061002.GAA23067@smc.vnet.net>

You need to include patterns in definition of inc3

inc1[x_, M_, \[Tau]_, \[Phi]_] :=
 M/\[Tau] \[Phi]^M E^(-(x/\[Tau])) (1 - E^(-(x/\[Tau])))^(M - 1)

inc3[x_, M_, \[Tau]_, \[Phi]_, \[Tau]2_] := (E^(-(x/\[Tau])) (1 -
        E^(-(x/\[Tau])))^(-2 + M) (1 - E^(-(x/\[Tau]2))) (-1 + M) \[Phi]^
      M)/\[Tau] + (E^(-(x/\[Tau]2)) (1 - E^(-(x/\[Tau])))^(-1 + M) \[Phi]^
      M)/\[Tau]2

inc3[x, M, \[Tau], \[Phi], \[Tau]] == inc1[x, M, \[Tau], \[Phi]] // Simplify

True

inc1[10, 12, 8, .65] == inc3[10, 12, 8, .65, 8]

True


Bob Hanlon


On Fri, Apr 6, 2012 at 6:02 AM, leigh pascoe <leigh at evry.inserm.fr> wrote:
> Dear Experts,
>
> I am working with an age specific risk function
>
> inc1[x_, M_, \[Tau]_, \[Phi]_] :=
>  M/\[Tau] \[Phi]^M E^(-(x/\[Tau])) (1 - E^(-(x/\[Tau])))^(M - 1)
>
> where x is the age and M, tau and Phi are constants. This function
> plots, can be integrated numerically and Manipulated easily in Mathematica.
>
> I am also interested in the slightly more complicated function
>
> inc3[x, M, \[Tau], \[Phi], \[Tau]2] := (
>  E^(-(x/\[Tau])) (1 - E^(-(x/\[Tau])))^(-2 +
>    M) (1 - E^(-(x/\[Tau]2))) (-1 + M) \[Phi]^M)/\[Tau] + (
>  E^(-(x/\[Tau]2)) (1 - E^(-(x/\[Tau])))^(-1 + M) \[Phi]^M)/\[Tau]2
>
> This function has an additional parameter tau2. When tau2==tau the two
> functions should be identical. However the second function will not
> Plot, Integrate or be Manipulated in Mathematica. In fact it will not
> even evaluate for specific values of the parameters. e.g.
>
> In[10]:= inc1[10, 12, 8, .65]
> inc3[10, 12, 8, .65, 8]
>
> Out[10]= 0.0000596328
>
> Out[11]= inc3[10, 12, 8, 0.65, 8]
>
> The output for the two functions should be identical. What am I not
> understanding here? How can I define this function so that I can
> numerically integrate it and Plot its values over a range of x.
>
> Thanks for any suggestions.
>
> LP



  • Prev by Date: Re: Why does MemberQ[{0,1,2}, expr_] evaluate to True?
  • Next by Date: Re: evaluate to True?
  • Previous by thread: Evaluating Exponential functions
  • Next by thread: Re: Evaluating Exponential functions