I've a lengthy program that calculates t_final and needs to do the following if statements that include an integral, I tried to attach a pic but i could not. Any clue. Note all parameters are defined in the code
1 2 3 4 5 6 7 8 9
double tc;
tc=dx*dx*ct*mio*phi/(16*_k1);
if (t_final<tc)
{
Vp<<4*pai*h*t_final*_k1/(ct*mio)<<endl;
else
Vp<<4*pai*h*tc*_k1/(ct*mio)+ (integral of dv from 4*pai*h*tc*_k1/(ct*mio) to infinity) <<endl;
return ;
}
I have no idea, what formula are you trying to use? You can't just give us code and say "is this right?" because we have no idea what your conception of right and wrong is.