help writing an integral function!!

IF anybody can help i would be really very happy

i have to implement a function called phi1 that is is this way )
q(z)=integral from z to infinity of q(x)dx ( where q(x)=(1/sqrt(2pi))*exp(-(xsquared)/2) )

q(z)=0.5+q(z)(z+(z cube/3)+(z to power 5/3.5)+(......)

i already have the solution but I can't get a word:

//double Phi1(double y)
//{
//double j=1;
//double k=0.0;
//for (int i=1;i<120;i++)
//{
//if (i%2==1)
//{j=j*i;
//k=k+pow(y,i*1.0)/j;
//}
//}
//
//return 0.5+phi1(y)*k;}
//
Last edited on
get a word ... i did not get what you want .
how can i implement the summations z+ z^3/3 +z^5/3x5 + z^7/3x5x7 ?
The solution is this but I don't understand it.
//double j=1;
//double k=0.0;
//for (int i=1;i<120;i++)
//{
//if (i%2==1)
//{j=j*i;
//k=k+pow(y,i*1.0)/j;
//}
//}
Last edited on
Topic archived. No new replies allowed.