       Re: Erf funcion

• To: mathgroup at smc.vnet.net
• Subject: [mg123941] Re: Erf funcion
• From: Bob Hanlon <hanlonr357 at gmail.com>
• Date: Mon, 2 Jan 2012 02:41:04 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <201201010729.CAA28444@smc.vnet.net>

```FiX[x_] = (1/2)*(1 + Erf[x/Sqrt]);

expr = 3 (2^(7/2 -
2 (k + t))) Cp (E^(-d^2 - (36 Cp^2)/
lambda^2))*((Erf[(-d + (6 Cp)/lambda)/Sqrt] +
Erf[(6 Cp + d lambda)/(Sqrt lambda)])^k);

expr /. Erf[x_] -> 2*HoldForm[FiX[x*Sqrt[x]]] - 1

3*2^(7/2 - 2*(k + t))*Cp*E^(-d^2 - (36*Cp^2)/lambda^2)*
(-2 + 2*
HoldForm[FiX[((-d + (6*Cp)/lambda)*Sqrt[(-d + (6*Cp)/lambda)/Sqrt])/
Sqrt]] +
2*HoldForm[
FiX[((6*Cp + d*lambda)*
Sqrt[(6*Cp + d*lambda)/(Sqrt*lambda)])/(Sqrt*lambda)]])^k

% // ReleaseHold // Simplify

3*2^(7/2 - 2*k - 2*t)*Cp*E^(-d^2 - (36*Cp^2)/lambda^2)*
(Erf[(-d + (6*Cp)/lambda)^(3/2)/(2*2^(1/4))] +
Erf[(Sqrt[d + (6*Cp)/lambda]*(6*Cp + d*lambda))/
(2*2^(1/4)*lambda)])^k

If you want to simplify the argument to FiX

expr /. Erf[x_] -> ToExpression[
"2*HoldForm[FiX[" <>
ToString[Simplify[x*Sqrt[x]], InputForm] <>
"]]-1"]

3*2^(7/2 - 2*(k + t))*Cp*E^(-d^2 - (36*Cp^2)/lambda^2)*
(-2 + 2*HoldForm[FiX[((-d + (6*Cp)/lambda)/Sqrt)^(3/2)]] +
2*HoldForm[FiX[((6*Cp + d*lambda)/(Sqrt*lambda))^(3/2)]])^k

% // ReleaseHold // Simplify

3*2^(7/2 - 2*k - 2*t)*Cp*E^(-d^2 - (36*Cp^2)/lambda^2)*
(Erf[(-d + (6*Cp)/lambda)^(3/2)/(2*2^(1/4))] +
Erf[(d + (6*Cp)/lambda)^(3/2)/(2*2^(1/4))])^k

% == %%% // Simplify

True

Bob Hanlon

On Sun, Jan 1, 2012 at 2:29 AM, Vicent <vginer at gmail.com> wrote:
> Hello.
>
> I have an expression that depends on the Cumulative Distribution
> Function (CDF) of a Normal Variable with mean = 0 and standard
> deviation = 1.
>
> When I perform operations and/or derivatives with/for that function
> with Mathematica, I get expressions involving Erf function, as the CDF
> function of a Normal distributed variable and Erf (error function) are
> closely related. Concretely,
>
>    FiX[x] == (1/2)*(1 + Erf[x/Sqrt])
>
> and thus
>
>    Erf[x] == 2*FiX[x*Sqrt] - 1
>
> where FiX stands for the previously mentioned CDF, I mean:
>
>    X = NormalDistribution[0, 1]
>    FiX[x_] := CDF[X, x]
>
>
> Is there a quick way to ask Mathematica not to use  Erf  but always
> let the results as a function of FI[x]??
>
> The expressions I get as a result of my computations are larger than
> this short example:
>
>    3 (2^(7/2 - 2 (k + t))) Cp (  E^(-d^2 - (36 Cp^2)/lambda^2))
> ((Erf[(-d + (6 Cp)/lambda)/Sqrt] + Erf[(6 Cp + d lambda)/(Sqrt
> lambda)])^k)
>
> where "Cp", "k", "t", "d" and "lambda" are parameters or arguments
> that I want to keep as "generic".
>
> So, how can I "translate" expressions such as the last one into "FiX
> mode"? Or, better, how can I prevent Mathematica to reduce everything
> to "Erf mode"??
>
> I hope my question is clear enough... :)
>
>
> And have a good new year!
>
>
> --
> vicent
> dooid.com/vicent
>

```

• References:
• Prev by Date: How can I rasterize the selection in a notebook, preserving In/Out labels when appropriate?
• Next by Date: Re: Creating dialogs, right-aligning buttons
• Previous by thread: Re: Erf funcion
• Next by thread: Re: Erf funcion