Hello Craig, thank you for your response! I tried the code you suggested but it is giving me the error seen in the attached notebook. Based on what you said about making g explicit, I tried this code:
B[J_?NumericQ, g_?NumericQ] :=
NIntegrate[
b*(1 - c*g)*H/G + b*g*(1 - c*g)*(1 - H/G) - d*X/K, {t, J, 500}]
h = Exp[-q*J]*G
x = (b E^((b h J)/G) h K)/(-d G + d E^((b h J)/G) G + b h)
B[T_?NumericQ,
g_?NumericQ] := (2/(1 +
NIntegrate[
Exp[-B[J, g]]*(b*h/G*(1 - c*g) + b*(1 - h/G)*(1 - c*g)*g +
d*x/K), {J, T, 500}]))
w = Exp[-q*T]*G
W = (b E^((b w T)/G) w K)/(-d G + d E^((b w T)/G) G + b w)
Plot[NIntegrate[W*B[T, g], {T, 0, 330}], {g, 0, 1}]
But this code again results in the Kernel automatically quitting. Any further help would be greatly appreciated but I completely understand if it can not be given!
Alex
Attachments: