I would like to make a 3d plot of a function that takes as a variable a function of another variable.
The whole thing is complicated by the fact that my functions are nested piecewise functions
here is my code:
phi0=Function[u,1.21*10^-6/((u/10^44.25)^1.01 + (u/10^44.25)^2.38)][Lx]
zc=Function[v,Piecewise[{{2.49,v>=10^45.74},{2.49*(v/10^45.74)^0.2,v<10^45.74}}]][Lx]
e=Function[uu,Piecewise[{{(1+uu)^4.62,uu<=zc},{(1+zc)^4.62*((1+uu)/(1+zc))^-1.15,uu>zc}}]][z]
Plot3D[e[z,Lx],{z,0,7},{Lx,10^42,10^47}, PlotRange->Full]
but it is not plotting anything, and I am not sure of what to do
EDIT:
thanks, for the hint, I think I solved it this way. It is not giving me any error, but it is taking a lot of time to evaluate the result even in one single point... do you think it is normal?
phizero[Lx_] := 1.21/10^6/((Lx/10^44.25)^1.01 + (Lx/10^44.25)^2.38)
zc[Lx_] :=
Piecewise[{{2.49, Lx >= 10^45.74}, {2.49*(Lx/10^45.74)^0.2,
Lx < 10^45.74}}]
e[z_, Lx_] :=
Piecewise[{{(1 + z)^4.62,
z <= zc[Lx]}, {(1 + zc[Lx])^4.62*((1 + z)/(1 + zc[Lx]))^-1.15,
z > zc[Lx]}}]
phi[z_, Lx_] := phizero[Lx]*e[z, Lx]
(*D[phi[z,Lx],Lx]:=Lx*phi[z,Lx]*)
p[z_, Lx_] = Integrate[Lx*phi[z, Lx], Lx]
p[4, 10^44]