Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Compelling evaluation' topicStudent Support Forum > General > Archives > "Compelling evaluation"

Help | Reply To Topic
Author Comment/Response
Randy Silvers
10/26/08 4:40pm

I have created a function from a PDF and so it is non-zero on the unit interval and 0 elsewhere. But when I try to integrate some function of that function, it is not evaluated. How can I get it to be evaluated?

For example,

project=UniformDistribution[{0,1}];
f[y_]:=PDF[project,y]/(CDF[project,1] - CDF[project,0]);
F[y_]:=Integral_0^y f[z]dz;

Now, I define

pi0[y_]:= F[y]
pi1[y_]:= Integral_y^1 (1-q) f[q] dq
pi2[y_]:= Integral_y^1 q f[q] dq
T[y_]:= Integral_y^1 (q-y) f[q] dq

When I enter a numerical value, each is correctly computed; when I differentiate, it also looks correct. For example,

D[T[y],y] returns

Integral_y^1 -{1 0<=q<=1 dq

and, T[pistar] returns

Integral_pistar^1 (-pistar + q)({1 0 <=q <= 1) dq

How can I compel Mathematica to "know" or evaluate T[pistar] and return the symbolic expression assuming that q is in the relevant domain?

Then, D[T[y],y] would return -(1-y) and T[pistar] would return:

1/2 - pistar + pistar^2/2


URL: sirandol@deakin.edu.au,
Help | Reply To Topic