Question: Why doesnt this work?

gam := 1.4;
p[L] := 1;
u[L] := 0;
rho[L] := 1;
p[R] := 1;
u[R] := 1;
rho[R] := 1;
p1 = 1/2*(p[L]+p[R]);
A[L] := 2/((gam+1)*rho[L]);
A[R] := 2/((gam+1)*rho[R]);
B[L] := (gam-1)*p[L]/(gam+1);
B[R] := (gam-1)*p[R]/(gam+1);
a[L] := (gam*p[L]/rho[L])^(1/2);
a[R] := (gam*p[R]/rho[R])^(1/2);
if p1 > p[L] then
     f[L] := (p1-p[L])*(A[L]/(p1+B[L]))^(1/2);
     df[L] := (A[L]/(p1+B[L]))^(1/2)*(1-(p1-p[L])/(2*(p1+B[L])));
else
     f[L] := 2*a[L]*((p1/p[L])^((gam-1)/(2*gam))-1)/(gam-1);
     df[L] := (p1/p[L])^(-(gam+1)/(2*gam))/(rho[L]*a[L]);
end if;

Error, cannot determine if this expression is true or false: 1 < p1

 

Can anyone help me with this error. I am not that familiar with Maple, but this is a relatively simple argument, why do I have so much problem with this?

 

Thanks,

Sushil

Please Wait...