I want to define a piecewise function, which has two arguments, one of which is a function of the other's piecewise argument. I am giving an example
X0 = 1.7635;
X1 = 4.4855;
γ[En_] := En/0.13957
β[En_] := Sqrt[γ[En]^2 - 1]/γ[En]
X[En_] := Log[10, β[En]*γ[En]]
f[En_, Evaluate[X[En_] _]] :=Piecewise[{{0, X[En] < X0}, {4*X[En], X[En] > X0}}]
PLot[f[En, Evaluate[X[En]]], {En, 0.001, 1000}]
Is it possible?


f[En_] :=Piecewise[{{0, X[En] < X0}, {4, X[En] > X0}}]? – b.gatessucks Sep 14 '12 at 7:21PLot[\[Piecewise] { {0, Log[1. Sqrt[-1 + 51.3353 En^2]]/Log[10] < 1.7635}, {((4 Log[1. Sqrt[-1 + 51.3353 En^2]])/Log[10]), Log[1. Sqrt[-1 + 51.3353 En^2]]/Log[10] > 1.7635}, {0, \!\(\* TagBox["True", "PiecewiseDefault", AutoDelete->False, DeletionWarning->True]\)} }, {En, 0.001, 1000}]– Thanos Sep 14 '12 at 8:16PLot? It should bePlot(L not capitalized). – b.gatessucks Sep 14 '12 at 8:26