Let P be the volume charge density.
Charge in volume dV be dq.
For a unit cube, dq=P×dx×A [A=1 m2]
⇒dq=Pdx
So, total charge enclosed within unit cube
qenclosed=∫dq=∫Pdx
∫Pdx is Area under the given graph.
So total charge enclosed ,
Q=12×P0×(34−14+1)
Q=3P04
So, total flux ,ϕ=Qε0=3P04ε0
Substituting the given data we get,
ϕ=3×8.85×10−124×8.85×10−12=34
Comparing with the data given in the question we get, x=3
Accepted answer : 3