Dear Udo,
Thank you for your kind assessment and suggestions.
Cp is indeed the complete (not all relevant) conditions for various settings we consider in the calculation. The full formulas for Cp was derived by Mathematica when I specified:
{$Assumptions = Di < Dv && Di > 0 && D0 > 0};
infectable[t_] := UnitStep[t]*UnitStep[D0 - t]
preinfect[t_] := UnitStep[D0 + t]*UnitStep[-t]
NRp = Inf/D0*
FullSimplify[Integrate[infectable[ti], {ti, te, te + Dv}]] +
Ip/D0*FullSimplify[Integrate[preinfect[ti], {ti, te, te + Dv}]];
FullSimplify[PiecewiseExpand[TR/NRp],
Assumptions ->
Di < Dv && Di > 0 && D0 > 0 && Inf > 0 && Ip > 0 && D0 > 0 &&
te \[Element] Reals]
Following your suggestion, I tried to reduce the conditions to a specific setting where Do>Dv>Di and te<0:
Cp[te_, Di_, Dv_, D0_] :=
Which[D0 >= Dv + te && te < 0 && D0 + te >= 0 &&
Di <= Dv + te, (Di Inf)/(Dv Inf + Inf te - Ip te),
D0 < Dv + te && D0 + Di >= Dv + te && te < 0 && D0 + te >= 0 &&
Di <= Dv + te, (Inf (D0 + Di - Dv - te))/(D0 Inf - Ip te),
D0 >= Dv + te && D0 + te >= 0 && Di > Dv + te && Dv + te > 0, (
Inf (Dv + te))/(Dv Inf + (Inf - Ip) te), True, 0]
infectable[t_] := UnitStep[t]*UnitStep[D0 - t]
{$Assumptions =
Di < Dv && Dv < D0 && Di > 0 && Di \[Element] Reals &&
D0 \[Element] Reals && Inf > 0 && Inf \[Element] Reals && Ip > 0 &&
Ip \[Element] Reals};
A = FullSimplify[(Inf/N/D0)*phi*tau*
Integrate[
Integrate[
Integrate[
infectable[ti] Cp[te, Di, Dv, D0], {tx, te + Dv, ti + Di}], {ti,
te + Dv - Di, te + Dv}], {te, -Dv, D0 - Dv + Di}]]
Or for the setting where Do>Di>Dv and te<0:
Cp[te_, Di_, Dv_, D0_] :=
Which[D0 >= Dv + te && te < 0 && D0 + te >= 0 &&
Di <= Dv + te, (Di Inf)/(Dv Inf + Inf te - Ip te),
D0 < Dv + te && D0 + Di >= Dv + te && te < 0 && D0 + te >= 0 &&
Di <= Dv + te, (Inf (D0 + Di - Dv - te))/(D0 Inf - Ip te),
D0 >= Dv + te && D0 + te >= 0 && Di > Dv + te && Dv + te > 0, (
Inf (Dv + te))/(Dv Inf + (Inf - Ip) te), True, 0]
infectable[t_] := UnitStep[t]*UnitStep[D0 - t]
{$Assumptions =
Di > Dv && Dv < D0 && Di > 0 && Di \[Element] Reals &&
D0 \[Element] Reals && Inf > 0 && Inf \[Element] Reals && Ip > 0 &&
Ip \[Element] Reals};
A = FullSimplify[(Inf/N/D0)*phi*tau*
Integrate[
Integrate[
Integrate[
infectable[ti] Cp[te, Di, Dv, D0], {tx, te + Dv, ti + Di}], {ti,
te + Dv - Di, te + Dv}], {te, -Dv, D0 - Dv + Di}]]
But I still got a conditional expression as the output.
Do you have some suggestions how to solve this?
Kind regards,
Welling