Mathematica Asked by Astrid on January 26, 2021
I would like to know the sign of the derivative of a function (for instance whether it is always positive or not). Also, how can I specify that the parameter with respect to which I differentiate can only take positive values?
Here is the function:
D[expr[p, v0, σ], p]
and below the expressions for the other functions or variables used.
ER[p_, v0_, σ_] :=
v0 - σ ψ[(p - v0)/σ]/Φ[(p - v0)/σ];
del[p_, v0_, σ_] := - ψ[(p - v0)/σ]/Φ[(p - v0)/σ] *(- ψ[(p - v0)/σ]/Φ[(p -v0)/σ] - (p - v0)/σ);
VAR[p_, v0_, σ_] := σ^2 (1 - del[p, v0, σ]);
expr[p_, v0_, σ_] := (p -ER[p, v0, σ])^2 Φ[(p - v0)/σ] (1 - Φ[(p - v0)/σ]) + VAR[p, v0, σ] Φ[(p - v0)/σ];
Φ[x_] := CDF[NormalDistribution[], x];
ψ[x_] := PDF[NormalDistribution[], x];
I have tried the following code but it returns an error (probably because it cannot take a function as input)
Assuming[
p > 0 && v0 > 0 && σ > 0,
Simplify[Sign[[D[expr[p, v0, σ], p]]]]
]
Would the compile function be useful in this case?
Thank you so much for your help, highly appreciated.
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP